- added a new flag for non-teleporting items.

This commit is contained in:
Christoph Oelckers 2022-01-19 08:20:40 +01:00
parent fc94fb9651
commit 2468debe34
5 changed files with 182 additions and 190 deletions

View file

@ -1955,20 +1955,11 @@ void movetransports_d(void)
warpspriteto = 1;
}
if (warpspriteto) switch (act2->spr.picnum)
if (warpspriteto)
{
if (actorflag(act2, SFLAG_NOTELEPORT)) continue;
switch (act2->spr.picnum)
{
case TRANSPORTERSTAR:
case TRANSPORTERBEAM:
case TRIPBOMB:
case BULLETHOLE:
case WATERSPLASH2:
case BURNING:
case BURNING2:
case FIRE:
case FIRE2:
case TOILETWATER:
case LASERLINE:
continue;
case PLAYERONWATER:
if (sectlotag == 2)
{
@ -2064,6 +2055,7 @@ void movetransports_d(void)
break;
}
}
}
break;
}

View file

@ -1639,16 +1639,11 @@ void movetransports_r(void)
warpspriteto = 1;
}
if (warpspriteto) switch (act2->spr.picnum)
if (warpspriteto)
{
if (actorflag(act2, SFLAG_NOTELEPORT)) continue;
switch (act2->spr.picnum)
{
case TRANSPORTERSTAR:
case TRANSPORTERBEAM:
case BULLETHOLE:
case WATERSPLASH2:
case BURNING:
case FIRE:
case MUD:
continue;
case PLAYERONWATER:
if (sectlotag == ST_2_UNDERWATER)
{
@ -1770,6 +1765,7 @@ void movetransports_r(void)
break;
}
}
}
break;
}

View file

@ -322,6 +322,7 @@ enum sflags_t
SFLAG_HITRADIUS_FLAG1 = 0x02000000,
SFLAG_HITRADIUS_FLAG2 = 0x04000000,
SFLAG_CHECKSLEEP = 0x08000000,
SFLAG_NOTELEPORT = 0x10000000,
};

View file

@ -207,6 +207,8 @@ void initactorflags_d()
setflag(SFLAG_HITRADIUS_FLAG1, { BOX, TREE1, TREE2, TIRE, CONE });
setflag(SFLAG_HITRADIUS_FLAG2, { TRIPBOMB, QUEBALL, STRIPEBALL, DUKELYINGDEAD });
setflag(SFLAG_CHECKSLEEP, { RUBBERCAN, EXPLODINGBARREL, WOODENHORSE, HORSEONSIDE, CANWITHSOMETHING, FIREBARREL, NUKEBARREL, NUKEBARRELDENTED, NUKEBARRELLEAKED, TRIPBOMB });
setflag(SFLAG_NOTELEPORT, { TRANSPORTERSTAR, TRANSPORTERBEAM, TRIPBOMB, BULLETHOLE, WATERSPLASH2, BURNING, BURNING2, FIRE, FIRE2, TOILETWATER, LASERLINE });
if (isWorldTour())
{

View file

@ -237,6 +237,7 @@ void initactorflags_r()
setflag(SFLAG_HITRADIUS_FLAG1, { BOX, TREE1, TREE2, TIRE });
setflag(SFLAG_HITRADIUS_FLAG2, { QUEBALL, STRIPEBALL, BOWLINGPIN, DUKELYINGDEAD });
setflag(SFLAG_CHECKSLEEP, { RUBBERCAN, EXPLODINGBARREL, WOODENHORSE, HORSEONSIDE, CANWITHSOMETHING, FIREBARREL, NUKEBARREL, NUKEBARRELDENTED, NUKEBARRELLEAKED, TRIPBOMB, EGG });
setflag(SFLAG_NOTELEPORT, { TRANSPORTERSTAR, TRANSPORTERBEAM, BULLETHOLE, WATERSPLASH2, BURNING, FIRE, MUD });
// Animals were not supposed to have this, but due to a coding bug the logic was unconditional for everything in the game.
for (auto& ainf : gs.actorinfo)