fixed amb1591 - mods like IOS:S which, in listen server mode add bots before the player, caused crashes in SM
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402050
This commit is contained in:
@@ -379,14 +379,14 @@ void ConCmdManager::InternalDispatch(const CCommand &command)
|
||||
/* On a listen server, sometimes the server host's client index can be set as 0.
|
||||
* So index 1 is passed to the command callback to correct this potential problem.
|
||||
*/
|
||||
if (client == 0 && !engine->IsDedicatedServer())
|
||||
if (!engine->IsDedicatedServer())
|
||||
{
|
||||
pHook->pf->PushCell(1);
|
||||
} else {
|
||||
pHook->pf->PushCell(client);
|
||||
client = g_Players.ListenClient();
|
||||
}
|
||||
|
||||
pHook->pf->PushCell(client);
|
||||
pHook->pf->PushCell(args);
|
||||
|
||||
if (pHook->pf->Execute(&tempres) == SP_ERROR_NONE)
|
||||
{
|
||||
if (tempres > result)
|
||||
|
||||
Reference in New Issue
Block a user