Follow-up Comment #3, task #2092 (project wormux):
A part of this work has been done by removing the is_active boolean in
WeaponProjectile. If a projectile is in the Physical Engine, we can considere
it's an active object.
I think we could extend this effort by removing the m_ready crap. But first
I'm wondering if it's the same signification for the game.
Here where we can find m_ready :
$ grep m_ready */*
object/bonus_box.cpp: if (!m_ready && !parachute) anim->Update();
object/bonus_box.cpp: m_ready = anim->IsFinished();
object/physical_obj.cpp: m_ready = true; // TO REMOVE !!
object/physical_obj.cpp: return (!IsMoving() && !FootsInVacuum() &&
m_ready)||(m_alive == GHOST);
object/physical_obj.h: bool m_ready;
weapon/mine.cpp: m_ready = true;
weapon/mine.cpp: m_ready = false;
And here, we find the calls of the *Ready method :
$ grep Ready */*
game/game_loop.cpp: if (!ActiveCharacter().IsReady()) return
&ActiveCharacter();
game/game_loop.cpp: if (!ver -> IsReady() && !ver -> IsGhost())
game/game_loop.cpp: if (!object -> ptr ->IsReady())
graphic/video.cpp: SDLReady = false;
graphic/video.cpp: if( SDLReady )
graphic/video.cpp: if( SDLReady )
graphic/video.cpp: SDLReady = true;
graphic/video.h: bool SDLReady;
network/network.cpp: if(SDLNet_SocketReady(*sock)) // Check if this
socket contains data to receive
object/objects_list.cpp:bool ObjectsList::AllReady()
object/objects_list.cpp: if (!object->ptr->IsReady()) return false;
object/objects_list.h: bool AllReady();
object/physical_obj.cpp:void PhysicalObj::Ready()
object/physical_obj.cpp: MSG_DEBUG( "physic.state", "%s - Ready.",
m_name.c_str());
object/physical_obj.cpp:bool PhysicalObj::IsReady() const
object/physical_obj.cpp: Ready();
object/physical_obj.h: void Ready();
object/physical_obj.h: bool IsReady() const;
team/character.cpp: && ActiveTeam().GetWeapon().IsReady() )
team/character.cpp: if(ActiveCharacter().IsReady())
team/character.cpp: if(ActiveCharacter().IsReady())
team/character.cpp: if(ActiveCharacter().IsReady())
team/character.cpp: if(ActiveCharacter().IsReady())
team/character.cpp: if(ActiveCharacter().IsReady())
team/character.cpp: if(ActiveCharacter().IsReady())
team/character.cpp: if (!IsReady() || IsFalling()) return false;
team/team.cpp: characters.back().Ready();
weapon/air_attack.cpp: Ready();
weapon/air_attack.cpp: Ready();
weapon/auto_bazooka.cpp:bool AutomaticBazooka::IsReady() const
weapon/auto_bazooka.h: bool IsReady() const;
weapon/cluster_bomb.cpp: Ready();
weapon/dynamite.cpp: Ready();
weapon/launcher.cpp: Ready();
weapon/mine.cpp: Ready();
weapon/mine.cpp: MSG_DEBUG("mine", "IsReady() = %d", IsReady());
weapon/supertux.cpp: Ready();
weapon/weapon.cpp:bool Weapon::IsReady() const{
weapon/weapon.cpp: if (max_strength != 0 && IsReady() && !m_is_active)
weapon/weapon.h: virtual bool IsReady() const ;
Well, I gona take look at this task.
_______________________________________________________
Reply to this item at:
<http://gna.org/task/?func=detailitem&item_id=2092>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna