PINK: fixes for Peril

This commit is contained in:
whiterandrek 2018-03-28 18:50:43 +03:00 committed by Eugene Sandulenko
parent 37dbe057a8
commit a75aeb62ee
2 changed files with 5 additions and 3 deletions

View File

@ -210,9 +210,8 @@ static Object* createObject(int objectId){
case kHandlerStartPage:
return new HandlerStartPage;
case kHandlerTimer:
return new HandlerTimer;
case kHandlerTimerActions:
return new HandlerTimerActions;
return new HandlerTimerActions; // hack for Peril, but behavior is correct
case kHandlerTimerSequences:
return new HandlerTimerSequences;
case kHandlerUseClick:

View File

@ -45,10 +45,13 @@ Sequencer *Actor::getSequencer() const {
}
Action *Actor::findAction(const Common::String &name) {
return *Common::find_if(_actions.begin(), _actions.end(), [&name]
Action ** action = Common::find_if(_actions.begin(), _actions.end(), [&name]
(Action* action) {
return name == action->getName();
});;
if (!action)
return nullptr;
return *action;
}
GamePage *Actor::getPage() const {