You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3coop/apps/openmw-mp/BaseMgr.cpp

35 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();
}