Exposed P_ChangeSector as Sector.ChangeSector

This commit is contained in:
ZZYZX 2017-01-19 10:56:28 +02:00
parent 0376c8ba24
commit 928d0b2778
2 changed files with 25 additions and 1 deletions

View file

@ -6358,6 +6358,21 @@ void PIT_CeilingRaise(AActor *thing, FChangePosition *cpos)
//
//=============================================================================
//
DEFINE_ACTION_FUNCTION(_Sector, ChangeSector)
{
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
PARAM_INT(crunch);
PARAM_FLOAT(amt);
PARAM_INT(floorOrCeil);
PARAM_BOOL(isreset);
PARAM_BOOL(instant);
bool b = P_ChangeSector(self, crunch, amt, floorOrCeil, isreset, instant);
ACTION_RETURN_BOOL(b);
}
bool P_ChangeSector(sector_t *sector, int crunch, double amt, int floorOrCeil, bool isreset, bool instant)
{
FChangePosition cpos;

View file

@ -270,7 +270,7 @@ struct Sector native
SECF_NOMODIFY = SECF_SECRET|SECF_WASSECRET, // not modifiable by Sector_ChangeFlags
SECF_SPECIALFLAGS = SECF_DAMAGEFLAGS|SECF_FRICTION|SECF_PUSH, // these flags originate from 'special and must be transferrable by floor thinkers
}
enum EMoveResult
{
MOVE_OK,
@ -289,6 +289,15 @@ struct Sector native
native int Index();
enum EChangeSectorMode
{
CS_Floor = 0,
CS_Ceiling = 1,
CS_3DMidTex = 2
};
native bool ChangeSector(int crunch, double amt, EChangeSectorMode mode/*floorOrCeiling*/, bool isreset, bool instant);
native double, Sector, F3DFloor NextHighestCeilingAt(double x, double y, double bottomz, double topz, int flags = 0);
native double, Sector, F3DFloor NextLowestFloorAt(double x, double y, double z, int flags = 0, double steph = 0);