From: Mario Date: Wed, 14 Oct 2015 02:05:07 +0000 (+1000) Subject: Add an argument to SetMovedir X-Git-Tag: xonotic-v0.8.2~1822 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=26e4227521bef3540881c326dd68b546bef62bcd;p=xonotic%2Fxonotic-data.pk3dir.git Add an argument to SetMovedir --- diff --git a/qcsrc/common/triggers/func/button.qc b/qcsrc/common/triggers/func/button.qc index ab1cff538..0e2252130 100644 --- a/qcsrc/common/triggers/func/button.qc +++ b/qcsrc/common/triggers/func/button.qc @@ -114,7 +114,7 @@ When a button is touched, it moves some distance in the direction of it's angle, */ spawnfunc(func_button) { - SetMovedir (); + SetMovedir(self); if (!InitMovingBrushTrigger()) return; diff --git a/qcsrc/common/triggers/func/conveyor.qc b/qcsrc/common/triggers/func/conveyor.qc index b8c1310d8..73f22b99b 100644 --- a/qcsrc/common/triggers/func/conveyor.qc +++ b/qcsrc/common/triggers/func/conveyor.qc @@ -131,14 +131,14 @@ void conveyor_init() spawnfunc(trigger_conveyor) { - SetMovedir(); + SetMovedir(self); EXACTTRIGGER_INIT; conveyor_init(); } spawnfunc(func_conveyor) { - SetMovedir(); + SetMovedir(self); InitMovingBrushTrigger(); self.movetype = MOVETYPE_NONE; conveyor_init(); diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index 218a2ac5e..24fc6d64c 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -726,7 +726,7 @@ spawnfunc(func_door) if (self.spawnflags & SPAWNFLAGS_SILVER_KEY) self.itemkeys |= ITEM_KEY_BIT(1); - SetMovedir (); + SetMovedir(self); self.max_health = self.health; if (!InitMovingBrushTrigger()) diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index 931ff9cee..7e25751bb 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -364,7 +364,7 @@ void trigger_push_link() */ spawnfunc(trigger_push) { - SetMovedir (); + SetMovedir(self); EXACTTRIGGER_INIT; diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index af1cf7cc2..41bac7a43 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -445,24 +445,24 @@ InitTrigger ================ */ -void SetMovedir() -{SELFPARAM(); - if (self.movedir != '0 0 0') - self.movedir = normalize(self.movedir); +void SetMovedir(entity this) +{ + if(this.movedir != '0 0 0') + this.movedir = normalize(this.movedir); else { - makevectors (self.angles); - self.movedir = v_forward; + makevectors(this.angles); + this.movedir = v_forward; } - self.angles = '0 0 0'; + this.angles = '0 0 0'; } void InitTrigger() {SELFPARAM(); // trigger angles are used for one-way touches. An angle of 0 is assumed // to mean no restrictions, so use a yaw of 360 instead. - SetMovedir (); + SetMovedir(self); self.solid = SOLID_TRIGGER; SetBrushEntityModel(); self.movetype = MOVETYPE_NONE; @@ -474,7 +474,7 @@ void InitSolidBSPTrigger() {SELFPARAM(); // trigger angles are used for one-way touches. An angle of 0 is assumed // to mean no restrictions, so use a yaw of 360 instead. - SetMovedir (); + SetMovedir(self); self.solid = SOLID_BSP; SetBrushEntityModel(); self.movetype = MOVETYPE_NONE; // why was this PUSH? -div0 diff --git a/qcsrc/server/g_subs.qh b/qcsrc/server/g_subs.qh index 77f49ae5a..c9d1264c0 100644 --- a/qcsrc/server/g_subs.qh +++ b/qcsrc/server/g_subs.qh @@ -181,7 +181,7 @@ InitTrigger ================ */ -void SetMovedir(); +void SetMovedir(entity this); void InitTrigger();