Use tag instead of angle for skyboxes

This commit is contained in:
MascaraSnake 2020-01-25 10:26:38 +01:00
parent 5656d77c82
commit d947558576
2 changed files with 11 additions and 2 deletions

View file

@ -12643,10 +12643,16 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
break; break;
} }
case MT_SKYBOX: case MT_SKYBOX:
if (mthing->tag < 0 || mthing->tag > 15)
{
CONS_Debug(DBG_GAMELOGIC, "P_SetupSpawnedMapThing: Skybox ID %d of mapthing %s is not between 0 and 15!\n", mthing->tag, sizeu1((size_t)(mthing - mapthings)));
break;
}
if (mthing->options & MTF_OBJECTSPECIAL) if (mthing->options & MTF_OBJECTSPECIAL)
skyboxcenterpnts[mthing->extrainfo] = mobj; skyboxcenterpnts[mthing->tag % 16] = mobj;
else else
skyboxviewpnts[mthing->extrainfo] = mobj; skyboxviewpnts[mthing->tag % 16] = mobj;
break; break;
case MT_EGGSTATUE: case MT_EGGSTATUE:
if (mthing->options & MTF_EXTRA) if (mthing->options & MTF_EXTRA)

View file

@ -2781,6 +2781,9 @@ static void P_ConvertBinaryMap(void)
case 762: case 762:
mapthings[i].tag = mapthings[i].angle; mapthings[i].tag = mapthings[i].angle;
break; break;
case 780:
mapthings[i].tag = mapthings[i].extrainfo;
break;
default: default:
break; break;
} }