Changeset 10374 in orxonox.OLD for trunk/src/world_entities/script_trigger.cc
- Timestamp:
- Jan 25, 2007, 11:27:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/script_trigger.cc
r10321 r10374 181 181 } 182 182 183 183 if(triggerRemains && scriptCalled) 184 184 { 185 185 executeAction(timestep); … … 190 190 { 191 191 if( !invert && this->distance(target) < radius) 192 { 193 //printf("Distance is %f \n", this->distance(target)); 194 executeAction(timestep); 195 scriptCalled = true; 196 return; 197 198 } 199 else if( invert && this->distance(target) > radius) 192 200 { 193 201 executeAction(timestep); 194 202 scriptCalled = true; 195 203 return; 196 197 } 198 else if( invert && this->distance(target) > radius) 199 { 200 executeAction(timestep); 201 scriptCalled = true; 202 return; 203 } 204 } 205 //else 206 //printf("SCRIPTTRIGGER: target out of range\n"); 207 204 } 205 } 208 206 } 209 207 … … 211 209 void ScriptTrigger::executeAction(float timestep) 212 210 { 213 214 211 if(scriptIsOk) 215 212 {
Note: See TracChangeset
for help on using the changeset viewer.