- Timestamp:
- Apr 19, 2006, 3:51:59 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r7350 r7351 37 37 38 38 #include "shell_command.h" 39 SHELL_COMMAND (orxoWeapon, Playable,addSomeWeapons_CHEAT);39 SHELL_COMMAND_STATIC(orxoWeapon, Playable, Playable::addSomeWeapons_CHEAT); 40 40 41 41 … … 133 133 if (weapon != NULL) 134 134 PRINTF(2)("Unable to add Weapon (%s::%s) to %s::%s\n", 135 weapon->getClassName(), weapon->getName(), this->getClassName(), this->getName());135 weapon->getClassName(), weapon->getName(), this->getClassName(), this->getName()); 136 136 else 137 137 PRINTF(2)("No weapon defined\n"); … … 187 187 void Playable::addSomeWeapons_CHEAT() 188 188 { 189 PRINTF(2)("ADDING WEAPONS - you cheater\n"); 190 this->addWeapon(Weapon::createWeapon(CL_HYPERBLASTER)); 191 this->addWeapon(Weapon::createWeapon(CL_TURRET)); 192 this->addWeapon(Weapon::createWeapon(CL_AIMING_TURRET)); 193 this->addWeapon(Weapon::createWeapon(CL_CANNON)); 194 this->addWeapon(Weapon::createWeapon(CL_TARGETING_TURRET)); 195 PRINTF(2)("ADDING WEAPONS FINISHED\n"); 189 if (State::getPlayer() != NULL) 190 { 191 Playable* playable = State::getPlayer()->getPlayable(); 192 if (playable != NULL) 193 { 194 PRINTF(2)("ADDING WEAPONS - you cheater\n"); 195 playable->addWeapon(Weapon::createWeapon(CL_HYPERBLASTER)); 196 playable->addWeapon(Weapon::createWeapon(CL_TURRET)); 197 playable->addWeapon(Weapon::createWeapon(CL_AIMING_TURRET)); 198 playable->addWeapon(Weapon::createWeapon(CL_CANNON)); 199 playable->addWeapon(Weapon::createWeapon(CL_TARGETING_TURRET)); 200 PRINTF(2)("ADDING WEAPONS FINISHED\n"); 201 } 202 } 196 203 } 197 204 -
trunk/src/world_entities/playable.h
r7350 r7351 49 49 inline WeaponManager& getWeaponManager() { return this->weaponMan; }; 50 50 void weaponConfigChanged(); 51 void addSomeWeapons_CHEAT();51 static void addSomeWeapons_CHEAT(); 52 52 53 53
Note: See TracChangeset
for help on using the changeset viewer.