X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fsv_turrets.qc;h=84b0c824908da1c96a49b618495b34fcbcb748f2;hp=fff1b3991576f178bcffa4b6b33015cbb4b43649;hb=76afe6b4bb64b3f349bcf8aeadd04d0b319a7d01;hpb=e0012447bfce1b551df3dc01b043655aa93dafad diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index fff1b3991..84b0c8249 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -1,6 +1,11 @@ #include "sv_turrets.qh" #ifdef SVQC #include +#include +#include +#include +#include +#include // Generic aiming vector turret_aim_generic(entity this) @@ -320,7 +325,6 @@ void turrets_setframe(entity this, float _frame, float client_only) bool turret_send(entity this, entity to, float sf) { - WriteHeader(MSG_ENTITY, ENT_CLIENT_TURRET); WriteByte(MSG_ENTITY, sf); if(sf & TNSF_SETUP) @@ -329,8 +333,7 @@ bool turret_send(entity this, entity to, float sf) WriteVector(MSG_ENTITY, this.origin); - WriteAngle(MSG_ENTITY, this.angles_x); - WriteAngle(MSG_ENTITY, this.angles_y); + WriteAngleVector2D(MSG_ENTITY, this.angles); } if(sf & TNSF_ANG) @@ -402,7 +405,7 @@ void load_unit_settings(entity ent, bool is_reload) ent.ammo_max *= ent.turret_scale_ammo; ent.ammo_recharge *= ent.turret_scale_ammo; ent.aim_speed *= ent.turret_scale_aim; - ent.health *= ent.turret_scale_health; + SetResourceExplicit(ent, RES_HEALTH, GetResource(ent, RES_HEALTH) * ent.turret_scale_health); ent.respawntime *= ent.turret_scale_respawn; ent.shot_dmg *= ent.turret_scale_damage; ent.shot_refire *= ent.turret_scale_refire; @@ -426,11 +429,11 @@ void turret_projectile_explode(entity this) this.event_damage = func_null; #ifdef TURRET_DEBUG float d; - d = RadiusDamage (this, this.owner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, DMG_NOWEP, NULL); + d = RadiusDamage (this, this.owner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.projectiledeathtype, DMG_NOWEP, NULL); this.owner.tur_debug_dmg_t_h = this.owner.tur_debug_dmg_t_h + d; this.owner.tur_debug_dmg_t_f = this.owner.tur_debug_dmg_t_f + this.owner.shot_dmg; #else - RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, DMG_NOWEP, NULL); + RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.projectiledeathtype, DMG_NOWEP, NULL); #endif delete(this); } @@ -472,7 +475,7 @@ entity turret_projectile(entity actor, Sound _snd, float _size, float _health, f IL_PUSH(g_projectiles, proj); IL_PUSH(g_bot_dodge, proj); proj.enemy = actor.enemy; - proj.totalfrags = _death; + proj.projectiledeathtype = _death; PROJECTILE_MAKETRIGGER(proj); if(_health) {