forked from teamnwah/openmw-tes3coop
[Client] Fix use of DedicatedPlayers as targets for ConsoleCommand
This commit is contained in:
parent
502df7d9c1
commit
a639d3494a
1 changed files with 8 additions and 5 deletions
|
@ -470,13 +470,16 @@ void WorldEvent::runConsoleCommands(MWWorld::CellStore* cellStore)
|
|||
windowManager->setConsolePtr(static_cast<LocalPlayer*>(player)->getPlayerPtr());
|
||||
windowManager->executeCommandInConsole(consoleCommand);
|
||||
}
|
||||
else if (player != 0)
|
||||
else
|
||||
{
|
||||
player = PlayerList::getPlayer(guid);
|
||||
player = PlayerList::getPlayer(worldObject.guid);
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- running on player %s", player->npc.mName.c_str());
|
||||
windowManager->setConsolePtr(static_cast<DedicatedPlayer*>(player)->getPtr());
|
||||
windowManager->executeCommandInConsole(consoleCommand);
|
||||
if (player != 0)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- running on player %s", player->npc.mName.c_str());
|
||||
windowManager->setConsolePtr(static_cast<DedicatedPlayer*>(player)->getPtr());
|
||||
windowManager->executeCommandInConsole(consoleCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue