Ticket #5811: INVALID_POSITION.diff

File INVALID_POSITION.diff, 1.3 KB (added by Freagarach, 4 years ago)

Naive implementation.

  • source/simulation2/helpers/Position.h

     
    1919#define INCLUDED_POSITION
    2020
    2121#include "maths/Fixed.h"
     22#include "maths/FixedVector3D.h"
    2223
    2324/**
    2425 * @file
     
    4041 */
    4142typedef CFixed_15_16 entity_angle_t;
    4243
     44static const CFixedVector3D INVALID_POSITION = CFixedVector3D();
     45
    4346#endif // INCLUDED_POSITION
  • source/simulation2/system/ComponentManager.cpp

     
    2020#include "ComponentManager.h"
    2121
    2222#include "lib/utf8.h"
     23#include "maths/FixedVector3D.h"
    2324#include "ps/CLogger.h"
    2425#include "ps/Filesystem.h"
    2526#include "ps/Profile.h"
     
    101102
    102103    m_ScriptInterface.SetGlobal("INVALID_ENTITY", (int)INVALID_ENTITY);
    103104    m_ScriptInterface.SetGlobal("INVALID_PLAYER", (int)INVALID_PLAYER);
     105    m_ScriptInterface.SetGlobal("INVALID_POSITION", (CFixedVector3D)INVALID_POSITION);
    104106    m_ScriptInterface.SetGlobal("SYSTEM_ENTITY", (int)SYSTEM_ENTITY);
    105107
    106108    m_ComponentsByInterface.resize(IID__LastNative);