Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5984


Ignore:
Timestamp:
Oct 22, 2009, 12:51:54 AM (15 years ago)
Author:
rgrieder
Message:

Fixed bug in InputManager that occurred when entering and leaving (or vice versa) the same InputState withing the same tick.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/steering/src/libraries/core/input/InputManager.cc

    r5929 r5984  
    631631                {
    632632                    // not scheduled for destruction
    633                     // prevents a state being added multiple times
     633                    // prevents a state from being added multiple times
    634634                    stateEnterRequests_.insert(it->second);
    635635                    return true;
    636636                }
    637637            }
     638            else if (this->stateLeaveRequests_.find(it->second) != this->stateLeaveRequests_.end())
     639            {
     640                // State already scheduled for leaving --> cancel
     641                this->stateLeaveRequests_.erase(this->stateLeaveRequests_.find(it->second));
     642            }
    638643        }
    639644        return false;
     
    658663                return true;
    659664            }
     665            else if (this->stateEnterRequests_.find(it->second) != this->stateEnterRequests_.end())
     666            {
     667                // State already scheduled for entering --> cancel
     668                this->stateEnterRequests_.erase(this->stateEnterRequests_.find(it->second));
     669            }
    660670        }
    661671        return false;
Note: See TracChangeset for help on using the changeset viewer.