Fix Spelunky

This commit is contained in:
GenericHeroGuy 2025-03-17 00:30:06 +01:00
parent de415e3331
commit b77a66d8bb
3 changed files with 17 additions and 2 deletions

View file

@ -1093,7 +1093,7 @@ void T_ThwompSector(thwomp_t *thwomp)
INT32 secnum;
fixed_t speed;
if (thwompsactive == false)
if (mapnamespace == MNS_RINGRACERS && thwompsactive == false)
{
// Ring Racers: Rest until Lap 2
return;

View file

@ -4813,7 +4813,17 @@ static line_t *P_FindPointPushLine(taglist_t *list)
static void P_SetBinaryFOFAlpha(line_t *line)
{
if (sides[line->sidenum[0]].toptexture > 0)
// fun fact: in Kart, transparent FOFs with a missing top texture have their toptexture set to 1,
// because that's the ID of REDWALL. this makes the FOF invisible.
// in BlanKart, toptexture is set to 7478, which is a nonsensical alpha value that makes the FOF opaque.
// so now we have to check for MISSTEX and set alpha to 1 in that case!
// have fun with the time bomb in R_TextureNumForName :^)
if (mapnamespace == MNS_SRB2KART && sides[line->sidenum[0]].toptexture == R_TextureNumForName(MISSING_TEXTURE))
{
line->args[1] = 1;
line->args[2] = TMB_TRANSLUCENT;
}
else if (sides[line->sidenum[0]].toptexture > 0)
{
line->args[1] = sides[line->sidenum[0]].toptexture;

View file

@ -2158,7 +2158,12 @@ INT32 R_TextureNumForName(const char *name)
static INT32 redwall = -2;
CONS_Debug(DBG_SETUP, "WARNING: R_TextureNumForName: %.8s not found\n", name);
if (redwall == -2)
{
redwall = R_CheckTextureNumForName(MISSING_TEXTURE);
if (redwall <= 256)
// see P_SetBinaryFOFAlpha
I_Error(MISSING_TEXTURE " resolved to ID <= 256. Shit's fucked man");
}
if (redwall != -1)
return redwall;
return 1;