]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Foobar stuffz
authorSamual Lenks <samual@xonotic.org>
Tue, 7 May 2013 20:20:45 +0000 (16:20 -0400)
committerSamual Lenks <samual@xonotic.org>
Tue, 7 May 2013 20:20:45 +0000 (16:20 -0400)
qcsrc/client/Main.qc
qcsrc/server/spawnpoints.qc

index 3d1a012d94620bf8d9d75298118500312edc649d..78aa98f8ee4b1493bcc43cf65ebc444fcae4f8b9 100644 (file)
@@ -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);
 
index 6dd97f44b81cd12bd3b880c81c942500e2b9a416..b84185e52eae3e6ed7b19b59a60352ea2616dc77 100644 (file)
@@ -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;