]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge remote-tracking branch 'origin/master' into samual/respawn_improvements
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index ecc2000d7ccae32447fa4e78e75460a26e8f1f5a..9843033a1df20e49011c8852d22fb5fbd3ed1f14 100644 (file)
@@ -696,6 +696,34 @@ void Ent_ReadAccuracy(void)
        }
 }
 
+void Spawn_Draw(void)
+{
+       pointparticles(particleeffectnum("EF_STARDUST"), self.origin, '0 0 2', bound(0, frametime, 0.1));
+}
+
+void Ent_ReadSpawnPoint(float is_new)
+{
+       self.team = ReadByte();
+       self.origin_x = ReadShort();
+       self.origin_y = ReadShort();
+       self.origin_z = ReadShort();
+
+       //self.colormod = colormapPaletteColor(self.team - 1, FALSE);
+
+       //setsize(self, PL_MIN, PL_MAX);
+
+       //droptofloor();
+
+       //self.mdl = "models/domination/dom_unclaimed.md3";
+       //precache_model(self.mdl);
+       //setmodel(self, self.mdl);
+       self.drawmask = MASK_NORMAL;
+       self.movetype = MOVETYPE_NOCLIP;
+       self.draw = Spawn_Draw;
+
+       print(ftos(is_new), " - read a spawnpoint at ", vtos(self.origin), ", bitches.\n");
+}
+
 // CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.
 // The only parameter reflects if the entity is "new" to the client, meaning it just came into the client's PVS.
 void Ent_RadarLink();
@@ -781,7 +809,9 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break;
                case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;  
                case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;
+               case ENT_CLIENT_SPAWNPOINT: Ent_ReadSpawnPoint(bIsNewEntity); break;
                case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break;
+
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
                        error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));