Allow setting hoop pitch/yaw in degrees (binary)

This commit is contained in:
spherallic 2022-12-07 12:34:35 +01:00
parent 6d44eb8016
commit d0a91646ef
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;