]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Save changes temporarily so I can fix something in master
authorSamual Lenks <samual@xonotic.org>
Wed, 1 May 2013 18:51:26 +0000 (14:51 -0400)
committerSamual Lenks <samual@xonotic.org>
Wed, 1 May 2013 18:51:26 +0000 (14:51 -0400)
qcsrc/server/spawnpoints.qc

index c0846b74279f8042d4c745b0b36afcab8b2f2e7a..c45f357f6788e0751a133c43b95c0054a559f9e5 100644 (file)
@@ -1,10 +1,20 @@
 float Spawn_Send(entity to, float sf)
 {
        WriteByte(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);
+       WriteByte(MSG_ENTITY, sf);
+       
+       if(sf & 1)
+       {
+               WriteByte(MSG_ENTITY, self.team);
+               WriteShort(MSG_ENTITY, self.origin_x);
+               WriteShort(MSG_ENTITY, self.origin_y);
+               WriteShort(MSG_ENTITY, self.origin_z);
+       }
+       if(sf & 2)
+       {
+               WriteLong(MSG_ENTITY, self.last_spawn_time);
+       }
+       
        return TRUE;
 }
 
@@ -16,6 +26,9 @@ void spawnpoint_use()
                self.team = activator.team;
                some_spawn_has_been_used = 1;
        }
+       print("spawnpoint was used!\n");
+       self.last_spawn_time = time;
+       Spawn_Send_Think;
 }
 
 void relocate_spawnpoint()