Changeset 10631 in orxonox.OLD for branches/inputdevice/src/world_entities/script_triggers/action_trigger.cc
- Timestamp:
- Apr 12, 2007, 7:10:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/inputdevice/src/world_entities/script_triggers/action_trigger.cc
r10630 r10631 51 51 radius = 10; 52 52 invert = false; 53 actionScheduled = false; 53 54 54 55 if(root != NULL) … … 117 118 118 119 119 void ActionTrigger::tick( float timestep)120 void ActionTrigger::tick( float timestep ) 120 121 { 121 if( scriptFinished ) return;122 if( scriptFinished || !actionScheduled ) return; 122 123 123 124 if( this->target != NULL) … … 125 126 if( !invert && this->distance(target) < radius && actionScheduled) 126 127 { 127 //printf("Distance is %f \n", this->distance(target)); 128 executeAction(timestep); 128 executeScriptFunction(timestep); 129 129 scriptCalled = true; 130 130 return; 131 132 131 } 133 132 else if( invert && this->distance(target) > radius && actionScheduled) 134 133 { 135 execute Action(timestep);134 executeScriptFunction(timestep); 136 135 scriptCalled = true; 137 136 return;
Note: See TracChangeset
for help on using the changeset viewer.