Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2009, 1:02:09 AM (15 years ago)
Author:
scheusso
Message:

rocket now steerable also on client
AIController shoots again now ;)
fire network function is now in CE instead of Pawn
some changes in PlayerInfo that allow controlling of temporary objects (such as Rocket)

Location:
code/branches/particles2/src/orxonox/worldentities/pawns
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particles2/src/orxonox/worldentities/pawns/Pawn.cc

    r6078 r6101  
    5252    CreateFactory(Pawn);
    5353
    54     registerMemberNetworkFunction( Pawn, doFire );
    55 
    5654    Pawn::Pawn(BaseObject* creator) : ControllableEntity(creator)
    5755    {
     
    263261    }
    264262
    265     void Pawn::fire(unsigned int firemode)
    266     {
    267         this->doFire(firemode);
    268     }
    269 
    270     void Pawn::doFire(uint8_t firemode)
    271     {
    272         if(GameMode::isMaster())
    273         {
    274             if (this->weaponSystem_)
    275                 this->weaponSystem_->fire(firemode);
    276         }
    277         else
    278         {
    279             callMemberNetworkFunction(Pawn, doFire, this->getObjectID(), 0, firemode);
    280             if (this->weaponSystem_)
    281                 this->weaponSystem_->fire(firemode);
    282         }
     263    void Pawn::fired(unsigned int firemode)
     264    {
     265        if (this->weaponSystem_)
     266            this->weaponSystem_->fire(firemode);
    283267    }
    284268
  • code/branches/particles2/src/orxonox/worldentities/pawns/Pawn.h

    r6078 r6101  
    7979            virtual void kill();
    8080
    81             virtual void fire(unsigned int firemode);
     81            virtual void fired(unsigned int firemode);
    8282            virtual void reload();
    83             virtual void doFire(uint8_t firemode);
    8483            virtual void postSpawn();
    8584
  • code/branches/particles2/src/orxonox/worldentities/pawns/Spectator.cc

    r5929 r6101  
    189189    }
    190190
    191     void Spectator::fire(unsigned int firemode)
     191    void Spectator::fired(unsigned int firemode)
    192192    {
    193193        if (this->getPlayer())
  • code/branches/particles2/src/orxonox/worldentities/pawns/Spectator.h

    r5781 r6101  
    5555            virtual void rotateRoll(const Vector2& value);
    5656
    57             virtual void fire(unsigned int firemode);
     57            virtual void fired(unsigned int firemode);
    5858            virtual void greet();
    5959
Note: See TracChangeset for help on using the changeset viewer.