mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-01 17:55:48 +00:00
Remove controllable instead of checking health
This commit is contained in:
@@ -22,7 +22,7 @@ namespace BBM
|
||||
auto health = entity->tryGetComponent<HealthComponent>();
|
||||
Vector2f move = controllable.move.normalized() * controllable.speed;
|
||||
|
||||
if (health->getHealthPoint() <= 0)
|
||||
if (health && health->getHealthPoint() <= 0)
|
||||
return;
|
||||
movable.addForce(Vector3f(move.x, 0, move.y));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user