diff --git a/HEADS b/HEADS index bdabd43..9cc1047 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "3f57cb12b435f44d60ab813ba824b8bf7f44d5b3"}, "world_generator": {"master": "c10d7b7b8cb83e233cffd524f4931988208eb14a"}, "entity_spell_system": {"master": "4b9c18f23ce99c11672a1648f1d071c53397d198"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "texture_packer": {"master": "2993ed34f34cfa6a5e61b7913380231e9c55eda6"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "thread_pool": {"master": "93320fe864128d706bcc47fc7ed0731e6e9bcf69"}} \ No newline at end of file +{"engine": {"3.2": "3f57cb12b435f44d60ab813ba824b8bf7f44d5b3"}, "world_generator": {"master": "c10d7b7b8cb83e233cffd524f4931988208eb14a"}, "entity_spell_system": {"master": "28f2cc1f38612934a7bbd81dd30787215d74bbe5"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "texture_packer": {"master": "2993ed34f34cfa6a5e61b7913380231e9c55eda6"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "thread_pool": {"master": "93320fe864128d706bcc47fc7ed0731e6e9bcf69"}} \ No newline at end of file diff --git a/game/characters/Character.tscn b/game/characters/Character.tscn index b055599..31b09f4 100644 --- a/game/characters/Character.tscn +++ b/game/characters/Character.tscn @@ -7,7 +7,6 @@ [ext_resource path="res://scripts/item_visuals/CharacterAtlasEntry2D.gd" type="Script" id=5] [ext_resource path="res://characters/char_t1_outline_split.png" type="Texture" id=6] - [sub_resource type="CharacterAtlasEntry" id=1] script = ExtResource( 5 ) front_rect = Rect2( 101, 15, 9, 12 ) @@ -47,6 +46,19 @@ texture = ExtResource( 6 ) slots = [ null, SubResource( 1 ), null, null, null, null, null, null, null, null, null, null, null, null, SubResource( 2 ), null ] [node name="Character" type="CharacterSkeleton2D"] +entity_type = 1 +attach_point_paths/0_left_hand = NodePath("") +attach_point_paths/1_right_hand = NodePath("") +attach_point_paths/2_torso = NodePath("") +attach_point_paths/3_root = NodePath("") +attach_point_paths/4_right_hip = NodePath("") +attach_point_paths/5_left_hip = NodePath("") +attach_point_paths/6_spine_2 = NodePath("") +attach_point_paths/7_weapon_left = NodePath("") +attach_point_paths/8_weapon_right = NodePath("") +attach_point_paths/9_weapon_left_back = NodePath("") +attach_point_paths/10_weapon_right_back = NodePath("") +attach_point_paths/11_weapon_shield_left = NodePath("") script = ExtResource( 1 ) front_node_path = NodePath("CharacterFrontModel") front_animation_player_path = NodePath("../Character/CharacterFrontModel/AnimationPlayer") diff --git a/game/player/Mob.gd b/game/player/Mob.gd index b298c26..11c01aa 100644 --- a/game/player/Mob.gd +++ b/game/player/Mob.gd @@ -106,11 +106,11 @@ func _notification_sdamage(what, info): func _notification_cdamage(what, info): if what == SpellEnums.NOTIFICATION_DAMAGE_DAMAGE_DEALT: - WorldNumbers.damage(get_body().translation, 1.6, info.damage, info.crit) + WorldNumbers.damage(get_body().position, 1.6, info.damage, info.crit) func _notification_cheal(what, info): if what == SpellEnums.NOTIFICATION_DAMAGE_DAMAGE_DEALT: - WorldNumbers.heal(get_body().translation, 1.6, info.heal, info.crit) + WorldNumbers.heal(get_body().position, 1.6, info.heal, info.crit) func _notification_sxp_gained(value : int) -> void: if not ESS.get_resource_db().get_xp_data().can_character_level_up(gets_character_level()): diff --git a/game/scripts/ai/EntityAIGD.gd b/game/scripts/ai/EntityAIGD.gd index 490c16c..8147b61 100644 --- a/game/scripts/ai/EntityAIGD.gd +++ b/game/scripts/ai/EntityAIGD.gd @@ -121,11 +121,11 @@ func attack(delta): owner.get_body().target_movement_direction = Vector2() - var dir : Vector3 = target.get_body().translation - owner.get_body().translation + var dir : Vector2 = target.get_body().position - owner.get_body().position var l = dir.length() if l > 2.5: - owner.get_body().target_movement_direction = Vector2(dir.x, dir.z) + owner.get_body().target_movement_direction = Vector2(dir.x, dir.y) func sort_spells_by_rank(a, b): if a == null or b == null: diff --git a/game/scripts/spells/gd_spell_script.gd b/game/scripts/spells/gd_spell_script.gd index 37ff74d..5faf4ff 100644 --- a/game/scripts/spells/gd_spell_script.gd +++ b/game/scripts/spells/gd_spell_script.gd @@ -56,8 +56,8 @@ func _cast_starts(info : SpellCastInfo) -> void: if range_enabled: if info.caster != info.target: - var c : Vector3 = info.caster.get_body().transform.origin - var t : Vector3 = info.target.get_body().transform.origin + var c : Vector2 = info.caster.get_body().position + var t : Vector2 = info.target.get_body().position if (c - t).length() > range_range: return