Kalitos said in Contents of the GSc file "_clientids" !Question:
Ox_ I agree with you, although since you mentioned the gsc dump search, I got on it, and if you talk about ".clientid", the game does refer to it, but it directly includes "player.clientid". On the other hand, if we search for level.clientid, we only see that it refers to a single file "_clientids.gsc". It's strange.
The level.clientid part doesn't seem very interesting or relevant, it just increases and then gives the next player the next number.
But each player getting their own clientid field is that interesting part.
Searching for uses of that field (the field owner by a player, not the level) in patch_mp comes back with 70 matches (few of them in dev blocks though) across 14 different gscs.
Sass said in Contents of the GSc file "_clientids" !Question:
I know the file existed back in CoD4, and wasn't even used back then IIRC.
To clarify, player.clientid's do indeed exist and is (somewhat) used in the game. However this file doesn't handle them at all as you can already tell.
If you replace the _clientids gsc with e.g. this
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;;)
{
self waittill("spawned_player");
self iprintln(isDefined(self.clientid));
}
}
You'll see that that field indeed doesn't exist if we patch _clientids to not create it.
(As opposed to that field working just as expected if we don't patch _clientids)
Makes me wonder how come we're not breaking the functionality in those aforementioned 15 different gscs.
Or perhaps we are, but the functionality there isn't essential. I cba'd to study/test that.