X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fonslaught%2Fcl_controlpoint.qc;h=a03e5b3353f8b6156eac2d8012ff5e0af9d2c96a;hb=95a5a2479a35e264473e8ba3fc4e584553da42b3;hp=013479242bb1b0a5a69857f635ed8b324b09f83f;hpb=12354d764a576f55a290ba11d9f34ccf4e3930d0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/cl_controlpoint.qc b/qcsrc/common/gamemodes/gamemode/onslaught/cl_controlpoint.qc index 013479242..a03e5b335 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/cl_controlpoint.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/cl_controlpoint.qc @@ -104,7 +104,7 @@ void cpicon_damage(entity this, float hp) setsize(this, CPICON_MIN, CPICON_MAX); } -void cpicon_construct(entity this) +void cpicon_construct(entity this, bool isnew) { this.netname = "Control Point Icon"; @@ -117,15 +117,15 @@ void cpicon_construct(entity this) setmodel(this.icon_realmodel, MDL_Null); setorigin(this.icon_realmodel, this.origin); setsize(this.icon_realmodel, CPICON_MIN, CPICON_MAX); - this.icon_realmodel.move_movetype = MOVETYPE_NOCLIP; + set_movetype(this.icon_realmodel, MOVETYPE_NOCLIP); this.icon_realmodel.solid = SOLID_NOT; } if(this.iscaptured) { this.icon_realmodel.solid = SOLID_BBOX; } - this.move_movetype = MOVETYPE_NOCLIP; + set_movetype(this, MOVETYPE_NOCLIP); this.solid = SOLID_NOT; - this.move_movetype = MOVETYPE_NOCLIP; + set_movetype(this, MOVETYPE_NOCLIP); this.move_time = time; this.drawmask = MASK_NORMAL; this.alpha = 1; @@ -133,6 +133,9 @@ void cpicon_construct(entity this) this.cp_origin = this.origin; this.cp_bob_origin = '0 0 0.1'; this.cp_bob_spd = 0; + + if(isnew) + IL_PUSH(g_drawables, this); } .vector glowmod; @@ -159,9 +162,7 @@ NET_HANDLE(ENT_CLIENT_CONTROLPOINT_ICON, bool isnew) if(sf & CPSF_SETUP) { - this.origin_x = ReadCoord(); - this.origin_y = ReadCoord(); - this.origin_z = ReadCoord(); + this.origin = ReadVector(); setorigin(this, this.origin); this.health = ReadByte(); @@ -174,7 +175,7 @@ NET_HANDLE(ENT_CLIENT_CONTROLPOINT_ICON, bool isnew) this.count = (this.health - this.max_health) * frametime; cpicon_changeteam(this); - cpicon_construct(this); + cpicon_construct(this, isnew); } if(sf & CPSF_STATUS)