diff options
| author | Jan <> | 2015-02-02 17:58:18 +0100 |
|---|---|---|
| committer | Jan <_> | 2015-07-10 17:51:43 +0200 |
| commit | ca61c54b9bd69af897e4cc9d4385137fb56fd11a (patch) | |
| tree | a4363f466cea6de48ca81fadc08273d58698d2ff /TemplePushing.c4s/System.c4g/Clonk.c | |
| parent | 32a9632fbca3dd7a88bd3154b84a3773af39c276 (diff) | |
| download | tempelschubsen-ca61c54b9bd69af897e4cc9d4385137fb56fd11a.tar.gz tempelschubsen-ca61c54b9bd69af897e4cc9d4385137fb56fd11a.zip | |
TemplePushingBeta.c4s
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 |
