- sorted zspecials.acs properly so one can find all the specials.

- added Polyobj_MoveToSpot action specials. They are functionally identical to Polyobj_MoveTo but get the target coordinate from a map spot instead.


SVN r2503 (trunk)
This commit is contained in:
Christoph Oelckers 2010-08-10 19:06:33 +00:00
parent 25cb3593ce
commit 482d7631f4
4 changed files with 30 additions and 12 deletions

View file

@ -57,7 +57,7 @@ DEFINE_SPECIAL(Line_SetBlocking, 55, 3, 3, 3)
DEFINE_SPECIAL(Line_SetTextureScale, 56, 5, 5, 5)
DEFINE_SPECIAL(Sector_SetPortal, 57, -1, -1, 5)
DEFINE_SPECIAL(Sector_CopyScroller, 58, -1, -1, 2)
DEFINE_SPECIAL(Polyobj_OR_MoveToSpot, 59, 3, 3, 3)
DEFINE_SPECIAL(Plat_PerpetualRaise, 60, 3, 3, 3)
DEFINE_SPECIAL(Plat_Stop, 61, 1, 1, 1)
DEFINE_SPECIAL(Plat_DownWaitUpStay, 62, 3, 3, 3)
@ -84,7 +84,7 @@ DEFINE_SPECIAL(ACS_Terminate, 82, 2, 2, 2)
DEFINE_SPECIAL(ACS_LockedExecute, 83, 5, 5, 5)
DEFINE_SPECIAL(ACS_ExecuteWithResult, 84, 1, 4, 4)
DEFINE_SPECIAL(ACS_LockedExecuteDoor, 85, 5, 5, 5)
DEFINE_SPECIAL(Polyobj_MoveToSpot, 86, 3, 3, 3)
DEFINE_SPECIAL(Polyobj_Stop, 87, 1, 1, 1)
DEFINE_SPECIAL(Polyobj_MoveTo, 88, 4, 4, 4)
DEFINE_SPECIAL(Polyobj_OR_MoveTo, 89, 4, 4, 4)
@ -114,7 +114,9 @@ DEFINE_SPECIAL(Plane_Copy, 118, -1, -1, 5)
DEFINE_SPECIAL(Thing_Damage, 119, 2, 3, 3)
DEFINE_SPECIAL(Radius_Quake, 120, 5, 5, 5) // Earthquake
DEFINE_SPECIAL(Line_SetIdentification, 121, -1, -1, 5)
DEFINE_SPECIAL(Thing_Move, 125, 2, 3, 3)
DEFINE_SPECIAL(Thing_SetSpecial, 127, 5, 5, 5)
DEFINE_SPECIAL(ThrustThingZ, 128, 4, 4, 4)
DEFINE_SPECIAL(UsePuzzleItem, 129, 2, 5, 5)

View file

@ -124,7 +124,16 @@ FUNC(LS_Polyobj_MoveTimes8)
FUNC(LS_Polyobj_MoveTo)
// Polyobj_MoveTo (po, speed, x, y)
{
return EV_MovePolyTo (ln, arg0, SPEED(arg1), arg2, arg3, false);
return EV_MovePolyTo (ln, arg0, SPEED(arg1), arg2 << FRACBITS, arg3 << FRACBITS, false);
}
FUNC(LS_Polyobj_MoveToSpot)
// Polyobj_MoveToSpot (po, speed, tid)
{
FActorIterator iterator (arg2);
AActor *spot = iterator.Next();
if (spot == NULL) return false;
return EV_MovePolyTo (ln, arg0, SPEED(arg1), spot->x, spot->y, false);
}
FUNC(LS_Polyobj_DoorSwing)
@ -166,7 +175,16 @@ FUNC(LS_Polyobj_OR_MoveTimes8)
FUNC(LS_Polyobj_OR_MoveTo)
// Polyobj_OR_MoveTo (po, speed, x, y)
{
return EV_MovePolyTo (ln, arg0, SPEED(arg1), arg2, arg3, true);
return EV_MovePolyTo (ln, arg0, SPEED(arg1), arg2 << FRACBITS, arg3 << FRACBITS, true);
}
FUNC(LS_Polyobj_OR_MoveToSpot)
// Polyobj_OR_MoveToSpot (po, speed, tid)
{
FActorIterator iterator (arg2);
AActor *spot = iterator.Next();
if (spot == NULL) return false;
return EV_MovePolyTo (ln, arg0, SPEED(arg1), spot->x, spot->y, true);
}
FUNC(LS_Polyobj_Stop)
@ -3049,8 +3067,8 @@ lnSpecFunc LineSpecials[256] =
/* 55 */ LS_Line_SetBlocking,
/* 56 */ LS_Line_SetTextureScale,
/* 57 */ LS_NOP, // Sector_SetPortal
/* 58 */ LS_NOP,
/* 59 */ LS_NOP,
/* 58 */ LS_NOP, // Sector_CopyScroller
/* 59 */ LS_Polyobj_OR_MoveToSpot,
/* 60 */ LS_Plat_PerpetualRaise,
/* 61 */ LS_Plat_Stop,
/* 62 */ LS_Plat_DownWaitUpStay,
@ -3077,7 +3095,7 @@ lnSpecFunc LineSpecials[256] =
/* 83 */ LS_ACS_LockedExecute,
/* 84 */ LS_ACS_ExecuteWithResult,
/* 85 */ LS_ACS_LockedExecuteDoor,
/* 86 */ LS_NOP,
/* 86 */ LS_Polyobj_MoveToSpot,
/* 87 */ LS_Polyobj_Stop,
/* 88 */ LS_Polyobj_MoveTo,
/* 89 */ LS_Polyobj_OR_MoveTo,

View file

@ -506,7 +506,7 @@ typedef enum
bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, bool overRide);
bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle, fixed_t dist, bool overRide);
bool EV_MovePolyTo (line_t *line, int polyNum, int speed, int x, int y, bool overRide);
bool EV_MovePolyTo (line_t *line, int polyNum, int speed, fixed_t x, fixed_t y, bool overRide);
bool EV_OpenPolyDoor (line_t *line, int polyNum, int speed, angle_t angle, int delay, int distance, podoortype_t type);
bool EV_StopPoly (int polyNum);

View file

@ -120,7 +120,7 @@ protected:
fixed_t m_xTarget;
fixed_t m_yTarget;
friend bool EV_MovePolyTo(line_t *line, int polyNum, int speed, int x, int y, bool overRide);
friend bool EV_MovePolyTo(line_t *line, int polyNum, int speed, fixed_t x, fixed_t y, bool overRide);
};
@ -605,10 +605,8 @@ void DMovePolyTo::Tick ()
//
//==========================================================================
bool EV_MovePolyTo(line_t *line, int polyNum, int speed, int ix, int iy, bool overRide)
bool EV_MovePolyTo(line_t *line, int polyNum, int speed, fixed_t targx, fixed_t targy, bool overRide)
{
fixed_t targx = ix << FRACBITS;
fixed_t targy = iy << FRACBITS;
int mirror;
DMovePolyTo *pe;
FPolyObj *poly;