mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Merge pull request #311 from TES3MP/0.6.1
Add hotfix commit for 0.6.1 from 10 Oct 2017
This commit is contained in:
commit
ec2c964ae1
1 changed files with 11 additions and 2 deletions
|
@ -29,8 +29,17 @@ Cell::Iterator Cell::end() const
|
||||||
|
|
||||||
void Cell::addPlayer(Player *player)
|
void Cell::addPlayer(Player *player)
|
||||||
{
|
{
|
||||||
auto it = find(player->cells.begin(), player->cells.end(), this);
|
// Ensure the player hasn't already been added
|
||||||
if (it == player->cells.end())
|
auto it = find(begin(), end(), player);
|
||||||
|
|
||||||
|
if (it != end())
|
||||||
|
{
|
||||||
|
LOG_APPEND(Log::LOG_INFO, "- Attempt to add %s to Cell %s again was ignored", player->npc.mName.c_str(), getDescription().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto it2 = find(player->cells.begin(), player->cells.end(), this);
|
||||||
|
if (it2 == player->cells.end())
|
||||||
{
|
{
|
||||||
LOG_APPEND(Log::LOG_INFO, "- Adding %s to Player %s", getDescription().c_str(), player->npc.mName.c_str());
|
LOG_APPEND(Log::LOG_INFO, "- Adding %s to Player %s", getDescription().c_str(), player->npc.mName.c_str());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue