Added ability to set thing position in compatibility layer

This commit is contained in:
alexey.lysiuk 2018-04-16 14:30:21 +03:00
parent 3d1693558e
commit 87d164ee59
2 changed files with 17 additions and 0 deletions

View file

@ -375,6 +375,22 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetThingSkills)
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetThingXY)
{
PARAM_PROLOGUE;
PARAM_INT(thing);
PARAM_FLOAT(x);
PARAM_FLOAT(y);
if ((unsigned)thing < MapThingsConverted.Size())
{
auto& pos = MapThingsConverted[thing].pos;
pos.X = x;
pos.Y = y;
}
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetThingZ)
{
PARAM_PROLOGUE;

View file

@ -680,6 +680,7 @@ class LevelCompatibility play
private static native void AddSectorTag(int sector, int tag);
private static native void OffsetSectorPlane(int sector, int plane, double offset);
private static native void SetThingSkills(int thing, int skills);
private static native void SetThingXY(int thing, double x, double y);
private static native void SetThingZ(int thing, double z);
private static native void SetThingFlags(int thing, int flags);
private static native void SetVertex(uint vertex, double x, double y);