diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-14 18:42:47 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-14 18:42:47 +0000 |
| commit | 78c089c0eae503822c7f1025aefcf02529b13723 (patch) | |
| tree | 10c8767ef1006a09c9ca228770f1ce86b45cbccb /src/game/server/entity.cpp | |
| parent | a420eb543f8206730aebb80e60a625f7204694e4 (diff) | |
| download | zcatch-78c089c0eae503822c7f1025aefcf02529b13723.tar.gz zcatch-78c089c0eae503822c7f1025aefcf02529b13723.zip | |
last of the game server clean up. now it's done
Diffstat (limited to 'src/game/server/entity.cpp')
| -rw-r--r-- | src/game/server/entity.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/game/server/entity.cpp b/src/game/server/entity.cpp new file mode 100644 index 00000000..2cc7c8f7 --- /dev/null +++ b/src/game/server/entity.cpp @@ -0,0 +1,28 @@ + +#include <engine/e_server_interface.h> +#include "entity.hpp" +#include "gamecontext.hpp" + +////////////////////////////////////////////////// +// Entity +////////////////////////////////////////////////// +ENTITY::ENTITY(int objtype) +{ + this->objtype = objtype; + pos = vec2(0,0); + proximity_radius = 0; + + marked_for_destroy = false; + id = snap_new_id(); + + next_entity = 0; + prev_entity = 0; + prev_type_entity = 0; + next_type_entity = 0; +} + +ENTITY::~ENTITY() +{ + game.world.remove_entity(this); + snap_free_id(id); +} |