Changeset 9039 in orxonox.OLD
- Timestamp:
- Jul 3, 2006, 3:16:31 PM (18 years ago)
- Location:
- branches/single_player_map/src
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/defs/class_id.h
r9006 r9039 199 199 CL_HOVER = 0x0000035e, 200 200 CL_TURBINE_HOVER = 0x0000035f, 201 CL_SPECTATOR = 0x00000360, 202 CL_COLLISION_PROBE = 0x00000361, 203 CL_FPS_PLAYER = 0x00000362, 201 CL_CRUIZER = 0x00000360, 202 CL_SPECTATOR = 0x0000036a, 203 CL_COLLISION_PROBE = 0x0000036b, 204 CL_FPS_PLAYER = 0x0000036c, 204 205 205 206 // Powerups -
branches/single_player_map/src/lib/graphics/text_engine/font_data.cc
r8765 r9039 279 279 Glyph* tmpGlyph; 280 280 281 if ( tmpGlyph = this->glyphArray[i])281 if ((tmpGlyph = this->glyphArray[i]) != NULL) 282 282 { 283 283 if (tmpGlyph->height*this->renderSize > maxLineHeight) -
branches/single_player_map/src/world_entities/WorldEntities.am
r9003 r9039 45 45 world_entities/space_ships/turbine_hover.cc \ 46 46 world_entities/space_ships/collision_probe.cc \ 47 world_entities/space_ships/cruizer.cc \ 47 48 world_entities/creatures/md2_creature.cc \ 48 49 world_entities/creatures/fps_player.cc \ … … 107 108 space_ships/hover.h \ 108 109 space_ships/turbine_hover.h \ 109 space_ships/collision_probe.cc \ 110 space_ships/collision_probe.h \ 111 space_ships/cruizer.h \ 110 112 creatures/md2_creature.h \ 111 113 creatures/fps_player.h \ -
branches/single_player_map/src/world_entities/elements/glgui_radar.cc
r9003 r9039 42 42 this->setBackgroundTexture("gui_radar.png"); 43 43 44 this->_updateInterval = 1.0f;44 this->_updateInterval = 0.5f; 45 45 this->_timePassed = 0.0f; 46 46 this->_range = 100.0f; … … 88 88 _timePassed+=dt; 89 89 90 //if (_timePassed > _updateInterval)90 if (_timePassed > _updateInterval) 91 91 { 92 92 _timePassed = 0 ; //-=_updateInterval; -
branches/single_player_map/src/world_entities/space_ships/cruizer.cc
r9036 r9039 17 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 18 18 19 #include " turbine_hover.h"19 #include "cruizer.h" 20 20 21 21 #include "weapons/weapon_manager.h" … … 34 34 #include "debug.h" 35 35 36 CREATE_FACTORY( TurbineHover, CL_TURBINE_HOVER);37 38 /** 39 * destructs the turbine_hover, deletes alocated memory36 CREATE_FACTORY(Cruizer, CL_CRUIZER); 37 38 /** 39 * destructs the cruizer, deletes alocated memory 40 40 */ 41 TurbineHover::~TurbineHover ()41 Cruizer::~Cruizer () 42 42 { 43 43 this->setPlayer(NULL); … … 45 45 46 46 /** 47 * @brief loads a TurbineHover information from a specified file.48 * @param fileName the name of the File to load the turbine_hover from (absolute path)47 * @brief loads a Cruizer information from a specified file. 48 * @param fileName the name of the File to load the cruizer from (absolute path) 49 49 */ 50 TurbineHover::TurbineHover(const std::string& fileName)50 Cruizer::Cruizer(const std::string& fileName) 51 51 { 52 52 this->init(); … … 55 55 if(!doc.LoadFile()) 56 56 { 57 PRINTF(2)("Loading file %s failed for TurbineHover.\n", fileName.c_str());57 PRINTF(2)("Loading file %s failed for Cruizer.\n", fileName.c_str()); 58 58 return; 59 59 } … … 68 68 @todo add more parameters to load 69 69 */ 70 TurbineHover::TurbineHover(const TiXmlElement* root)70 Cruizer::Cruizer(const TiXmlElement* root) 71 71 { 72 72 this->init(); … … 74 74 this->loadParams(root); 75 75 76 //weapons:77 Weapon* wpRight = new TestGun(0);78 wpRight->setName("testGun Right");79 Weapon* wpLeft = new TestGun(1);80 wpLeft->setName("testGun Left");81 //Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER));82 83 // cannon->setName("BFG");84 85 this->addWeapon(wpLeft, 1, 0);86 this->addWeapon(wpRight,1 ,1);87 //this->addWeapon(cannon, 0, 2);88 76 89 77 this->getWeaponManager().changeWeaponConfig(1); 90 78 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 91 79 92 this->loadModel("models/ships/hoverglider_mainbody.obj"); 93 } 94 95 96 /** 97 * @brief initializes a TurbineHover 80 exit(-1); 81 this->loadModel("models/ships/human_cruizer.obj"); 82 } 83 84 85 /** 86 * @brief initializes a Cruizer 98 87 */ 99 void TurbineHover::init()88 void Cruizer::init() 100 89 { 101 90 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 102 this->setClassID(CL_ TURBINE_HOVER, "TurbineHover");91 this->setClassID(CL_CRUIZER, "Cruizer"); 103 92 104 93 this->setSupportedPlaymodes(Playable::Full3D | Playable::Horizontal | Playable::Vertical); … … 150 139 this->burstEmitter[0]->setRelCoor(0, -0.7, 0); 151 140 this->burstEmitter[0]->setRelDir(Quaternion(-M_PI_2, Vector(0,0,1))); 152 this->burstEmitter[0]->setName(" TurbineHover_Burst_emitter_Left");141 this->burstEmitter[0]->setName("Cruizer_Burst_emitter_Left"); 153 142 154 143 this->burstEmitter[1] = new DotEmitter(200, 5.0, .01); … … 156 145 this->burstEmitter[1]->setRelCoor(0, -0.7, 0); 157 146 this->burstEmitter[1]->setRelDir(Quaternion(-M_PI_2, Vector(0,0,1))); 158 this->burstEmitter[1]->setName(" TurbineHover_Burst_emitter_Right");147 this->burstEmitter[1]->setName("Cruizer_Burst_emitter_Right"); 159 148 160 149 … … 211 200 this->getWeaponManager().getFixedTarget()->setParent(&this->cameraNode); 212 201 this->getWeaponManager().getFixedTarget()->setRelCoor(1000,0,0); 213 202 214 203 registerVar( new SynchronizeableBool( &bForward, &bForward, "bForward", PERMISSION_OWNER ) ); 215 204 registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) ); … … 224 213 225 214 /** 226 * @brief loads the Settings of a TurbineHover from an XML-element.215 * @brief loads the Settings of a Cruizer from an XML-element. 227 216 * @param root the XML-element to load the Spaceship's properties from 228 217 */ 229 void TurbineHover::loadParams(const TiXmlElement* root)218 void Cruizer::loadParams(const TiXmlElement* root) 230 219 { 231 220 Playable::loadParams(root); 232 221 } 233 222 234 void TurbineHover::setPlayDirection(const Quaternion& rot, float speed)223 void Cruizer::setPlayDirection(const Quaternion& rot, float speed) 235 224 { 236 225 this->direction = Quaternion (rot.getHeading(), Vector(0,1,0)); 237 226 } 238 227 239 void TurbineHover::enter()228 void Cruizer::enter() 240 229 { 241 230 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true); … … 249 238 } 250 239 251 void TurbineHover::leave()240 void Cruizer::leave() 252 241 { 253 242 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); … … 258 247 259 248 /** 260 * @brief effect that occurs after the TurbineHover is spawned249 * @brief effect that occurs after the Cruizer is spawned 261 250 */ 262 void TurbineHover::postSpawn ()251 void Cruizer::postSpawn () 263 252 { 264 253 //setCollision(new CollisionCluster(1.0, Vector(0,0,0))); … … 266 255 267 256 /** 268 * @brief the action occuring if the turbine_hover left the game257 * @brief the action occuring if the cruizer left the game 269 258 */ 270 void TurbineHover::leftWorld ()259 void Cruizer::leftWorld () 271 260 {} 272 261 … … 277 266 * Implement behaviour like damage application or other miscellaneous collision stuff in this function 278 267 */ 279 void TurbineHover::collidesWith(WorldEntity* entity, const Vector& location)268 void Cruizer::collidesWith(WorldEntity* entity, const Vector& location) 280 269 { 281 270 Playable::collidesWith(entity, location); … … 288 277 * @param time The timespan passed since last update 289 278 */ 290 void TurbineHover::tick (float dt)279 void Cruizer::tick (float dt) 291 280 { 292 281 // this->debugNode(1); … … 306 295 * @param time the timeslice since the last frame 307 296 */ 308 void TurbineHover::movement (float dt)297 void Cruizer::movement (float dt) 309 298 { 310 299 Vector accel(0.0, 0.0, 0.0); … … 433 422 434 423 435 void TurbineHover::draw() const424 void Cruizer::draw() const 436 425 { 437 426 Vector tmpRot; … … 486 475 * @todo switch statement ?? 487 476 */ 488 void TurbineHover::process(const Event &event)477 void Cruizer::process(const Event &event) 489 478 { 490 479 Playable::process(event); -
branches/single_player_map/src/world_entities/space_ships/cruizer.h
r9036 r9039 1 1 2 2 /*! 3 * @file turbine_hover.h4 * Implements the Control of a TurbineHover3 * @file cruizer.h 4 * Implements the Control of a Cruizer 5 5 */ 6 6 7 #ifndef _ TURBINE_HOVER_H8 #define _ TURBINE_HOVER_H7 #ifndef _CRUIZER_H 8 #define _CRUIZER_H 9 9 10 10 #include "playable.h" … … 14 14 class ParticleSystem; 15 15 16 class TurbineHover : public Playable16 class Cruizer : public Playable 17 17 { 18 18 public: 19 TurbineHover(const std::string& fileName);20 TurbineHover(const TiXmlElement* root = NULL);21 virtual ~ TurbineHover();19 Cruizer(const std::string& fileName); 20 Cruizer(const TiXmlElement* root = NULL); 21 virtual ~Cruizer(); 22 22 23 23 virtual void loadParams(const TiXmlElement* root); … … 59 59 float rotation; 60 60 61 // Vector velocity; //!< the velocity of the TurbineHover.62 Quaternion direction; //!< the direction of the TurbineHover.61 // Vector velocity; //!< the velocity of the Cruizer. 62 Quaternion direction; //!< the direction of the Cruizer. 63 63 float travelSpeed; //!< the current speed of the Hove (to make soft movement) 64 float acceleration; //!< the acceleration of the TurbineHover.64 float acceleration; //!< the acceleration of the Cruizer. 65 65 float airFriction; //!< AirFriction. 66 66 … … 74 74 }; 75 75 76 #endif /* _ TURBINE_HOVERS_H */76 #endif /* _CRUIZERS_H */
Note: See TracChangeset
for help on using the changeset viewer.