Minor fixes
All checks were successful
Build and Publish WASM version of demo / Build-And-Deploy (push) Successful in 19s

This commit is contained in:
Stephen Seo 2023-08-18 15:50:37 +09:00
parent b885b869cb
commit 596912617f
2 changed files with 3 additions and 5 deletions

View file

@ -287,8 +287,7 @@ bool TRunnerScreen::update(float dt) {
// Check if clicked on a Walker.
for (unsigned int idx = 0; idx < walkers.size(); ++idx) {
if (auto walker_bb = walkers[idx].get_body_bb();
GetRayCollisionBox(ray, walker_bb).hit) {
if (GetRayCollisionBox(ray, walkers[idx].get_body_bb()).hit) {
if (controlled_walker_idx.has_value()) {
walkers[controlled_walker_idx.value()].set_player_controlled(false);
}
@ -345,8 +344,7 @@ bool TRunnerScreen::update(float dt) {
}
};
if (auto bb_collision = GetRayCollisionBox(ray, surface_bbs[idx]);
bb_collision.hit) {
if (GetRayCollisionBox(ray, surface_bbs[idx]).hit) {
if (auto collision = GetRayCollisionTriangle(ray, nw, sw, ne);
collision.hit) {
on_collide_fn(collision.point);

View file

@ -98,7 +98,7 @@ class Walker {
template <std::size_t BBCount>
void Walker::update(float dt, const std::array<BoundingBox, BBCount> &bbs,
unsigned int width, unsigned int height) {
unsigned int width, unsigned int /*height*/) {
if ((flags & 8) == 0 && (flags & 4) != 0 && (flags & 3) == 0) {
roaming_timer += dt;
if (roaming_timer > roaming_time) {