From: Mario Date: Sun, 6 Mar 2016 13:33:40 +0000 (+1000) Subject: Use Coord instead of Short for spawnpoint origins (potentially fixes effects on reall... X-Git-Tag: xonotic-v0.8.2~1149 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fde73029349f3dc80854dd019273c98185b12dc9;p=xonotic%2Fxonotic-data.pk3dir.git Use Coord instead of Short for spawnpoint origins (potentially fixes effects on really big maps) --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index d787dc0f5..8cc574518 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -696,9 +696,9 @@ NET_HANDLE(ENT_CLIENT_SPAWNPOINT, bool is_new) { float teamnum = (ReadByte() - 1); vector spn_origin; - spn_origin.x = ReadShort(); - spn_origin.y = ReadShort(); - spn_origin.z = ReadShort(); + spn_origin.x = ReadCoord(); + spn_origin.y = ReadCoord(); + spn_origin.z = ReadCoord(); //if(is_new) //{ @@ -751,9 +751,9 @@ NET_HANDLE(ENT_CLIENT_SPAWNEVENT, bool is_new) if(entnum) { - this.origin_x = ReadShort(); - this.origin_y = ReadShort(); - this.origin_z = ReadShort(); + this.origin_x = ReadCoord(); + this.origin_y = ReadCoord(); + this.origin_z = ReadCoord(); if(is_new) { diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 022e27608..0692d9088 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -15,9 +15,9 @@ bool SpawnPoint_Send(entity this, entity to, int sf) WriteHeader(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT); WriteByte(MSG_ENTITY, self.team); - WriteShort(MSG_ENTITY, self.origin.x); - WriteShort(MSG_ENTITY, self.origin.y); - WriteShort(MSG_ENTITY, self.origin.z); + WriteCoord(MSG_ENTITY, self.origin.x); + WriteCoord(MSG_ENTITY, self.origin.y); + WriteCoord(MSG_ENTITY, self.origin.z); return true; } @@ -31,9 +31,9 @@ bool SpawnEvent_Send(entity this, entity to, int sf) if(autocvar_g_spawn_alloweffects) { WriteByte(MSG_ENTITY, etof(self.owner)); - WriteShort(MSG_ENTITY, self.owner.origin.x); - WriteShort(MSG_ENTITY, self.owner.origin.y); - WriteShort(MSG_ENTITY, self.owner.origin.z); + WriteCoord(MSG_ENTITY, self.owner.origin.x); + WriteCoord(MSG_ENTITY, self.owner.origin.y); + WriteCoord(MSG_ENTITY, self.owner.origin.z); send = true; } else if((to == self.owner) || (IS_SPEC(to) && (to.enemy == self.owner)) )