Changeset 7863 for code/trunk/src/orxonox/worldentities
- Timestamp:
- Feb 12, 2011, 1:09:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/pawns/Spectator.cc
r7862 r7863 43 43 { 44 44 extern const std::string __CC_fire_name; 45 extern const std::string __CC_suicide_name; 45 46 46 47 CreateFactory(Spectator); … … 154 155 155 156 /** 156 @brief Changes the keybind mode of the fire command to OnPress.157 @brief Changes the behavior of some console commands. 157 158 */ 158 159 void Spectator::startLocalHumanControl() … … 162 163 // change keybind mode of fire command to OnPress to avoid firing after respawn 163 164 ModifyConsoleCommand(__CC_fire_name).keybindMode(KeybindMode::OnPress); 165 166 // disable suicide 167 ModifyConsoleCommand(__CC_suicide_name).pushFunction(&prototype::void__void); 164 168 } 165 169 166 170 /** 167 @brief Changes the keybind mode of the fire command back to OnHold.171 @brief Changes the behavior of some console commands back to the original state. 168 172 */ 169 173 void Spectator::stopLocalHumanControl() … … 174 178 // as soon as the player releases and presses the button again, the helper function will be called which changes the keybind mode back to OnHold 175 179 ModifyConsoleCommand(__CC_fire_name).pushFunction(&Spectator::resetFireCommand).keybindMode(KeybindMode::OnPress); 180 181 // enable suicide 182 ModifyConsoleCommand(__CC_suicide_name).popFunction(); 176 183 } 177 184
Note: See TracChangeset
for help on using the changeset viewer.