X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Fplatforms.qc;h=09e733000f21dc4582627f670a766af704545de8;hp=c1f481f8af515a262c516ac2b56c3ea698d22148;hb=2f215c603bf1b4dd44b9d166180f535c88602e9f;hpb=17b2adabf26ae062a323bb0d2016bf2eea6aea14 diff --git a/qcsrc/common/triggers/platforms.qc b/qcsrc/common/triggers/platforms.qc index c1f481f8a..09e733000 100644 --- a/qcsrc/common/triggers/platforms.qc +++ b/qcsrc/common/triggers/platforms.qc @@ -1,3 +1,4 @@ +#include "platforms.qh" void generic_plat_blocked(entity this, entity blocker) { #ifdef SVQC @@ -23,7 +24,7 @@ void plat_spawn_inside_trigger(entity this) trigger = spawn(); settouch(trigger, plat_center_touch); - trigger.movetype = MOVETYPE_NONE; + set_movetype(trigger, MOVETYPE_NONE); trigger.solid = SOLID_TRIGGER; trigger.enemy = this; @@ -53,7 +54,7 @@ void plat_spawn_inside_trigger(entity this) } // otherwise, something is fishy... - remove(trigger); + delete(trigger); objerror(this, "plat_spawn_inside_trigger: platform has odd size or lip, can't spawn"); } @@ -62,8 +63,8 @@ void plat_hit_top(entity this) _sound (this, CH_TRIGGER_SINGLE, this.noise1, VOL_BASE, ATTEN_NORM); this.state = 1; - SUB_THINK(this, plat_go_down); - this.SUB_NEXTTHINK = this.SUB_LTIME + 3; + setthink(this, plat_go_down); + this.nextthink = this.ltime + 3; } void plat_hit_bottom(entity this) @@ -104,7 +105,7 @@ void plat_center_touch(entity this, entity toucher) if (this.enemy.state == 2) { plat_go_up(this.enemy); } else if (this.enemy.state == 1) - this.enemy.SUB_NEXTTHINK = this.enemy.SUB_LTIME + 1; + this.enemy.nextthink = this.enemy.ltime + 1; } void plat_outside_touch(entity this, entity toucher) @@ -128,13 +129,8 @@ void plat_outside_touch(entity this, entity toucher) void plat_trigger_use(entity this, entity actor, entity trigger) { -#ifdef SVQC if (getthink(this)) return; // already activated -#elif defined(CSQC) - if(this.move_think) - return; -#endif plat_go_down(this); }