mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
update player spawn point auto selection
This commit is contained in:
parent
5785060ffb
commit
f602384a94
2 changed files with 3 additions and 5 deletions
|
|
@ -105,10 +105,8 @@ void Player::postUpdate() {
|
|||
if (flight && hitbox.grounded && !noclip) {
|
||||
flight = false;
|
||||
}
|
||||
if (spawnpoint.y <= 0.1) {
|
||||
for (int i = 0; i < SPAWN_ATTEMPTS_PER_UPDATE; i++) {
|
||||
attemptToFindSpawnpoint();
|
||||
}
|
||||
for (int i = 0; i < SPAWN_ATTEMPTS_PER_UPDATE && std::isnan(spawnpoint.x); i++) {
|
||||
attemptToFindSpawnpoint();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue