X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fturret%2Fewheel.qc;h=f0590f818b0c9928bdfe29f3452ed357640fa2ed;hb=5e813f65d212e2cfc5c32eae682c0a1b0c0f73da;hp=a72a9f016ca35f111b661d813dde11213bcc8354;hpb=b9671f63469586007314131f3f53728795c035cd;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index a72a9f016..f0590f818 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -133,7 +133,7 @@ void ewheel_move_idle(entity this) movelib_brake_simple(this, (autocvar_g_turrets_unit_ewheel_speed_stop)); } -spawnfunc(turret_ewheel) { if(!turret_initialize(this, TUR_EWHEEL)) remove(this); } +spawnfunc(turret_ewheel) { if(!turret_initialize(this, TUR_EWHEEL)) delete(this); } METHOD(EWheel, tr_think, void(EWheel thistur, entity it)) { @@ -184,7 +184,7 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it)) { entity e; - if(it.movetype == MOVETYPE_WALK) + if(it.move_movetype == MOVETYPE_WALK) { it.velocity = '0 0 0'; it.enemy = NULL; @@ -218,7 +218,7 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it)) it.iscreature = true; it.teleportable = TELEPORT_NORMAL; it.damagedbycontents = true; - it.movetype = MOVETYPE_WALK; + set_movetype(it, MOVETYPE_WALK); it.solid = SOLID_SLIDEBOX; it.takedamage = DAMAGE_AIM; it.idle_aim = '0 0 0'; @@ -247,8 +247,7 @@ void ewheel_draw(entity this) fixedmakevectors(this.angles); setorigin(this, this.origin + this.velocity * dt); - this.tur_head.angles += dt * this.tur_head.move_avelocity; - this.angles_y = this.move_angles_y; + this.tur_head.angles += dt * this.tur_head.avelocity; if (this.health < 127) if(random() < 0.05) @@ -258,9 +257,7 @@ void ewheel_draw(entity this) METHOD(EWheel, tr_setup, void(EWheel this, entity it)) { it.gravity = 1; - it.movetype = MOVETYPE_BOUNCE; - it.move_movetype = MOVETYPE_BOUNCE; - it.move_origin = it.origin; + set_movetype(it, MOVETYPE_BOUNCE); it.move_time = time; it.draw = ewheel_draw; }