openmw-tes3coop/apps/openmw-mp/BaseMgr.cpp
David Cernat 176aa62b15 Merge pull request #446 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Script/Functions/Cells.cpp
	apps/openmw-mp/Script/Functions/Cells.hpp
	apps/openmw-mp/Script/Functions/Worldstate.cpp
	apps/openmw-mp/Script/Functions/Worldstate.hpp
	apps/openmw-mp/Script/ScriptFunctions.hpp
	apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp
	apps/openmw/mwmp/processors/player/ProcessorPlayerMap.hpp
	components/openmw-mp/Base/BasePlayer.hpp
	components/openmw-mp/Packets/Player/PacketPlayerMap.hpp
	components/openmw-mp/Packets/Worldstate/PacketWorldMap.cpp
2018-06-07 23:23:19 +03:00

34 lines
494 B
C++

//
// Created by koncord on 02.01.18.
//
#include "BaseMgr.hpp"
#include "Player.hpp"
#include "Worldstate.hpp"
BaseMgr::BaseMgr(Player *player) : player(player), changed(false)
{
}
BaseMgr::BaseMgr(Worldstate *worldstate) : worldstate(worldstate), changed(false)
{
}
void BaseMgr::update()
{
if (!changed)
return;
changed = false;
processUpdate();
}
void BaseMgr::setChanged()
{
changed = true;
if (player != nullptr)
player->addToUpdateQueue();
}