Changeset 7216 in orxonox.OLD for branches/std/src/world_entities/weapons/weapon.h
- Timestamp:
- Mar 12, 2006, 8:54:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/world_entities/weapons/weapon.h
r7207 r7216 111 111 inline long getCapability() const { return this->capability; }; 112 112 void setProjectileType(ClassID projectile); 113 void setProjectileTypeC(const char*projectile);113 void setProjectileTypeC(const std::string& projectile); 114 114 /** @returns The projectile's classID */ 115 115 inline ClassID getProjectileType() { return this->projectile; }; … … 132 132 // STATE CHANGES // 133 133 /** @param state the State to time @param duration the duration of the State */ 134 inline void setStateDuration(const char*state, float duration) { setStateDuration(charToState(state), duration); };134 inline void setStateDuration(const std::string& state, float duration) { setStateDuration(charToState(state), duration); }; 135 135 /** @param state the State to time @param duration the duration of the State */ 136 136 inline void setStateDuration(WeaponState state, float duration) { /*(state < WS_STATE_COUNT)?*/this->times[state] = duration; }; … … 149 149 150 150 void setActionSound(WeaponAction action, const std::string& soundFile); 151 /** @see void setActionSound(WeaponAction action, const char*soundFile); */152 void setActionSound(const char* action, const char*soundFile) { this->setActionSound(charToAction(action), soundFile); };151 /** @see void setActionSound(WeaponAction action, const std::string& soundFile); */ 152 void setActionSound(const std::string& action, const std::string& soundFile) { this->setActionSound(charToAction(action), soundFile); }; 153 153 154 154 Animation3D* getAnimation(WeaponState state, PNode* node = NULL); … … 176 176 177 177 // utility: 178 static WeaponAction charToAction(const char*action);178 static WeaponAction charToAction(const std::string& action); 179 179 static const char* actionToChar(WeaponAction action); 180 static WeaponState charToState(const char*state);180 static WeaponState charToState(const std::string& state); 181 181 static const char* stateToChar(WeaponState state); 182 182
Note: See TracChangeset
for help on using the changeset viewer.