Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8686 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 8:57:39 PM (18 years ago)
Author:
patrick
Message:

bsp: fps player extension

Location:
branches/bsp_model/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/world_entities/creatures/fps_player.cc

    r8685 r8686  
    9393  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
    9494
    95 
     95  // network registration
    9696  registerVar( new SynchronizeableBool( &bLeft, &bLeft, "bLeft", PERMISSION_OWNER ) );
    9797  registerVar( new SynchronizeableBool( &bRight, &bRight, "bRight", PERMISSION_OWNER ) );
     
    9999  registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) );
    100100  registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mouseDir", PERMISSION_OWNER ) );
     101
     102  // collision reaction registration
     103  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
    101104}
    102105
     
    142145  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
    143146  this->detachCamera();
    144 }
    145 
    146 
    147 /**
    148  *  this function is called, when two entities collide
    149  * @param entity: the world entity with whom it collides
    150  *
    151  * Implement behaviour like damage application or other miscellaneous collision stuff in this function
    152  * @todo dont let FPSPlayer fly through walls
    153  */
    154 void FPSPlayer::collidesWith(WorldEntity* entity, const Vector& location)
    155 {
    156147}
    157148
     
    246237
    247238
    248 
    249 
    250 
    251 /**
    252  *
     239/**
     240 *  draws the MD2Creature after transforming it.
     241 */
     242void FPSPlayer::draw () const
     243{
     244  // only draw if this entity is not the player since the player nevers sees himself
     245  if( this->getCurrentPlayer() == NULL)
     246    WorldEntity::draw();
     247}
     248
     249
     250
     251/**
     252 * process
    253253 */
    254254void FPSPlayer::process(const Event &event)
  • branches/bsp_model/src/world_entities/creatures/fps_player.h

    r8685 r8686  
    2727    virtual void reset();
    2828
    29     virtual void collidesWith(WorldEntity* entity, const Vector& location);
     29
    3030    virtual void tick(float time);
     31    virtual void draw() const;
     32
    3133
    3234    virtual void process(const Event &event);
  • branches/bsp_model/src/world_entities/playable.cc

    r8578 r8686  
    6565
    6666  this->bDead = false;
    67 
    68 //   this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
    6967
    7068  registerVar( new SynchronizeableInt( &score, &score, "score" ) );
Note: See TracChangeset for help on using the changeset viewer.