diff --git a/CMakeLists.txt b/CMakeLists.txt index c6c2081d9..3cb293185 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1968,6 +1968,7 @@ set_src(ENGINE_GFX GLOB src/engine/gfx image_manipulation.h ) set_src(GAME_SHARED GLOB src/game + alloc.h collision.cpp collision.h ddracechat.h @@ -2470,7 +2471,6 @@ if(SERVER) upnp.h ) set_src(GAME_SERVER GLOB_RECURSE src/game/server - alloc.h ddracechat.cpp ddracecommands.cpp entities/character.cpp diff --git a/src/game/server/alloc.h b/src/game/alloc.h similarity index 97% rename from src/game/server/alloc.h rename to src/game/alloc.h index 6ec1301c1..b4a76a9bd 100644 --- a/src/game/server/alloc.h +++ b/src/game/alloc.h @@ -1,7 +1,7 @@ /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ -#ifndef GAME_SERVER_ALLOC_H -#define GAME_SERVER_ALLOC_H +#ifndef GAME_ALLOC_H +#define GAME_ALLOC_H #include diff --git a/src/game/client/prediction/entity.h b/src/game/client/prediction/entity.h index 1083c6d33..2c7b75dff 100644 --- a/src/game/client/prediction/entity.h +++ b/src/game/client/prediction/entity.h @@ -3,23 +3,11 @@ #ifndef GAME_CLIENT_PREDICTION_ENTITY_H #define GAME_CLIENT_PREDICTION_ENTITY_H -#include "gameworld.h" #include -#define MACRO_ALLOC_HEAP() \ -public: \ - void *operator new(size_t Size) \ - { \ - void *p = malloc(Size); \ - mem_zero(p, Size); \ - return p; \ - } \ - void operator delete(void *pPtr) \ - { \ - free(pPtr); \ - } \ -\ -private: +#include + +#include "gameworld.h" class CEntity { diff --git a/src/game/server/entity.h b/src/game/server/entity.h index b7948b41a..311d3f0f9 100644 --- a/src/game/server/entity.h +++ b/src/game/server/entity.h @@ -5,7 +5,8 @@ #include -#include "alloc.h" +#include + #include "gameworld.h" class CCollision; diff --git a/src/game/server/player.h b/src/game/server/player.h index 7246079c5..799a04407 100644 --- a/src/game/server/player.h +++ b/src/game/server/player.h @@ -7,7 +7,8 @@ #include -#include "alloc.h" +#include + #include "teeinfo.h" #include