- fudging for the broken FIRE animation.

Unfortunately the only thing that can be done here from inside the engine is to increase the likelihood of the animation actually starting.
Ideally the broken script should be replaced but with the way CON replacements are done this is not possible.
This commit is contained in:
Christoph Oelckers 2020-08-01 14:19:37 +02:00
parent 4332d02885
commit 9dac66b6f0
5 changed files with 14 additions and 0 deletions

View file

@ -260,6 +260,7 @@ int TILE_MENUBAR;
int TILE_ATOMICHEALTH;
int TILE_FLOORSLIME;
int TILE_JIBS6;
int TILE_FIRE;
int TILE_WATERBUBBLE;
int TILE_SMALLSMOKE;
int TILE_BLOODPOOL;

View file

@ -259,6 +259,7 @@ void initactorflags_d()
TILE_ATOMICHEALTH = ATOMICHEALTH;
TILE_FLOORSLIME = FLOORSLIME;
TILE_JIBS6 = JIBS6;
TILE_FIRE = FIRE;
TILE_WATERBUBBLE = WATERBUBBLE;
TILE_SMALLSMOKE = SMALLSMOKE;
TILE_BLOODPOOL = BLOODPOOL;

View file

@ -229,6 +229,7 @@ void initactorflags_r()
TILE_ATOMICHEALTH = ATOMICHEALTH;
TILE_FLOORSLIME = FLOORSLIME;
TILE_JIBS6 = JIBS6;
TILE_FIRE = FIRE;
TILE_WATERBUBBLE = WATERBUBBLE;
TILE_SMALLSMOKE = SMALLSMOKE;
TILE_BLOODPOOL = BLOODPOOL;

View file

@ -264,9 +264,19 @@ int ParseState::parse(void)
switch (*insptr)
{
case concmd_ifrnd:
{
insptr++;
// HACK ALERT! The fire animation uses a broken ifrnd setup to delay its start because original CON has no variables.
// But the chosen random value of 16/255 is too low and can cause delays of a second or more.
int spnum = sprite[g_i].picnum;
if (spnum == TILE_FIRE && g_t[4] == 0 && *insptr == 16)
{
parseifelse(rnd(64));
break;
}
parseifelse(rnd(*insptr));
break;
}
case concmd_ifcanshoottarget:
parseifelse(ifcanshoottarget(g_i, g_p, g_x));
break;

View file

@ -30,6 +30,7 @@ extern int TILE_MENUBAR;
extern int TILE_ATOMICHEALTH;
extern int TILE_FLOORSLIME;
extern int TILE_JIBS6;
extern int TILE_FIRE;
extern int TILE_WATERBUBBLE;
extern int TILE_SMALLSMOKE;
extern int TILE_BLOODPOOL;