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)

File:
1 edited

Legend:

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

    r5929 r6101  
    3636#include "core/GameMode.h"
    3737#include "core/XMLPort.h"
     38#include "network/NetworkFunction.h"
    3839
    3940#include "Scene.h"
     
    4748{
    4849    CreateFactory(ControllableEntity);
     50
     51    registerMemberNetworkFunction( ControllableEntity, fire );
    4952
    5053    ControllableEntity::ControllableEntity(BaseObject* creator) : MobileEntity(creator)
     
    217220            this->cameraPositionRootNode_->roll(Radian(value.y * this->mouseLookSpeed_), Ogre::Node::TS_LOCAL);
    218221    }
     222   
     223    void ControllableEntity::fire(unsigned int firemode)
     224    {
     225        if(GameMode::isMaster())
     226        {
     227            this->fired(firemode);
     228        }
     229        else
     230        {
     231            callMemberNetworkFunction(ControllableEntity, fire, this->getObjectID(), 0, firemode);
     232        }
     233    }
    219234
    220235    void ControllableEntity::setPlayer(PlayerInfo* player)
Note: See TracChangeset for help on using the changeset viewer.