Changeset 9139 in orxonox.OLD for branches/presentation/src/world_entities/creatures/fps_player.cc
- Timestamp:
- Jul 4, 2006, 3:05:59 PM (18 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.