mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
- made SP_TAG2 a function with an actor parameter.
This commit is contained in:
parent
5be1bc4de7
commit
397d9b0d84
21 changed files with 109 additions and 143 deletions
|
@ -103,27 +103,26 @@ void SetRotatorActive(DSWActor* actor)
|
|||
DoRotatorSetInterp(actor);
|
||||
|
||||
// play activate sound
|
||||
DoSoundSpotMatch(SP_TAG2(sp), 1, SOUND_OBJECT_TYPE);
|
||||
DoSoundSpotMatch(SP_TAG2(actor), 1, SOUND_OBJECT_TYPE);
|
||||
|
||||
SET(u->Flags, SPR_ACTIVE);
|
||||
u->Tics = 0;
|
||||
|
||||
// moving to the OFF position
|
||||
if (r->tgt == 0)
|
||||
VatorSwitch(SP_TAG2(sp), OFF);
|
||||
VatorSwitch(SP_TAG2(actor), false);
|
||||
else
|
||||
VatorSwitch(SP_TAG2(sp), ON);
|
||||
VatorSwitch(SP_TAG2(actor), true);
|
||||
}
|
||||
|
||||
void SetRotatorInactive(DSWActor* actor)
|
||||
{
|
||||
USERp u = actor->u();
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
DoRotatorStopInterp(actor);
|
||||
|
||||
// play inactivate sound
|
||||
DoSoundSpotMatch(SP_TAG2(sp), 2, SOUND_OBJECT_TYPE);
|
||||
DoSoundSpotMatch(SP_TAG2(actor), 2, SOUND_OBJECT_TYPE);
|
||||
|
||||
RESET(u->Flags, SPR_ACTIVE);
|
||||
}
|
||||
|
@ -155,7 +154,7 @@ void DoRotatorMatch(PLAYERp pp, short match, bool manual)
|
|||
{
|
||||
fsp = &actor->s();
|
||||
|
||||
if (SP_TAG1(actor) == SECT_ROTATOR && SP_TAG2(fsp) == match)
|
||||
if (SP_TAG1(actor) == SECT_ROTATOR && SP_TAG2(actor) == match)
|
||||
{
|
||||
fu = actor->u();
|
||||
|
||||
|
@ -212,7 +211,7 @@ bool TestRotatorMatchActive(short match)
|
|||
{
|
||||
fsp = &actor->s();
|
||||
|
||||
if (SP_TAG1(actor) == SECT_ROTATOR && SP_TAG2(fsp) == match)
|
||||
if (SP_TAG1(actor) == SECT_ROTATOR && SP_TAG2(actor) == match)
|
||||
{
|
||||
fu = actor->u();
|
||||
|
||||
|
@ -323,7 +322,7 @@ int DoRotator(DSWActor* actor)
|
|||
// If ang is CLOSED then
|
||||
if (r->pos == 0)
|
||||
{
|
||||
short match = SP_TAG2(sp);
|
||||
short match = SP_TAG2(actor);
|
||||
|
||||
// new tgt is OPEN (open)
|
||||
r->tgt = r->open_dest;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue