Fixed crash when trying to jump, when no player is spawned.
This commit is contained in:
@@ -69,6 +69,9 @@ bool SoundSystem::OnInputCommand(const Events::InputCommand & e)
|
||||
|
||||
void SoundSystem::playerJumps()
|
||||
{
|
||||
if (!m_LocalPlayer.Valid()) {
|
||||
return;
|
||||
}
|
||||
bool grounded = (bool)m_World->GetComponent(m_LocalPlayer.ID, "Physics")["IsOnGround"];
|
||||
if (grounded) {
|
||||
Events::PlaySoundOnEntity e;
|
||||
|
||||
Reference in New Issue
Block a user