Added entities_2d compile-time switch.

This commit is contained in:
Relintai 2019-04-20 19:09:22 +02:00
parent 032e6622f6
commit d46e7909f7
3 changed files with 15 additions and 2 deletions

3
SCsub
View File

@ -2,6 +2,9 @@ Import('env')
if ARGUMENTS.get('entity_mem_tools', 'no') == 'yes':
env.Append(CPPDEFINES=['ENTITY_MEM_TOOLS'])
if ARGUMENTS.get('entities_2d', 'no') == 'yes':
env.Append(CPPDEFINES=['ENTITIES_2D'])
module_env = env.Clone()

Binary file not shown.

View File

@ -29,6 +29,8 @@ class SpellDamageInfo;
class SpellCastInfo;
class EntityCreateInfo : public Object {
GDCLASS(EntityCreateInfo, Object);
public:
int get_guid() { return _guid; }
void set_guid(int value) { _guid = value; }
@ -123,9 +125,17 @@ enum PlayerSendFlags {
SEND_FLAG_AURAS,
};
#ifdef ENTITIES_2D
class Entity : public KinematicBody {
GDCLASS(Entity, KinematicBody)
GDCLASS(Entity, KinematicBody);
#else
class Entity : public KinematicBody {
GDCLASS(Entity, KinematicBody);
#endif
public:
Entity();
~Entity();