Various bugfixes by Tobias Kuehnhammer (#5270)
- A stupid bug where bots re-trigger jumppads if they fell onto it. - A small "memset" bug concerning player animations. - Reward sounds were never cleared and thus they are played on a map restart. - Safer and more secure handling of disconnected clients and clients with malformed or illegal info strings. - first_gauntlet_hit.wav was not played (ops/ps) bug - capturelimit not hit (from OAX)
This commit is contained in:
parent
1af9c636a5
commit
56f16e10d6
11 changed files with 32 additions and 29 deletions
|
@ -722,6 +722,8 @@ void ClientUserinfoChanged( int clientNum ) {
|
|||
// check for malformed or illegal info strings
|
||||
if ( !Info_Validate(userinfo) ) {
|
||||
strcpy (userinfo, "\\name\\badinfo");
|
||||
// don't keep those clients and userinfo
|
||||
trap_DropClient(clientNum, "Invalid userinfo");
|
||||
}
|
||||
|
||||
// check for local client
|
||||
|
@ -938,7 +940,12 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) {
|
|||
return "Invalid password";
|
||||
}
|
||||
}
|
||||
|
||||
// if a player reconnects quickly after a disconnect, the client disconnect may never be called, thus flag can get lost in the ether
|
||||
if (ent->inuse) {
|
||||
G_LogPrintf("Forcing disconnect on active client: %i\n", ent-g_entities);
|
||||
// so lets just fix up anything that should happen on a disconnect
|
||||
ClientDisconnect(ent-g_entities);
|
||||
}
|
||||
// they can connect
|
||||
ent->client = level.clients + clientNum;
|
||||
client = ent->client;
|
||||
|
@ -1271,7 +1278,7 @@ void ClientDisconnect( int clientNum ) {
|
|||
G_RemoveQueuedBotBegin( clientNum );
|
||||
|
||||
ent = g_entities + clientNum;
|
||||
if ( !ent->client ) {
|
||||
if (!ent->client || ent->client->pers.connected == CON_DISCONNECTED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue