diff options
author | M. Kristall <mkpdev@gmail.com> | 2007-06-05 20:59:31 +0000 |
---|---|---|
committer | M. Kristall <mkpdev@gmail.com> | 2007-06-05 20:59:31 +0000 |
commit | ea05cee39314fc36467f5f9ca7b03a9f93eb4a1c (patch) | |
tree | de442807d263a177b3c7b127e5abdb9ab0ec9a97 /src | |
parent | c2b6ccea5432d961888b4b8b0dc201020f3a5280 (diff) |
(bug 3104) save the correct variables for players who disconnect and come back
(bug 3161) do not allow two clients to have the same name (Chris Schwarz)
(bug 3205) let aliens move eggs when humans only have one node (Roman Tetelman)
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_admin.c | 2 | ||||
-rw-r--r-- | src/game/g_buildable.c | 2 | ||||
-rw-r--r-- | src/game/g_ptr.c | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 73fe3060..104fdc45 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -302,7 +302,7 @@ qboolean G_admin_name_check( gentity_t *ent, char *name, char *err, int len ) continue; G_SanitiseName( client->pers.netname, testName ); - if( !Q_stricmp( name, testName ) ) + if( !Q_stricmp( name2, testName ) ) { Q_strncpyz( err, va( "The name '%s^7' is already in use", name ), len ); diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index cc5b4d37..c3d3415f 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2817,7 +2817,7 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance reason = IBE_NOROOM; break; } - else if( tent->s.modelindex == BA_A_SPAWN && level.numHumanSpawns <= 1 ) + else if( tent->s.modelindex == BA_A_SPAWN && level.numAlienSpawns <= 1 ) { reason = IBE_NOROOM; break; diff --git a/src/game/g_ptr.c b/src/game/g_ptr.c index 04e925ae..5344aa1d 100644 --- a/src/game/g_ptr.c +++ b/src/game/g_ptr.c @@ -61,8 +61,11 @@ void G_UpdatePTRConnection( gclient_t *client ) { if( client && client->pers.connection ) { - client->pers.connection->clientTeam = client->ps.stats[ STAT_PTEAM ]; - client->pers.connection->clientCredit = client->ps.persistant[ PERS_CREDIT ]; + client->pers.connection->clientTeam = client->pers.teamSelection; + if( client->pers.teamSelection == PTE_NONE ) + client->pers.connection->clientCredit = client->pers.savedCredit; + else + client->pers.connection->clientCredit = client->ps.persistant[ PERS_CREDIT ]; } } |