Changeset 5559 in orxonox.OLD for branches/world_entities/src/world_entities/player.cc
- Timestamp:
- Nov 13, 2005, 4:30:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/world_entities/src/world_entities/player.cc
r5558 r5559 341 341 void Player::ADDWEAPON() 342 342 { 343 Weapon* turret1; 344 if ((float)rand()/RAND_MAX < .7) 345 turret1 = new Turret(this->weaponMan); 343 Weapon* turret; 344 if ((float)rand()/RAND_MAX < .1) 345 { 346 turret = new Turret(this->weaponMan); 347 this->weaponMan->addWeapon(turret, 2); 348 this->weaponMan->changeWeaponConfig(2); 349 } 346 350 else 347 turret1 = new AimingTurret(this->weaponMan); 348 349 turret1->setName("Turret"); 350 turret1->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1); 351 352 this->weaponMan->addWeapon(turret1, 2); 353 354 this->weaponMan->changeWeaponConfig(2); 355 } 351 { 352 turret = new AimingTurret(this->weaponMan); 353 this->weaponMan->addWeapon(turret, 3); 354 355 this->weaponMan->changeWeaponConfig(3); 356 } 357 358 turret->setName("Turret"); 359 turret->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1); 360 }
Note: See TracChangeset
for help on using the changeset viewer.