Squally
Squally copied to clipboard
No Emerge/Submerge SFX if Squally is up against a wall.
See EntityMovementCollisionBehavior.cpp, specifically here:
this->movementCollision->whenCollidesWith({ (int)PlatformerCollisionType::Water, }, [=](CollisionObject::CollisionData collisionData)
{
if (this->groundCollision != nullptr && !this->groundCollision->isOnGround() && this->noEmergeSubmergeSoundCooldown <= 0.0f && !this->submergeSound->isPlaying())
{
this->submergeSound->play();
}
return CollisionObject::CollisionResult::DoNothing;
});
I believe isOnGround() is returning true when it shouldn't. Being up against a wall shouldnt hit the ground detector, so I'm not sure what is going wrong.