forked from EXTERNAL/bareiron
manually assign y position on first spawn
This commit is contained in:
@@ -213,6 +213,7 @@ void spawnPlayer (PlayerData *player) {
|
|||||||
if (player->flags & 0x02) { // Is this a new player?
|
if (player->flags & 0x02) { // Is this a new player?
|
||||||
// Determine spawning Y coordinate based on terrain height
|
// Determine spawning Y coordinate based on terrain height
|
||||||
spawn_y = getHeightAt(8, 8) + 1;
|
spawn_y = getHeightAt(8, 8) + 1;
|
||||||
|
player->y = spawn_y;
|
||||||
player->flags &= ~0x02;
|
player->flags &= ~0x02;
|
||||||
} else { // Not a new player
|
} else { // Not a new player
|
||||||
// Calculate spawn position from player data
|
// Calculate spawn position from player data
|
||||||
|
Reference in New Issue
Block a user