diff --git a/src/d/actor/d_a_door_boss.cpp b/src/d/actor/d_a_door_boss.cpp index 476a9c8ad6..bf042b3323 100644 --- a/src/d/actor/d_a_door_boss.cpp +++ b/src/d/actor/d_a_door_boss.cpp @@ -254,7 +254,11 @@ BOOL daBdoor_c::checkArea() { if (fabsf(vec.z) > 100.0f) { return false; } +#ifdef TARGET_PC + return (s16)((s32)fabs(current.angle.y - 0x7fff - player->current.angle.y) & 0xffff) <= 0x4000 ? 1 : 0; +#else return (s16)fabs((f64)(current.angle.y - 0x7fff - player->current.angle.y)) <= 0x4000 ? 1 : 0; +#endif } BOOL daBdoor_c::checkFront() { diff --git a/src/d/actor/d_a_door_bossL1.cpp b/src/d/actor/d_a_door_bossL1.cpp index a756cc6fd2..649ebbd5f3 100644 --- a/src/d/actor/d_a_door_bossL1.cpp +++ b/src/d/actor/d_a_door_bossL1.cpp @@ -825,7 +825,11 @@ int daBdoorL1_c::checkArea() { if (fabsf(local_48.z) > 100.0f) { return 0; } +#ifdef TARGET_PC + if ((s16)((s32)fabs(current.angle.y - 0x7fff - player->current.angle.y) & 0xffff) <= 0x4000) { +#else if ((s16)fabs((f64)(current.angle.y - 0x7fff - player->current.angle.y)) <= 0x4000) { +#endif return 1; } else { return 0; diff --git a/src/d/actor/d_a_door_bossL5.cpp b/src/d/actor/d_a_door_bossL5.cpp index d71fddad1f..34dac15fa9 100644 --- a/src/d/actor/d_a_door_bossL5.cpp +++ b/src/d/actor/d_a_door_bossL5.cpp @@ -348,7 +348,11 @@ int daBdoorL5_c::checkArea() { if (fabsf(local_48.z) > 100.0f) { return 0; } +#ifdef TARGET_PC + if ((s16)((s32)fabs(current.angle.y - 0x7fff - player->current.angle.y) & 0xffff) <= 0x4000) { +#else if ((s16)fabs((f64)(current.angle.y - 0x7fff - player->current.angle.y)) <= 0x4000) { +#endif return 1; } else { return 0; diff --git a/src/d/actor/d_a_door_mbossL1.cpp b/src/d/actor/d_a_door_mbossL1.cpp index 1f37fbcc7b..5dfd3bb96c 100644 --- a/src/d/actor/d_a_door_mbossL1.cpp +++ b/src/d/actor/d_a_door_mbossL1.cpp @@ -1317,8 +1317,12 @@ int daMBdoorL1_c::checkArea() { if (fabsf(local_48.z) > 110.0f) { return 0; } - + +#ifdef TARGET_PC + if ((s16)((s32)fabs(angle - 0x7fff - player->current.angle.y) & 0xffff) > 0x4000) { +#else if ((s16)fabs((f64)(angle - 0x7fff - player->current.angle.y)) > 0x4000) { +#endif return 0; } else { return 1;