Changeset 9656 in orxonox.OLD for trunk/src/world_entities/space_ships
- Timestamp:
- Aug 4, 2006, 11:01:28 PM (18 years ago)
- Location:
- trunk/src/world_entities/space_ships
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/hover.cc
r9235 r9656 330 330 this->shiftCoor (this->velocity * dt); 331 331 332 332 // limit the maximum rotation speed. 333 333 if (this->rotation != 0.0f) 334 334 { -
trunk/src/world_entities/space_ships/space_ship.cc
r9494 r9656 234 234 this->burstSystem->setColor(1.0, .8,.8,.8,.0); 235 235 236 registerVar( new SynchronizeableVector( &velocity, &velocity, "velocity" ) );236 registerVar( new SynchronizeableVector( &velocity, &velocity, "velocity", PERMISSION_MASTER_SERVER ) ); 237 237 registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mousedir", PERMISSION_OWNER ) ); 238 238 -
trunk/src/world_entities/space_ships/turbine_hover.cc
r9494 r9656 91 91 92 92 this->loadModel("models/ships/hoverglider_mainbody.obj"); 93 93 94 } 94 95 … … 222 223 registerVar( new SynchronizeableFloat( &cameraLook, &cameraLook, "cameraLook", PERMISSION_OWNER ) ); 223 224 registerVar( new SynchronizeableFloat( &rotation, &rotation, "rotation", PERMISSION_OWNER ) ); 225 226 if( State::isOnline()) 227 toList( OM_PLAYERS ); 224 228 } 225 229 … … 231 235 { 232 236 Playable::loadParams(root); 237 } 238 239 240 void TurbineHover::setBoostColor(const Color& color) 241 { 242 this->burstSystem->setColor(0.0, color); 243 this->burstSystem->setColor(0.2, color * 0.6); 244 this->burstSystem->setColor(0.5, color * .3 + Color(0.5, 0.5, 0.8, 0.3)); 245 this->burstSystem->setColor(1.0, 0.8, 0.8, 0.8, 0.0); 246 247 printf(":::::::::::::::::::::::\n"); 248 this->burstSystem->debug(); 233 249 } 234 250 … … 256 272 257 273 } 274 275 void TurbineHover::setTeam(int teamID) 276 { 277 printf("::::::::::::::::: TEAM ::: %d\n", teamID); 278 if (teamID == 0) 279 { 280 this->setBoostColor(Color::blue); 281 } 282 else if (teamID == 1) 283 { 284 this->setBoostColor(Color::red); 285 } 286 287 ///HACK this is very much hard coded.set the owner of the weapons 288 this->getWeaponManager().getWeapon(0)->setOwner(this->getOwner()); 289 this->getWeaponManager().getWeapon(1)->setOwner(this->getOwner()); 290 291 //choose collision list 292 if( State::isOnline()) 293 { 294 if( teamID == 0) 295 toList( OM_GROUP_00 ); 296 else if(teamID == 1) 297 toList( OM_GROUP_01); 298 } 299 300 301 // set the local team id, very important 302 this->setTeamId(teamID); 303 } 304 258 305 259 306 … … 527 574 } 528 575 } 576 577 578 /** 579 * respawning function called by the GameRules 580 */ 581 void TurbineHover::respawn( ) 582 { 583 584 Playable::respawn(); 585 } -
trunk/src/world_entities/space_ships/turbine_hover.h
r8490 r9656 9 9 10 10 #include "playable.h" 11 12 #include "color.h" 11 13 12 14 // Forward Declaration … … 21 23 virtual ~TurbineHover(); 22 24 25 void setBoostColor(const Color& color); 26 23 27 virtual void loadParams(const TiXmlElement* root); 24 28 virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); … … 26 30 virtual void leave(); 27 31 32 virtual void setTeam(int teamID); 33 28 34 virtual void postSpawn(); 29 35 virtual void leftWorld(); 36 virtual void respawn(); 30 37 31 38 virtual void collidesWith(WorldEntity* entity, const Vector& location);
Note: See TracChangeset
for help on using the changeset viewer.