Scenario effects: Use Scenario and not Scenario->GetPrototype() as this()

qteditor
Günther Brammer 2016-05-04 03:37:10 +02:00
parent f927717458
commit 408ac90cd7
3 changed files with 3 additions and 3 deletions

View File

@ -726,7 +726,7 @@ bool C4Game::Execute() // Returns true if the game is over
EXEC_S( ExecObjects(); , ExecObjectsStat )
EXEC_S_DR( C4Effect::Execute(ScriptEngine.GetPropList(), &ScriptEngine.pGlobalEffects);
C4Effect::Execute(GameScript.GetPropList(), &GameScript.pScenarioEffects);
C4Effect::Execute(GameScript.ScenPropList.getPropList(), &GameScript.pScenarioEffects);
, GEStats , "GEEx\0");
EXEC_S_DR( PXS.Execute(); , PXSStat , "PXSEx")
EXEC_S_DR( MassMover.Execute(); , MassMoverStat , "MMvEx")

View File

@ -53,7 +53,7 @@ C4Effect ** FnGetEffectsFor(C4PropList * pTarget)
{
if (pTarget == ScriptEngine.GetPropList())
return &ScriptEngine.pGlobalEffects;
if (pTarget == GameScript.ScenPrototype.getPropList() || pTarget == GameScript.ScenPropList.getPropList())
if (pTarget == GameScript.ScenPropList.getPropList())
return &GameScript.pScenarioEffects;
C4Object * Obj = pTarget->GetObject();
if (!Obj)

View File

@ -39,7 +39,7 @@ C4Effect ** FnGetEffectsFor(C4PropList * pTarget)
{
if (pTarget == ScriptEngine.GetPropList())
return &ScriptEngine.pGlobalEffects;
if (pTarget == GameScript.ScenPrototype.getPropList() || pTarget == GameScript.ScenPropList.getPropList())
if (pTarget == GameScript.ScenPropList.getPropList())
return &GameScript.pScenarioEffects;
if (pTarget) throw C4AulExecError("Only global and scenario effects are supported");
return &ScriptEngine.pGlobalEffects;