Changeset 10265 in orxonox.OLD for branches/gui/src/world_entities/script_trigger.cc
- Timestamp:
- Jan 17, 2007, 4:51:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/world_entities/script_trigger.cc
r9869 r10265 60 60 scriptCalled = false; 61 61 scriptIsOk = false; 62 triggerRemains = true;62 triggerRemains = false; 63 63 addToScript = false; 64 64 this->activeOnCreation = false; … … 180 180 } 181 181 182 182 if(triggerRemains && scriptCalled) 183 183 { 184 184 executeAction(timestep); 185 185 return; 186 186 } 187 188 if( !invert && this->distance(target) < radius) 189 { 187 188 if( !invert && this->distance(target) < radius) 189 { 190 //printf("Distance is %f \n", this->distance(target)); 190 191 executeAction(timestep); 191 192 scriptCalled = true; … … 193 194 194 195 } 195 else if( invert && this->distance(target) > radius) 196 197 if( invert && this->distance(target) > radius) 196 198 { 197 199 executeAction(timestep); … … 207 209 void ScriptTrigger::executeAction(float timestep) 208 210 { 209 211 printf("Script %s called \n",this->functionName.c_str()); 210 212 if(scriptIsOk) 211 213 {
Note: See TracChangeset
for help on using the changeset viewer.