From fd6f474c88b49da01cdf2062b782007b88a7e1ae Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 28 Jun 2007 19:14:29 +0000 Subject: (svn r10380) -Fix (r10364): when checking for unique names, only check vehicles that can have names, and skip inactive players. --- src/misc_cmd.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/misc_cmd.cpp') diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index 3a0448f84..830354c53 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -201,6 +201,7 @@ static bool IsUniqueCompanyName(const char *name) char buf[512]; FOR_ALL_PLAYERS(p) { + if (!p->is_active) continue; SetDParam(0, p->index); GetString(buf, STR_COMPANY_NAME, lastof(buf)); if (strcmp(buf, name) == 0) return false; @@ -245,6 +246,7 @@ static bool IsUniquePresidentName(const char *name) char buf[512]; FOR_ALL_PLAYERS(p) { + if (!p->is_active) continue; SetDParam(0, p->index); GetString(buf, STR_PLAYER_NAME, lastof(buf)); if (strcmp(buf, name) == 0) return false; -- cgit v1.2.3-54-g00ecf