summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/Clonk.c
diff options
context:
space:
mode:
authorJan <>2015-02-02 17:55:29 +0100
committerJan <_>2015-07-10 17:49:45 +0200
commit32a9632fbca3dd7a88bd3154b84a3773af39c276 (patch)
treea226b9404844a73c7229e9d13db993c86b5be2c1 /TemplePushing.c4s/System.c4g/Clonk.c
parent40fb3e5d61c44886b06d839a35adb0c11a5f918f (diff)
downloadtempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.tar.gz
tempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.zip
TemplePush v6.1.7601.18409.c4s
Diffstat (limited to 'TemplePushing.c4s/System.c4g/Clonk.c')
-rw-r--r--TemplePushing.c4s/System.c4g/Clonk.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/TemplePushing.c4s/System.c4g/Clonk.c b/TemplePushing.c4s/System.c4g/Clonk.c
index 2308576..8c395b4 100644
--- a/TemplePushing.c4s/System.c4g/Clonk.c
+++ b/TemplePushing.c4s/System.c4g/Clonk.c
@@ -1,6 +1,11 @@
+/* Clonk */
+
#strict 2
#appendto CLNK
+local rotateInJump;
+local removeOnDeath;
+
protected func ControlSpecial()
{
[$Push$|Image=CXIV]
@@ -22,6 +27,28 @@ protected func ControlSpecial()
if (GetLength(clonks) == 0) return 0;
// Randomly select clonk to be pushed
- Fling(clonks[Random(GetLength(clonks))], -1 + GetDir() * 2, -1);
+ var target = clonks[Random(GetLength(clonks))];
+ Fling(target, -1 + GetDir() * 2, -1);
+ target->SetKiller(GetOwner());
+
return 1;
}
+
+protected func ControlLeft()
+{
+ if (rotateInJump && GetAction() == "Jump") SetDir(DIR_Left);
+ return _inherited();
+}
+
+protected func ControlRight()
+{
+ if (rotateInJump && GetAction() == "Jump") SetDir(DIR_Right);
+ return _inherited();
+}
+
+protected func Death(int killedBy)
+{
+ var ret = _inherited(killedBy);
+ if (removeOnDeath) RemoveObject();
+ return ret;
+} \ No newline at end of file