fix: use real teams when joining the games

This commit is contained in:
jeefo 2024-01-31 13:04:02 +03:00
commit 80e59c2c24
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
3 changed files with 29 additions and 15 deletions

View file

@ -304,6 +304,14 @@ public:
return util.getClient (indexOfPlayer (ent)).team;
}
// gets the player team (real in ffa)
int getRealTeam (edict_t *ent) {
if (isNullEntity (ent)) {
return Team::Unassigned;
}
return util.getClient (indexOfPlayer (ent)).team2;
}
// sets the precache to uninitialize
void setUnprecached () {
m_precached = false;