X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fnades%2Fnet.qc;h=1fdf5fd7aad1a5e2ef0e85c68d326da0fb6845bc;hp=ea78745808fea382bd298841bd5cfb325452e237;hb=f8fe0e4aa8dad544f243ae997dfeb9cdccd55ee2;hpb=b0210c08a287ad4631e16ddf3a83a0b0c546283f diff --git a/qcsrc/common/mutators/mutator/nades/net.qc b/qcsrc/common/mutators/mutator/nades/net.qc index ea78745808..1fdf5fd7aa 100644 --- a/qcsrc/common/mutators/mutator/nades/net.qc +++ b/qcsrc/common/mutators/mutator/nades/net.qc @@ -1,6 +1,6 @@ #include "net.qh" -#ifndef MENUQC +#ifdef GAMEQC #include "nades.qh" @@ -32,7 +32,7 @@ void orb_setup(entity e) e.draw = orb_draw; IL_PUSH(g_drawables, e); - e.health = 255; + SetResourceAmountExplicit(e, RESOURCE_HEALTH, 255); set_movetype(e, MOVETYPE_NONE); e.solid = SOLID_NOT; e.drawmask = MASK_NORMAL; @@ -50,13 +50,9 @@ NET_HANDLE(Nade_Orb, bool isNew) Net_Accept(Nade_Orb); int sf = ReadByte(); if (sf & 1) { - this.origin_x = ReadCoord(); - this.origin_y = ReadCoord(); - this.origin_z = ReadCoord(); + this.origin = ReadVector(); setorigin(this, this.origin); - this.colormod_x = ReadCoord(); - this.colormod_y = ReadCoord(); - this.colormod_z = ReadCoord(); + this.colormod = ReadVector(); this.orb_lifetime = ReadByte(); this.orb_radius = ReadShort(); this.ltime = time + ReadByte()/10.0; @@ -74,13 +70,9 @@ bool orb_send(entity this, entity to, int sf) WriteHeader(channel, Nade_Orb); WriteByte(channel, sf); if (sf & 1) { - WriteCoord(channel, this.origin.x); - WriteCoord(channel, this.origin.y); - WriteCoord(channel, this.origin.z); + WriteVector(channel, this.origin); - WriteCoord(channel, this.colormod.x); - WriteCoord(channel, this.colormod.y); - WriteCoord(channel, this.colormod.z); + WriteVector(channel, this.colormod); WriteByte(channel, this.orb_lifetime); //WriteByte(MSG_ENTITY, this.ltime - time + 1);