From 1cb11ca32ae5193fb5a823c900b5eef99355a44b Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 27 Dec 2021 14:27:33 +0100 Subject: [PATCH] Fix hit stack calculation. --- .../addons/world_generator/resources/world_gen_base_resource.gd | 1 + game/modules/planets/test_planet/test_world.tres | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/game/addons/world_generator/resources/world_gen_base_resource.gd b/game/addons/world_generator/resources/world_gen_base_resource.gd index 45a515f1..fd143935 100644 --- a/game/addons/world_generator/resources/world_gen_base_resource.gd +++ b/game/addons/world_generator/resources/world_gen_base_resource.gd @@ -132,6 +132,7 @@ func _add_to_map(var img : Image, pseed : int) -> void: func get_hit_stack(var pos : Vector2) -> Array: var r : Rect2 = get_rect() var local_pos : Vector2 = pos - rect.position + r.position = Vector2() var result : Array = Array() diff --git a/game/modules/planets/test_planet/test_world.tres b/game/modules/planets/test_planet/test_world.tres index 8610acd8..e1d71412 100644 --- a/game/modules/planets/test_planet/test_world.tres +++ b/game/modules/planets/test_planet/test_world.tres @@ -13,7 +13,7 @@ [sub_resource type="Resource" id=2] resource_name = "Spawner" script = ExtResource( 4 ) -rect = Rect2( 165, 197, 22, 25 ) +rect = Rect2( 165, 197, 5, 5 ) locked = false trainer = ExtResource( 8 ) vendor = ExtResource( 9 )