X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fsv_turrets.qc;h=d5191698f6215222706fe5475ddd21b38a26fe4a;hb=0a980f57412cf2253cfd73c8c01a26fb04c87189;hp=d26405da49f7e213f939e7b9b901848d1b72edaf;hpb=c4230403a60e672acde0b6dfa32ca67f56879183;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index d26405da4..d5191698f 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -193,8 +193,8 @@ void turret_die(entity this) { tur.tr_death(tur, this); - remove(this.tur_head); - remove(this); + delete(this.tur_head); + delete(this); } else { @@ -440,7 +440,7 @@ void turret_projectile_explode(entity this) #else RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL); #endif - remove(this); + delete(this); } void turret_projectile_touch(entity this, entity toucher) @@ -474,7 +474,7 @@ entity turret_projectile(entity actor, Sound _snd, float _size, float _health, f setthink(proj, turret_projectile_explode); settouch(proj, turret_projectile_touch); proj.nextthink = time + 9; - proj.move_movetype = MOVETYPE_FLYMISSILE; + set_movetype(proj, MOVETYPE_FLYMISSILE); proj.velocity = normalize(actor.tur_shotdir_updated + randomvec() * actor.shot_spread) * actor.shot_speed; proj.flags = FL_PROJECTILE; proj.enemy = actor.enemy; @@ -1199,7 +1199,7 @@ void turrets_manager_think(entity this) if (autocvar_g_turrets_reloadcvars == 1) { - FOREACH_ENTITY(IS_TURRET(it), { + FOREACH_ENTITY_FLAGS(turret_flags, TUR_FLAG_ISTURRET, { load_unit_settings(it, true); Turret tur = get_turretinfo(it.m_id); tur.tr_think(tur, it); @@ -1329,7 +1329,7 @@ bool turret_initialize(entity this, Turret tur) this.ammo_recharge *= this.ticrate; this.solid = SOLID_BBOX; this.takedamage = DAMAGE_AIM; - this.move_movetype = MOVETYPE_NOCLIP; + set_movetype(this, MOVETYPE_NOCLIP); this.view_ofs = '0 0 0'; this.turret_firecheckfunc = turret_firecheck; this.event_damage = turret_damage;