mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- getanimationgoal.
This commit is contained in:
parent
baf36a321b
commit
5e66a3331d
5 changed files with 15 additions and 14 deletions
|
@ -3503,7 +3503,7 @@ void handle_se08(DDukeActor *actor, bool checkhitag1)
|
|||
}
|
||||
j = 1;
|
||||
}
|
||||
else j = getanimationgoal(anim_ceilingz, s->sectnum);
|
||||
else j = getanimationgoal(anim_ceilingz, s->sector());
|
||||
|
||||
if (j >= 0)
|
||||
{
|
||||
|
@ -3592,7 +3592,7 @@ void handle_se10(DDukeActor* actor, const int* specialtags)
|
|||
{
|
||||
if (specialtags) for (int i = 0; specialtags[i]; i++)
|
||||
{
|
||||
if (s->sector()->lotag == specialtags[i] && getanimationgoal(anim_ceilingz, s->sectnum) >= 0)
|
||||
if (s->sector()->lotag == specialtags[i] && getanimationgoal(anim_ceilingz, s->sector()) >= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -4342,7 +4342,7 @@ void handle_se22(DDukeActor* actor)
|
|||
auto sc = actor->getSector();
|
||||
if (t[1])
|
||||
{
|
||||
if (getanimationgoal(anim_ceilingz, t[0]) >= 0)
|
||||
if (getanimationgoal(anim_ceilingz, §or[t[0]]) >= 0)
|
||||
sc->ceilingz += sc->extra * 9;
|
||||
else t[1] = 0;
|
||||
}
|
||||
|
|
|
@ -59,11 +59,11 @@ void ballreturn(DDukeActor *ball)
|
|||
|
||||
void pinsectorresetdown(int sect)
|
||||
{
|
||||
int j = getanimationgoal(anim_ceilingz, sect);
|
||||
auto sec = §or[sect];
|
||||
int j = getanimationgoal(anim_ceilingz, sec);
|
||||
|
||||
if (j == -1)
|
||||
{
|
||||
auto sec = §or[sect];
|
||||
j = sec->floorz;
|
||||
setanimation(sec, anim_ceilingz, sec, j, 64);
|
||||
}
|
||||
|
@ -71,11 +71,11 @@ void pinsectorresetdown(int sect)
|
|||
|
||||
int pinsectorresetup(int sect)
|
||||
{
|
||||
int j = getanimationgoal(anim_ceilingz, sect);
|
||||
auto sec = §or[sect];
|
||||
int j = getanimationgoal(anim_ceilingz, sec);
|
||||
|
||||
if (j == -1)
|
||||
{
|
||||
auto sec = §or[sect];
|
||||
j = nextsectorneighborzptr(sec, sec->ceilingz, -1, -1)->ceilingz;
|
||||
setanimation(sec, anim_ceilingz, sec, j, 64);
|
||||
return 1;
|
||||
|
|
|
@ -150,7 +150,7 @@ void operateforcefields_common(DDukeActor* s, int low, const std::initializer_li
|
|||
void operatemasterswitches(int lotag);
|
||||
void operatesectors(sectortype* s, DDukeActor* i);
|
||||
void hud_input(int playerNum);
|
||||
int getanimationgoal(int animtype, int animindex);
|
||||
int getanimationgoal(int animtype, sectortype* animindex);
|
||||
bool isanearoperator(int lotag);
|
||||
bool isanunderoperator(int lotag);
|
||||
int setanimation(sectortype* animsect, int animtype, walltype* animtarget, int thegoal, int thevel);
|
||||
|
|
|
@ -3569,7 +3569,7 @@ void processinput_r(int snum)
|
|||
if (psectlotag == ST_17_PLATFORM_UP || (isRRRA() && psectlotag == ST_18_ELEVATOR_DOWN))
|
||||
{
|
||||
int tmp;
|
||||
tmp = getanimationgoal(anim_floorz, p->cursectnum);
|
||||
tmp = getanimationgoal(anim_floorz, p->cursector());
|
||||
if (tmp >= 0)
|
||||
{
|
||||
if (!S_CheckActorSoundPlaying(pact, 432))
|
||||
|
|
|
@ -375,11 +375,12 @@ void doanimations(void)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int getanimationgoal(int animtype, int animtarget)
|
||||
int getanimationgoal(int animtype, sectortype* animtargetp)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
j = -1;
|
||||
int animtarget = sectnum(animtargetp);
|
||||
for (i = animatecnt - 1; i >= 0; i--)
|
||||
if (animtype == animatetype[i] && animtarget == animatetarget[i])
|
||||
{
|
||||
|
@ -620,7 +621,7 @@ static void handle_st15(sectortype* sptr, DDukeActor* actor)
|
|||
|
||||
static void handle_st16(sectortype* sptr, DDukeActor* actor)
|
||||
{
|
||||
int i = getanimationgoal(anim_floorz, sectnum(sptr));
|
||||
int i = getanimationgoal(anim_floorz, sptr);
|
||||
sectortype* sectp;
|
||||
|
||||
if (i == -1)
|
||||
|
@ -648,7 +649,7 @@ static void handle_st16(sectortype* sptr, DDukeActor* actor)
|
|||
|
||||
static void handle_st18(sectortype* sptr, DDukeActor* actor)
|
||||
{
|
||||
int i = getanimationgoal(anim_floorz, sectnum(sptr));
|
||||
int i = getanimationgoal(anim_floorz, sptr);
|
||||
|
||||
if (i == -1)
|
||||
{
|
||||
|
@ -751,7 +752,7 @@ REDODOOR:
|
|||
|
||||
static void handle_st21(sectortype* sptr, DDukeActor* actor)
|
||||
{
|
||||
int i = getanimationgoal(anim_floorz, sectnum(sptr));
|
||||
int i = getanimationgoal(anim_floorz, sptr);
|
||||
int j;
|
||||
if (i >= 0)
|
||||
{
|
||||
|
@ -998,7 +999,7 @@ void operatesectors(sectortype* sptr, DDukeActor *actor)
|
|||
break;
|
||||
}
|
||||
case ST_26_SPLITTING_ST_DOOR: //The split doors
|
||||
i = getanimationgoal(anim_ceilingz, sectnum(sptr));
|
||||
i = getanimationgoal(anim_ceilingz, sptr);
|
||||
if (i == -1) //if the door has stopped
|
||||
{
|
||||
haltsoundhack = 1;
|
||||
|
|
Loading…
Reference in a new issue