diff options
author | whiterandrek | 2018-03-28 18:50:43 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | a75aeb62eec1208482a04e401cc105adc1ac3a4d (patch) | |
tree | a33285411811cf36de0d5b5a9ff0e1025ccd3dd3 /engines | |
parent | 37dbe057a89d919ad61fa5c2e09c3b0415e91f2b (diff) | |
download | scummvm-rg350-a75aeb62eec1208482a04e401cc105adc1ac3a4d.tar.gz scummvm-rg350-a75aeb62eec1208482a04e401cc105adc1ac3a4d.tar.bz2 scummvm-rg350-a75aeb62eec1208482a04e401cc105adc1ac3a4d.zip |
PINK: fixes for Peril
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pink/archive.cpp | 3 | ||||
-rw-r--r-- | engines/pink/objects/actors/actor.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/engines/pink/archive.cpp b/engines/pink/archive.cpp index 919d5fc797..e3fab5342d 100644 --- a/engines/pink/archive.cpp +++ b/engines/pink/archive.cpp @@ -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: diff --git a/engines/pink/objects/actors/actor.cpp b/engines/pink/objects/actors/actor.cpp index ba270ff7a5..dc4e59f231 100644 --- a/engines/pink/objects/actors/actor.cpp +++ b/engines/pink/objects/actors/actor.cpp @@ -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 { |