Changeset 9166 in orxonox.OLD for branches/presentation/src/world_entities/creatures
- Timestamp:
- Jul 4, 2006, 7:28:41 PM (19 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
r9163 r9166 32 32 33 33 #include "aabb.h" 34 34 35 35 36 #include "key_mapper.h" … … 90 91 this->bJump = false; 91 92 this->bPosBut = false; 93 this->bFire = false; 92 94 93 95 this->xMouse = 0.0f; … … 143 145 this->getWeaponManager().getFixedTarget()->setRelCoor(1000,0,0); 144 146 147 this->aimingSystem = new AimingSystem(); 148 this->addChild(this->aimingSystem); 149 this->aimingSystem->toList(OM_LIST(this->getOMListNumber() + 1)); 150 145 151 146 152 // network registration … … 245 251 246 252 247 248 249 Playable::tick( time ); 253 this->getWeaponManager().tick(time); 254 if( this->bFire) 255 { 256 this->getWeaponManager().fire(); 257 258 WorldEntity* target = this->aimingSystem->getNearestTarget(); 259 if( target != NULL) 260 { 261 PRINTF(0)("hit hit hit, got: %s\n", target->getClassName()); 262 } 263 else 264 { 265 PRINTF(0)("nothing hit\n"); 266 } 267 } 268 269 270 250 271 251 272 if( ( xMouse != 0 || yMouse != 0 ) && (this->getOwner() == SharedNetworkData::getInstance()->getHostID() || !State::isOnline() ) ) … … 407 428 } 408 429 else if( event.type == KeyMapper::PEV_JUMP) 430 { 409 431 this->bJump = event.bPressed; 432 } 433 else if( event.type == KeyMapper::PEV_FIRE1) 434 { 435 this->bFire = event.bPressed; 436 } 410 437 } 411 438 … … 420 447 { 421 448 Playable::destroy( killer ); 422 449 423 450 toList( OM_DEAD ); 424 451 } -
branches/presentation/src/world_entities/creatures/fps_player.h
r9163 r9166 48 48 bool bJump; //!< jumping 49 49 bool bPosBut; //!< position button 50 bool bFire; //!< fire button 50 51 51 52 float xMouse; //!< mouse moved in x-Direction
Note: See TracChangeset
for help on using the changeset viewer.