Changeset 9656 in orxonox.OLD for trunk/src/world_entities/space_ships/turbine_hover.cc
- Timestamp:
- Aug 4, 2006, 11:01:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.