manually assign y position on first spawn

This commit is contained in:
p2r3
2025-08-25 20:34:06 +03:00
parent e51d03e833
commit 297047b6dd

View File

@@ -213,6 +213,7 @@ void spawnPlayer (PlayerData *player) {
if (player->flags & 0x02) { // Is this a new player?
// Determine spawning Y coordinate based on terrain height
spawn_y = getHeightAt(8, 8) + 1;
player->y = spawn_y;
player->flags &= ~0x02;
} else { // Not a new player
// Calculate spawn position from player data