From 37dbe057a89d919ad61fa5c2e09c3b0415e91f2b Mon Sep 17 00:00:00 2001 From: whiterandrek Date: Wed, 28 Mar 2018 18:10:02 +0300 Subject: PINK: fixed sideEffect and choosing of handler --- engines/pink/objects/handlers/handler.cpp | 2 +- engines/pink/objects/side_effect.cpp | 2 +- engines/pink/pink.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/pink/objects/handlers/handler.cpp b/engines/pink/objects/handlers/handler.cpp index ed553a1939..0e9261695c 100644 --- a/engines/pink/objects/handlers/handler.cpp +++ b/engines/pink/objects/handlers/handler.cpp @@ -39,7 +39,7 @@ void Handler::deserialize(Archive &archive) { bool Handler::isSuitable(LeadActor *actor) { for (int i = 0; i < _conditions.size(); ++i) { - if (_conditions[i]->evaluate(actor)){ + if (!_conditions[i]->evaluate(actor)){ return false; } } diff --git a/engines/pink/objects/side_effect.cpp b/engines/pink/objects/side_effect.cpp index 8e6fb5eb36..516a509138 100644 --- a/engines/pink/objects/side_effect.cpp +++ b/engines/pink/objects/side_effect.cpp @@ -88,7 +88,7 @@ void SideEffectGameVariable::toConsole() { void SideEffectModuleVariable::execute(LeadActor *actor) { - actor->getPage()->setVariable(_name, _value); + actor->getPage()->getModule()->setVariable(_name, _value); } void SideEffectModuleVariable::toConsole() { diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp index ac1060e748..a4b603dcef 100644 --- a/engines/pink/pink.cpp +++ b/engines/pink/pink.cpp @@ -76,6 +76,7 @@ Common::Error PinkEngine::init() { // TODO load cursor + _orb.loadGame(this); const Common::String empty; initModule(_modules[0]->getName(), kLoadingNewGame, empty); -- cgit v1.2.3