Skip to content

Commit

Permalink
WITCHER: Register objects with ObjectManager
Browse files Browse the repository at this point in the history
  • Loading branch information
vkremianskii authored and DrMcCoy committed Aug 28, 2018
1 parent b403b81 commit 3e3d365
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engines/witcher/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@

#include "src/common/util.h"
#include "src/common/error.h"
#include "src/common/uuid.h"

#include "src/aurora/dlgfile.h"

#include "src/aurora/nwscript/objectman.h"

#include "src/sound/sound.h"

#include "src/engines/aurora/util.h"
Expand All @@ -39,6 +42,8 @@ namespace Witcher {

Object::Object(ObjectType type) : _type(type),
_static(false), _usable(true), _area(0) {
_id = Common::generateIDNumber();
ObjectMan.registerObject(this);

_position [0] = 0.0f;
_position [1] = 0.0f;
Expand All @@ -50,6 +55,7 @@ Object::Object(ObjectType type) : _type(type),
}

Object::~Object() {
ObjectMan.unregisterObject(this);
}

ObjectType Object::getType() const {
Expand Down

0 comments on commit 3e3d365

Please sign in to comment.