summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s
diff options
context:
space:
mode:
authorJan <>2015-02-05 17:39:12 +0100
committerJan <_>2015-07-10 18:42:38 +0200
commit37840d8a4e8aa7275748a5a72da1f68d93d7e3ab (patch)
treebb0a421376385076265dad7733130643a8808e50 /TemplePushing.c4s
parent51683b8ea980566c1adb7ad5a5836807be8cfd67 (diff)
downloadtempelschubsen-37840d8a4e8aa7275748a5a72da1f68d93d7e3ab.tar.gz
tempelschubsen-37840d8a4e8aa7275748a5a72da1f68d93d7e3ab.zip
Repair OCF_CrewMember check in snowball and include script of the old snowball
Diffstat (limited to 'TemplePushing.c4s')
-rw-r--r--TemplePushing.c4s/Misc.c4d/TSnowball.c4d/Script.c66
1 files changed, 8 insertions, 58 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/TSnowball.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/TSnowball.c4d/Script.c
index c99f5b3..6fef017 100644
--- a/TemplePushing.c4s/Misc.c4d/TSnowball.c4d/Script.c
+++ b/TemplePushing.c4s/Misc.c4d/TSnowball.c4d/Script.c
@@ -1,63 +1,13 @@
/*-- Schneeball --*/
-#strict
-#include ICE1
-
-protected func Hit() {
- CastPXS("Snow", 100, 20);
- RemoveObject();
- return(1);
-}
-
-protected func Departure(thrower) {
- var proc = GetProcedure(thrower);
- var comd = GetComDir(thrower);
-
- if (GetOCF() & OCF_CrewMember())
- {
- // Ablegen -> Abbruch
- if (GetPlrDownDouble(GetOwner(thrower)))
- // Nur Ablegen in der Luft mit Befehlsrichtung? Luftwurf erlauben!
- if (proc ne "FLIGHT" || GetComDir(thrower) == COMD_None)
- return(0);
-
- // Ablegen im stehenden Hangeln -> Abbruch
- if (proc eq "HANGLE" && comd == COMD_None)
- return(0);
-
- // Ablegen im Schwimmen / Klettern -> Abbruch
- if (proc eq "SWIM" || proc eq "SCALE")
- return(0);
-
- // Wurfrichtung rausfinden
- var dir;
- // Nach Befehlsrichtung, wenn sinnvolle Werte vorhanden
- if (comd == COMD_Left() || comd == COMD_Right()) {
- if (comd == COMD_Left()) dir = -1;
- if (comd == COMD_Right()) dir = +1;
- }
- // sonst nach Blickrichtung
- else {
- if (GetDir(thrower) == DIR_Left()) dir = -1;
- else dir = +1;
- }
+#strict 2
- // Wurfgeschwindigkeiten berechnen
- var x_dir = dir * GetPhysical("Throw", 0, thrower)/1000 + GetXDir(thrower) / 3;
- var y_dir = -30;
-
- if (!x_dir) return(0);
-
- // Position anpassen
- SetPosition(GetX() + x_dir / 5, GetY() - 2 + GetYDir(thrower) / 2);
+#include ICE1
+#include SNWB
- // Geschwindigkeit setzen
- SetXDir(x_dir);
- SetYDir(y_dir);
-
- Sound("Arrow");
- }
+protected func Departure(object container)
+{
+ // Throw only if the container was a clonk
+ if (!(container->GetOCF() & OCF_CrewMember)) return 1;
+ return _inherited(container);
}
-
-func IsAlchemContainer() { return(true); }
-func AlchemProcessTime() { return(100); }