#include <cmath>
// third party includes
+#include <raylib.h>
#include <raymath.h>
// local includes
flags &= ~0x3B;
flags |= 8;
target_body_pos = body_pos;
+ roaming_timer = 0.0F;
+ roaming_time =
+ call_js_get_random() * ROAMING_WAIT_VARIANCE + ROAMING_WAIT_AMOUNT;
} else {
flags &= ~0x38;
}
BoundingBox Walker::get_body_bb() const {
return BoundingBox{
.min = body_pos - Vector3{0.5F,
- 0.5F + BODY_IDLE_MOVE_AMOUNT *
- std::sin(body_idle_move_timer + PI),
+ -BODY_IDLE_MOVE_AMOUNT *
+ std::sin(body_idle_move_timer + PI),
0.5F},
.max = body_pos + Vector3{0.5F,
- 0.5F + BODY_IDLE_MOVE_AMOUNT *
+ 1.0F + BODY_IDLE_MOVE_AMOUNT *
std::sin(body_idle_move_timer + PI),
0.5F}};
}