Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 12, 2007, 7:10:23 PM (18 years ago)
Author:
snellen
Message:

Action Trigger finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/inputdevice/src/world_entities/script_triggers/action_trigger.cc

    r10630 r10631  
    5151  radius = 10;
    5252  invert = false;
     53  actionScheduled = false;
    5354 
    5455  if(root != NULL)
     
    117118
    118119
    119 void ActionTrigger::tick(float timestep)
     120void ActionTrigger::tick( float timestep )
    120121{
    121   if( scriptFinished ) return;
     122  if( scriptFinished || !actionScheduled ) return;
    122123
    123124  if( this->target != NULL)
     
    125126    if( !invert && this->distance(target) < radius && actionScheduled)
    126127    {
    127     //printf("Distance is %f \n", this->distance(target));
    128       executeAction(timestep);
     128      executeScriptFunction(timestep);
    129129      scriptCalled = true;
    130130      return;
    131 
    132131    }
    133132    else if( invert && this->distance(target) > radius  && actionScheduled)
    134133    {
    135       executeAction(timestep);
     134      executeScriptFunction(timestep);
    136135      scriptCalled = true;
    137136      return;
Note: See TracChangeset for help on using the changeset viewer.