Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8687 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 21, 2006, 10:13:44 PM (18 years ago)
Author:
patrick
Message:

bsp: fps player worky

File:
1 edited

Legend:

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

    r8686 r8687  
    2323
    2424#include "key_mapper.h"
     25
     26#include "debug.h"
    2527
    2628
     
    8486  registerEvent(KeyMapper::PEV_RIGHT);
    8587  registerEvent(KeyMapper::PEV_FIRE1);
     88  registerEvent(KeyMapper::PEV_JUMP);
    8689  registerEvent(EV_MOUSE_MOTION);
    8790
     
    101104
    102105  // collision reaction registration
    103   this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
     106  //this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
    104107}
    105108
     
    157160  Playable::tick( time );
    158161
    159   if( ( xMouse != 0 || yMouse != 0 ) && this->getOwner() == this->getHostID() )
    160   {
    161     xMouse *= time / 10;
    162     yMouse *= time / 10;
     162  if( ( xMouse != 0 || yMouse != 0 ) && /*this->getOwner() == this->getHostID()*/ true)
     163  {
     164    xMouse *= time ;
     165    yMouse *= time ;
    163166
    164167    angleX -= xMouse;
     
    207210
    208211
    209   if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(CL_INTERACTIVE_MODEL))
    210   {
    211     ((InteractiveModel*)this->getModel(0))->tick(time);
    212 
    213     // handle animations differently
    214     if( this->bJump && likely(this->getModel(0) != NULL))
    215     {
    216       ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
    217     }
     212//   if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(CL_INTERACTIVE_MODEL))
     213//   {
     214//     ((InteractiveModel*)this->getModel(0))->tick(time);
     215//
     216//     // handle animations differently
     217//     if( this->bJump && likely(this->getModel(0) != NULL))
     218//     {
     219//       ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
     220//     }
    218221//     else if( this->bFire && likely(this->getModel(0) != NULL))
    219222//     {
     
    226229//         ((InteractiveModel*)this->getModel(0))->setAnimation(RUN);
    227230//     }
    228     else if (likely(this->getModel(0) != NULL))
    229     {
    230       if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND)
    231         ((InteractiveModel*)this->getModel(0))->setAnimation(STAND);
    232     }
    233   }
     231//     else if (likely(this->getModel(0) != NULL))
     232//     {
     233//       if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND)
     234//         ((InteractiveModel*)this->getModel(0))->setAnimation(STAND);
     235//     }
     236//   }
    234237
    235238}
Note: See TracChangeset for help on using the changeset viewer.