Changeset 9166 in orxonox.OLD
- Timestamp:
- Jul 4, 2006, 7:28:41 PM (18 years ago)
- Location:
- branches/presentation/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/collision_reaction/cr_object_damage.cc
r9061 r9166 56 56 float damage = 0.0f; 57 57 58 PRINTF( 0)("Dealing damage - Handling collision: %s vs %s\n",58 PRINTF(5)("Dealing damage - Handling collision: %s vs %s\n", 59 59 collision->getEntityA()->getClassName(), 60 60 collision->getEntityB()->getClassName()); -
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 -
branches/presentation/src/world_entities/weapons/aiming_system.cc
r9163 r9166 21 21 22 22 #include "state.h" 23 24 #include "aabb.h" 23 25 24 26 #include <vector> … … 55 57 this->setClassID(CL_CROSSHAIR, "AimingSystem"); 56 58 this->setName("AimingSystem"); 59 60 this->loadModel("models/guns/targeting_system_body.obj"); 57 61 } 58 62 … … 78 82 * @returns the nerest target 79 83 */ 80 inlineWorldEntity* AimingSystem::getNearestTarget()84 WorldEntity* AimingSystem::getNearestTarget() 81 85 { 82 86 if( this->selectionList.size() == 0) … … 132 136 void AimingSystem::draw() const 133 137 { 138 // if( this->getModelAABB() != NULL) 139 // this->getModelAABB()->drawBV(0, 1); 134 140 } -
branches/presentation/src/world_entities/weapons/aiming_system.h
r9160 r9166 32 32 inline PNode* getTarget(PNode* target) { return this->getParent(); }; 33 33 34 inlineWorldEntity* getNearestTarget();34 WorldEntity* getNearestTarget(); 35 35 36 36 -
branches/presentation/src/world_entities/world_entity.h
r9162 r9166 75 75 inline BVTree* getOBBTree() const { return this->obbTree; }; 76 76 void drawBVTree(int depth, int drawMode) const; 77 inline AABB* getModelAABB() { return (this->aabbNode)?this->aabbNode->getAABB():NULL;}77 inline AABB* getModelAABB() const { return (this->aabbNode)?this->aabbNode->getAABB():NULL;} 78 78 79 79 /* --- Collision Reaction Block --- */ … … 198 198 int list_write; //!< entity's list 199 199 int list_handle; //!< handle for list changes 200 200 201 201 float health_write; 202 202 int health_handle; 203 203 204 204 float healthMax_write; 205 205 int healthMax_handle;
Note: See TracChangeset
for help on using the changeset viewer.