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

View file

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