Ladder: CanNotBeClimbed callback provides the clonk

Certain ladders (in an expansion pack) should not be climbable, but this depends on the clonk that wants to climb on the ladder. Added the clonk as a second parameter to the callback, in order to not mess up the callback structure of other external packs.
qteditor
Mark 2016-07-10 22:11:35 +02:00
parent 2127e78db1
commit 3bb4e7b45f
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public func FxIntSearchLadderTimer(object target, proplist effect, int time)
for (ladder in FindObjects(Find_AtRect(-5, -10, 10, 8), Find_Func("IsLadder"), Find_NoContainer(), Find_Layer(GetObjectLayer())))
{
// Don't climb ladders that are blocked.
if (ladder->~CanNotBeClimbed() || IsBlockedLadder(ladder))
if (ladder->~CanNotBeClimbed(false, this) || IsBlockedLadder(ladder))
continue;
SetAction("Climb");
@ -207,7 +207,7 @@ public func FxIntClimbControlTimer(object target, effect fx, int time)
{
if (GetAction() != "Climb" || Contained())
return FX_Execute_Kill;
if (!fx.ladder || fx.ladder->~CanNotBeClimbed(true))
if (!fx.ladder || fx.ladder->~CanNotBeClimbed(true, this))
{
AddLadderBlock(fx.ladder, 5);
SetAction("Jump");