From: Samual Lenks Date: Tue, 7 May 2013 20:20:45 +0000 (-0400) Subject: Foobar stuffz X-Git-Tag: xonotic-v0.7.0~50^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2af5efacd03d896e219b17e868b879c63cd6e77a;p=xonotic%2Fxonotic-data.pk3dir.git Foobar stuffz --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 3d1a012d9..78aa98f8e 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -695,7 +695,7 @@ void Ent_ReadAccuracy(void) f *= 2; } } - +.float last_spawn_time; void Spawn_Draw(void) { pointparticles(particleeffectnum("EF_STARDUST"), self.origin, '0 0 2', bound(0, frametime, 0.1)); @@ -703,10 +703,22 @@ void Spawn_Draw(void) void Ent_ReadSpawnPoint(float is_new) { - self.team = ReadByte(); - self.origin_x = ReadShort(); - self.origin_y = ReadShort(); - self.origin_z = ReadShort(); + float sendflag = ReadByte(); + + if(sendflag & 1) + { + self.team = ReadByte(); + self.origin_x = ReadShort(); + self.origin_y = ReadShort(); + self.origin_z = ReadShort(); + } + if(sendflag & 2) + { + self.last_spawn_time = ReadLong(); + } + + if(self.last_spawn_time) { pointparticles(particleeffectnum("fireball_muzzleflash"), self.origin, '0 0 2', 1); self.last_spawn_time = 0; } + self.colormod = '200 0 0'; //colormapPaletteColor(self.team - 1, FALSE); diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 6dd97f44b..b84185e52 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -1,3 +1,6 @@ + +.float last_spawn_time; +.float send_spawn; float Spawn_Send(entity to, float sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT); @@ -20,14 +23,15 @@ float Spawn_Send(entity to, float sf) void Spawn_Think(void) { - self.nextthink = 0; if(self.send_spawn < 0) { + self.send_spawn = 0; self.SendFlags |= 1; } else { self.last_spawn_time = self.send_spawn; + self.send_spawn = 0; self.SendFlags |= 2; } } @@ -100,6 +104,7 @@ void relocate_spawnpoint() e.solid = SOLID_TRIGGER; } + self.send_spawn = -1; self.think = Spawn_Think; self.nextthink = time;