- operatesectors.

This commit is contained in:
Christoph Oelckers 2020-10-23 19:20:46 +02:00
parent 326ca9e172
commit 7635fc9ad6

View file

@ -972,24 +972,23 @@ void operatesectors(int sn, int ii)
break; break;
case ST_30_ROTATE_RISE_BRIDGE: case ST_30_ROTATE_RISE_BRIDGE:
j = sector[sn].hitag; {
if (hittype[j].tempang == 0 || auto act = &hittype[sector[sn].hitag];
hittype[j].tempang == 256) if (act->tempang == 0 || act->tempang == 256) callsound(sn, actor);
callsound(sn, ii); if (act->s.extra == 1) act->s.extra = 3;
if (sprite[j].extra == 1) else act->s.extra = 1;
sprite[j].extra = 3;
else sprite[j].extra = 1;
break; break;
}
case ST_31_TWO_WAY_TRAIN: case ST_31_TWO_WAY_TRAIN:
{
auto act = &hittype[sector[sn].hitag];
if (act->temp_data[4] == 0)
act->temp_data[4] = 1;
j = sector[sn].hitag; callsound(sn, actor);
if (hittype[j].temp_data[4] == 0)
hittype[j].temp_data[4] = 1;
callsound(sn, ii);
break; break;
}
case ST_26_SPLITTING_ST_DOOR: //The split doors case ST_26_SPLITTING_ST_DOOR: //The split doors
i = getanimationgoal(anim_ceilingz, sn); i = getanimationgoal(anim_ceilingz, sn);
if (i == -1) //if the door has stopped if (i == -1) //if the door has stopped
@ -997,10 +996,10 @@ void operatesectors(int sn, int ii)
haltsoundhack = 1; haltsoundhack = 1;
sptr->lotag &= 0xff00; sptr->lotag &= 0xff00;
sptr->lotag |= ST_22_SPLITTING_DOOR; sptr->lotag |= ST_22_SPLITTING_DOOR;
operatesectors(sn, ii); operatesectors(sn, actor);
sptr->lotag &= 0xff00; sptr->lotag &= 0xff00;
sptr->lotag |= ST_9_SLIDING_ST_DOOR; sptr->lotag |= ST_9_SLIDING_ST_DOOR;
operatesectors(sn, ii); operatesectors(sn, actor);
sptr->lotag &= 0xff00; sptr->lotag &= 0xff00;
sptr->lotag |= ST_26_SPLITTING_ST_DOOR; sptr->lotag |= ST_26_SPLITTING_ST_DOOR;
} }