Changeset 8890 in orxonox.OLD for branches/single_player_map/src
- Timestamp:
- Jun 28, 2006, 11:47:35 PM (19 years ago)
- Location:
- branches/single_player_map/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/collision_detection/cd_engine.cc
r8490 r8890 84 84 if( likely((*entity2) != this->terrain)) 85 85 { 86 PRINTF( 4)("checking object %s against %s\n", (*entity1)->getName(), (*entity2)->getName());86 PRINTF(5)("checking object %s (%s) against %s (%s)\n", (*entity1)->getClassName(), (*entity1)->getName(), (*entity2)->getClassName(), (*entity2)->getName()); 87 87 tree = (*entity1)->getOBBTree(); 88 88 if( likely(tree != NULL) && (*entity2)->getOBBTree() != NULL) -
branches/single_player_map/src/world_entities/creatures/fps_player.cc
r8869 r8890 26 26 #include "weapons/turret.h" 27 27 #include "weapons/cannon.h" 28 #include "weapons/fps_sniper_rifle.h" 28 29 29 30 #include "key_mapper.h" … … 109 110 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 110 111 111 Weapon* wpRight = new TestGun(0);112 Weapon* wpRight = new FPSSniperRifle(0); 112 113 wpRight->setName("testGun Right"); 113 Weapon* wpLeft = new TestGun(1); 114 /* Weapon* wpLeft = new TestGun(1);*/ 114 115 // Weapon* wpLeft = new Turret(); 115 wpLeft->setName("testGun Left");116 117 this->addWeapon(wpLeft, 1, 0);116 // wpLeft->setName("testGun Left"); 117 118 // this->addWeapon(wpLeft, 1, 0); 118 119 this->addWeapon(wpRight,1 ,1); 119 120 this->getWeaponManager().changeWeaponConfig(1); -
branches/single_player_map/src/world_entities/door.cc
r8886 r8890 53 53 Door::Door(const TiXmlElement* root) 54 54 { 55 this->init(); 55 56 this->setClassID(CL_DOOR, "Door"); 57 this->scale = 1.0f; 56 58 57 59 if( root != NULL) 58 60 this->loadParams(root); 61 62 this->toList(OM_COMMON); 63 this->bLocked = false; 64 65 this->loadMD2Texture("maps/doors.jpg"); 66 this->loadModel("models/creatures/doors.md2", this->scale); 67 this->setAnimation(DOOR_CLOSE, MD2_ANIM_ONCE); 59 68 } 60 69 … … 64 73 65 74 66 67 void Door::init()68 {69 this->setClassID(CL_DOOR, "Door");70 this->toList(OM_COMMON);71 72 this->bLocked = false;73 74 75 this->loadMD2Texture("maps/doors.jpg");76 this->loadModel("models/creatures/doors.md2", 1.0);77 this->setAnimation(DOOR_CLOSE, MD2_ANIM_ONCE);78 }79 75 80 76 /** … … 86 82 WorldEntity::loadParams(root); 87 83 88 LoadParam(root, " ", this, Door, setActionRadius)84 LoadParam(root, "action-radius", this, Door, setActionRadius) 89 85 .describe("sets the action radius of the door") 90 86 .defaultValues(3.0); 87 LoadParam(root, "scale", this, Door, setScale) 88 .describe("sets the scale of the door") 89 .defaultValues(1.0); 91 90 } 92 91 … … 115 114 ((InteractiveModel*)this->getModel(0))->tick(time); 116 115 117 this->checkOpen(); 116 if( this->checkOpen() && !this->bOpen) 117 this->open(); 118 else if( bOpen) 119 this->close(); 120 118 121 } 119 122 … … 128 131 129 132 this->setAnimation(DOOR_OPEN, MD2_ANIM_ONCE); 130 133 this->bOpen = true; 131 134 } 132 135 … … 137 140 void Door::close() 138 141 { 139 142 this->setAnimation(DOOR_CLOSE, MD2_ANIM_ONCE); 143 this->bOpen = false; 140 144 } 141 145 -
branches/single_player_map/src/world_entities/door.h
r8881 r8890 26 26 virtual ~Door (); 27 27 28 void init();29 28 virtual void loadParams(const TiXmlElement* root); 30 29 31 30 void setActionRadius(float radius) { this->actionRadius = radius; } 31 void setScale(float scale) { this->scale = scale; } 32 32 33 33 void open(); … … 51 51 bool bLocked; //!< true if this door is locked 52 52 float actionRadius; //!< action radius 53 float scale; //!< the scale of the model 53 54 54 55 static sAnim animationList[2]; //!< list of the animations 56 55 57 56 58 }; -
branches/single_player_map/src/world_entities/npcs/generic_npc.h
r8824 r8890 84 84 void destroy(); 85 85 86 86 87 private: 87 88 OrxSound::SoundSource soundSource; -
branches/single_player_map/src/world_entities/weapons/fps_sniper_rifle.cc
r8871 r8890 76 76 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN); 77 77 78 this->loadModel("models/guns/ test_gun.obj");78 this->loadModel("models/guns/fps_sniper_rifle.obj"); 79 79 80 80 this->setStateDuration(WS_SHOOTING, .1); -
branches/single_player_map/src/world_entities/weapons/fps_sniper_rifle.h
r8870 r8890 21 21 22 22 23 #ifndef _ TEST_GUN_H24 #define _ TEST_GUN_H23 #ifndef _FPS_SNIPER_RIFLE_H 24 #define _FPS_SNIPER_RIFLE_H 25 25 26 26 #include "weapon.h" … … 55 55 56 56 }; 57 #endif /* _ TEST_GUN_H */57 #endif /* _FPS_SNIPER_RIFLE_H */
Note: See TracChangeset
for help on using the changeset viewer.