- more script ID wrappers for sectors.

This commit is contained in:
Christoph Oelckers 2020-11-04 19:15:44 +01:00
parent aac5ab55a3
commit 25c93e65fc
2 changed files with 5 additions and 3 deletions

View file

@ -971,7 +971,8 @@ void operatesectors(int sn, DDukeActor *actor)
case ST_30_ROTATE_RISE_BRIDGE:
{
auto act = &hittype[sector[sn].hitag];
auto act = ScriptIndexToActor(sector[sn].hitag);
if (!act) break;
if (act->tempang == 0 || act->tempang == 256) callsound(sn, actor);
if (act->s.extra == 1) act->s.extra = 3;
else act->s.extra = 1;
@ -980,7 +981,8 @@ void operatesectors(int sn, DDukeActor *actor)
case ST_31_TWO_WAY_TRAIN:
{
auto act = &hittype[sector[sn].hitag];
auto act = ScriptIndexToActor(sector[sn].hitag);
if (!act) break;
if (act->temp_data[4] == 0)
act->temp_data[4] = 1;

View file

@ -179,7 +179,7 @@ int initspriteforspawn(DDukeActor* actj, int pn, const std::initializer_list<int
act->actorstayput = -1;
t[0] = t[1] = t[2] = t[3] = t[4] = t[5] = 0;
hittype[i].temp_actor = nullptr;
act->temp_actor = nullptr;
if (sp->cstat & 48)
if (!isIn(sp->picnum, excludes) && (sp->cstat & 48))