diff options
Diffstat (limited to 'TemplePushing.c4s/System.c4g/Clonk.c')
| -rw-r--r-- | TemplePushing.c4s/System.c4g/Clonk.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/TemplePushing.c4s/System.c4g/Clonk.c b/TemplePushing.c4s/System.c4g/Clonk.c index 8c395b4..c934938 100644 --- a/TemplePushing.c4s/System.c4g/Clonk.c +++ b/TemplePushing.c4s/System.c4g/Clonk.c @@ -1,11 +1,25 @@ /* Clonk */ #strict 2 + #appendto CLNK local rotateInJump; local removeOnDeath; +protected func ControlThrow(object byObj) +{ + // First check if the clonk already handles the throw control + var ret = _inherited(byObj); + if (ret) return ret; + + // Launch arrow from pack in inventory + var arrowPack = Contents(); + if (!arrowPack || !arrowPack->~IsArrowPack()) return 0; + arrowPack->Activate(this); + return 1; +} + protected func ControlSpecial() { [$Push$|Image=CXIV] @@ -21,8 +35,7 @@ protected func ControlSpecial() Find_ID(CLNK), Find_InRect(-10 + GetDir() * 20, 0, 10, 10), Find_OCF(OCF_Alive), - // Only include allied players' clonks if "friendly pushing" rule is present - Find_Or(Find_Func(FindObject(FYPG)), Find_Hostile(GetOwner()))); + Find_Hostile(GetOwner())); if (GetLength(clonks) == 0) return 0; @@ -34,15 +47,16 @@ protected func ControlSpecial() return 1; } + protected func ControlLeft() { - if (rotateInJump && GetAction() == "Jump") SetDir(DIR_Left); + if (rotateInJump && GetAction() == "Jump" || GetAction() == "Tumble") SetDir(DIR_Left); return _inherited(); } protected func ControlRight() { - if (rotateInJump && GetAction() == "Jump") SetDir(DIR_Right); + if (rotateInJump && GetAction() == "Jump" || GetAction() == "Tumble") SetDir(DIR_Right); return _inherited(); } @@ -51,4 +65,9 @@ protected func Death(int killedBy) var ret = _inherited(killedBy); if (removeOnDeath) RemoveObject(); return ret; +} + +public func QueryCatchBlow(object arrow) +{ + return arrow->GetOwner() == GetOwner(); }
\ No newline at end of file |
