- Timestamp:
- Jul 4, 2006, 3:05:59 PM (18 years ago)
- Location:
- branches/presentation/src/world_entities/creatures
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/creatures/fps_player.cc
r9136 r9139 148 148 registerVar( new SynchronizeableBool( &bForward, &bForward, "bForward", PERMISSION_OWNER ) ); 149 149 registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) ); 150 registerVar( new SynchronizeableBool( &bJump, &bJump, "bJump", PERMISSION_OWNER ) ); 150 151 registerVar( new SynchronizeableFloat( &heading, &heading, "heading", PERMISSION_OWNER ) ); 151 152 registerVar( new SynchronizeableFloat( &attitude, &attitude, "attitude", PERMISSION_OWNER ) ); … … 153 154 //subscribe to collision reaction 154 155 this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, CL_BSP_ENTITY); 156 157 this->initWeapon = false; 155 158 } 156 159 … … 215 218 void FPSPlayer::tick (float time) 216 219 { 220 if ( !this->initWeapon ) 221 { 222 this->initWeapon = true; 223 224 AABB* box = this->getModelAABB(); 225 if( box != NULL) 226 { 227 float f = 1.3f; 228 State::getCameraNode()->setRelCoor(0, box->halfLength[1] * f, 0); 229 State::getCameraTargetNode()->setRelCoor(10, box->halfLength[1] * f, 0); 230 231 this->getWeaponManager().setSlotPosition(0, Vector(1.5, box->halfLength[1] * f - 0.7, 1.1)); 232 this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * f, 0.0)); 233 } 234 } 217 235 218 236 if( this->bJump) … … 382 400 } 383 401 402 /* 384 403 void FPSPlayer::respawn( ) 385 404 { … … 397 416 } 398 417 } 399 400 401 402 418 */ 419 420 421 -
branches/presentation/src/world_entities/creatures/fps_player.h
r9122 r9139 27 27 virtual void reset(); 28 28 29 virtual void respawn();29 //virtual void respawn(); 30 30 31 31 virtual void tick(float time); … … 56 56 float fallVelocity; //!< velocity for falling down 57 57 float jumpForce; //!< the jump force 58 59 bool initWeapon; 58 60 }; 59 61
Note: See TracChangeset
for help on using the changeset viewer.