Merge branch 'nightshoopsanity' into 'next'

Allow setting NiGHTS hoop pitch & yaw in degrees (in binary map format)

See merge request STJr/SRB2!1892
This commit is contained in:
sphere 2023-01-06 23:54:26 +00:00
commit cdf896b22f
2 changed files with 5 additions and 3 deletions

View file

@ -6491,7 +6491,7 @@ thingtypes
centerHitbox = true;
flagsvaluetext = "Height";
angletext = "Pitch/Yaw";
fixedrotation = 1;
parametertext = "Degrees?";
}
1706
{
@ -6551,6 +6551,8 @@ thingtypes
height = 160;
unflippable = true;
centerHitbox = true;
angletext = "Pitch/Yaw";
parametertext = "Degrees?";
}
1714
{

View file

@ -6627,8 +6627,8 @@ static void P_ConvertBinaryThingTypes(void)
case 1713: //Hoop (Customizable)
{
UINT16 oldangle = mapthings[i].angle;
mapthings[i].angle = ((oldangle >> 8)*360)/256;
mapthings[i].pitch = ((oldangle & 255)*360)/256;
mapthings[i].angle = (mapthings[i].extrainfo == 1) ? oldangle - 90 : ((oldangle >> 8)*360)/256;
mapthings[i].pitch = (mapthings[i].extrainfo == 1) ? oldangle / 360 : ((oldangle & 255)*360)/256;
mapthings[i].args[0] = (mapthings[i].type == 1705) ? 96 : (mapthings[i].options & 0xF)*16 + 32;
mapthings[i].options &= ~0xF;
mapthings[i].type = 1713;