- Blood: Fix angle issues with NHIS.

This commit is contained in:
Mitchell Richters 2021-07-18 17:35:11 +10:00
parent 9432f9ec90
commit c62e5db2bc

View file

@ -2398,7 +2398,10 @@ void useTeleportTarget(XSPRITE* pXSource, spritetype* pSprite) {
if (pXSource->data2 == 1) {
if (pPlayer) pPlayer->angle.ang = buildang(pSource->ang);
if (pPlayer) {
pPlayer->angle.settarget(pSource->ang);
setForcedSyncInput();
}
else if (isDude) xsprite[pSprite->extra].goalAng = pSprite->ang = pSource->ang;
else pSprite->ang = pSource->ang;
}
@ -4687,8 +4690,14 @@ bool modernTypeOperateSprite(int nSprite, spritetype* pSprite, XSPRITE* pXSprite
case 9: // 73 (set player's sprite angle, TO-DO: if tx > 0, take a look on TX ID sprite)
//data4 is reserved
if (pXSprite->data4 != 0) break;
else if (pSprite->flags & kModernTypeFlag1) pPlayer->angle.ang = buildang(pSprite->ang);
else if (valueIsBetween(pXSprite->data2, -kAng360, kAng360)) pPlayer->angle.ang = buildang(pXSprite->data2);
else if (pSprite->flags & kModernTypeFlag1) {
pPlayer->angle.settarget(pSprite->ang);
setForcedSyncInput();
}
else if (valueIsBetween(pXSprite->data2, -kAng360, kAng360)) {
pPlayer->angle.settarget(pXSprite->data2);
setForcedSyncInput();
}
break;
case 10: // 74 (print the book)
// data2: RFF TXT id