forked from teamnwah/openmw-tes3coop
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
34 lines
494 B
C++
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();
|
|
}
|