summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-10-03 11:38:19 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:11 +0000
commit393e5ec89e34f449a28bfd0f31324f10c1a9d0dd (patch)
tree51dfed927aaa8c6375a4d3c04a5d857dc9b869cf /src/game/g_client.c
parent5f037039de1180b04661f0003473496e84f88b8b (diff)
* (bug 3554) Make sure opened files get closed properly -- for real this time
* (bug 3446) Allow the last spawn to be deconstructed when cheats are enabled and g_markDeconstruct is not (Ben Millwood) * (bug 3560) PTRC can be used while the original client is connected * remove unused functions from src/game/g_ptr.c
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index d0f9349f..49ae26a9 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -890,9 +890,10 @@ static qboolean G_NonSegModel( const char *filename )
if( len < 0 )
return qfalse;
- if( len >= sizeof( text ) - 1 )
+ if( len == 0 || len >= sizeof( text ) - 1 )
{
- G_Printf( "File %s too long\n", filename );
+ trap_FS_FCloseFile( f );
+ G_Printf( "File %s is %s\n", filename, len == 0 ? "empty" : "too long" );
return qfalse;
}
@@ -1676,6 +1677,9 @@ void ClientDisconnect( int clientNum )
tent->s.clientNum = ent->s.clientNum;
}
+ if( ent->client->pers.connection )
+ ent->client->pers.connection->clientNum = -1;
+
G_LogPrintf( "ClientDisconnect: %i [%s] (%s) \"%s\"\n", clientNum,
ent->client->pers.ip, ent->client->pers.guid, ent->client->pers.netname );