Changeset 10608 in orxonox.OLD for branches/scriptimprovements/src/world_entities/script_triggers/space_trigger.cc
- Timestamp:
- Mar 29, 2007, 5:50:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scriptimprovements/src/world_entities/script_triggers/space_trigger.cc
r10607 r10608 116 116 void SpaceTrigger::tick(float timestep) 117 117 { 118 if( this->getScriptFinished() ) return; 118 119 120 if(triggerRemains && this->getScriptCalled() ) 121 { 122 executeAction(timestep); 123 return; 124 } 125 126 if( this->target != NULL) 127 { 128 if( !invert && this->distance(target) < radius) 129 { 130 //printf("Distance is %f \n", this->distance(target)); 131 executeAction(timestep); 132 this->setScriptCalled(true); 133 return; 134 135 } 136 else if( invert && this->distance(target) > radius) 137 { 138 executeAction(timestep); 139 this->setScriptCalled(true); 140 return; 141 } 142 } 119 143 } 120 144
Note: See TracChangeset
for help on using the changeset viewer.