fix: Fix Global.station_coords assignment

This commit is contained in:
Dendy 2026-03-06 09:58:09 +01:00
parent 6b44466f6d
commit 7bc59b6e0a
2 changed files with 5 additions and 2 deletions

View File

@ -50,7 +50,11 @@ func initialize_world() -> void:
var station = Vector2i(randi() % dimension, 0) var station = Vector2i(randi() % dimension, 0)
var spawn = Vector2i(dimension - station.x - 1, dimension - 1) var spawn = Vector2i(dimension - station.x - 1, dimension - 1)
Global.station_coords = Vector3(station.x + Global.chunk_size/2, 0, station.y + Global.chunk_size/2) Global.station_coords = Vector3(
station.x * Global.chunk_size,
0,
station.y * Global.chunk_size,
)
$Player.position.x = spawn.x * Global.chunk_size $Player.position.x = spawn.x * Global.chunk_size
$Player.position.z = spawn.y * Global.chunk_size $Player.position.z = spawn.y * Global.chunk_size

View File

@ -17,7 +17,6 @@ fog_sky_affect = 0.39
fog_height = 2.3 fog_height = 2.3
[node name="Level" type="Node3D" unique_id=1248504413] [node name="Level" type="Node3D" unique_id=1248504413]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.44119096, 0)
script = ExtResource("1_0b4ue") script = ExtResource("1_0b4ue")
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=2012504496] [node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=2012504496]