- Timestamp:
- Dec 7, 2008, 4:18:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/orxonox/gamestates/GSLevel.cc
r2344 r2350 65 65 { 66 66 RegisterObject(GSLevel); 67 68 this->ccKeybind_ = 0; 69 this->ccTkeybind_ = 0; 70 this->ccSetTimeFactor_ = 0; 71 67 72 setConfigValues(); 68 73 } … … 142 147 { 143 148 // destroy console commands 144 delete this->ccKeybind_; 145 delete this->ccSetTimeFactor_; 146 delete this->ccTkeybind_; 149 if (this->ccKeybind_) 150 { 151 delete this->ccKeybind_; 152 this->ccKeybind_ = 0; 153 } 154 if (this->ccSetTimeFactor_) 155 { 156 delete this->ccSetTimeFactor_; 157 this->ccSetTimeFactor_ = 0; 158 } 159 if (this->ccTkeybind_) 160 { 161 delete this->ccTkeybind_; 162 this->ccTkeybind_ = 0; 163 } 147 164 148 165 // this call will delete every BaseObject! … … 159 176 160 177 if (this->radar_) 178 { 161 179 delete this->radar_; 180 this->radar_ = 0; 181 } 162 182 163 183 if (this->cameraManager_) 184 { 164 185 delete this->cameraManager_; 186 this->cameraManager_ = 0; 187 } 165 188 166 189 if (this->levelManager_) 190 { 167 191 delete this->levelManager_; 192 this->levelManager_ = 0; 193 } 168 194 169 195 if (this->playerManager_) 196 { 170 197 delete this->playerManager_; 198 this->playerManager_ = 0; 199 } 171 200 172 201 if (Core::showsGraphics()) … … 175 204 InputManager::getInstance().requestDestroyState("game"); 176 205 if (this->keyBinder_) 206 { 177 207 delete this->keyBinder_; 208 this->keyBinder_ = 0; 209 } 178 210 } 179 211 }
Note: See TracChangeset
for help on using the changeset viewer.