SERVER: Properly hide disconnected players

This commit is contained in:
Steam Deck User 2023-01-11 10:21:16 -05:00
parent b58b25de5e
commit 6d8202b8e5
2 changed files with 7 additions and 0 deletions

View file

@ -144,6 +144,7 @@ void() precaches =
precache_model ("models/sprites/revive_white.spr"); precache_model ("models/sprites/revive_white.spr");
precache_model ("models/sprites/sprkle.spr"); precache_model ("models/sprites/sprkle.spr");
precache_model ("models/sprites/lightning.spr"); precache_model ("models/sprites/lightning.spr");
precache_model ("models/sprites/null.spr");
precache_model ("models/way/current_way.spr"); precache_model ("models/way/current_way.spr");
precache_model ("models/way/current_way_door.spr"); precache_model ("models/way/current_way_door.spr");
precache_model ("models/way/last_way.spr"); precache_model ("models/way/last_way.spr");

View file

@ -664,6 +664,12 @@ void() ClientDisconnect =
bprint(PRINT_HIGH, " has left the game.\n"); bprint(PRINT_HIGH, " has left the game.\n");
player_count--; player_count--;
UpdatePlayerCount(player_count); UpdatePlayerCount(player_count);
self.classname = "disconnected";
self.solid = SOLID_NOT;
self.movetype = MOVETYPE_TOSS;
self.nextthink = -1;
setmodel(self, "models/sprites/null.spr");
}; };