Updated ess to the latest. Replaced the range checks with the newly added helper calls.

This commit is contained in:
Relintai 2021-08-05 23:01:31 +02:00
parent 2e15d3f74e
commit bf40b5c12f
4 changed files with 5 additions and 7 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "7b972435218f1382be844500ad5536d2f7ccfef0"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "6c3537e925bc8b671805da52e2a9edb3f5185935"}, "ui_extensions": {"master": "f82273f54cb1ab87d458c91af9554acec5c10831"}, "voxelman": {"master": "9253cc53c6fbbd78b5e4268eb498ef55b4dd0181"}, "texture_packer": {"master": "dbf3c59a9c52f155f0d98b567d571708e8b3f253"}, "fastnoise": {"master": "d447fd5364e9ab5a6b14184483eab23cd3fe820b"}, "mesh_data_resource": {"master": "3199cbe1a52e9d5714106e0332897ebac7a42496"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "0eee4dba90e486ee7abd8039220d86f742a2fb6a"}, "mesh_utils": {"master": "29c5cc9a75af4506dfd44ae4c919a0771240dfb0"}, "broken_seals_module": {"master": "2afea56eba66beeb543934edf5a38a8aa63fc79b"}, "thread_pool": {"master": "b2e8c815392052947e7386f722913a12eea543a4"}, "terraman": {"master": "94c9fc39ac9753de54753471dbd3c406b957145d"}}
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "7b972435218f1382be844500ad5536d2f7ccfef0"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "0f709b5455411652f371879e83a0737589d690c3"}, "ui_extensions": {"master": "f82273f54cb1ab87d458c91af9554acec5c10831"}, "voxelman": {"master": "9253cc53c6fbbd78b5e4268eb498ef55b4dd0181"}, "texture_packer": {"master": "dbf3c59a9c52f155f0d98b567d571708e8b3f253"}, "fastnoise": {"master": "d447fd5364e9ab5a6b14184483eab23cd3fe820b"}, "mesh_data_resource": {"master": "3199cbe1a52e9d5714106e0332897ebac7a42496"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "0eee4dba90e486ee7abd8039220d86f742a2fb6a"}, "mesh_utils": {"master": "29c5cc9a75af4506dfd44ae4c919a0771240dfb0"}, "broken_seals_module": {"master": "2afea56eba66beeb543934edf5a38a8aa63fc79b"}, "thread_pool": {"master": "b2e8c815392052947e7386f722913a12eea543a4"}, "terraman": {"master": "94c9fc39ac9753de54753471dbd3c406b957145d"}}

View File

@ -24,15 +24,13 @@ class_name EntityDataGD
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
const INTERACT_RANGE_SQUARED : int = 4 * 4
func _sinteract(entity: Entity) -> void:
var target : Entity = entity.gets_target()
if target == null or not is_instance_valid(target):
return
if (entity.get_body_3d().translation - target.get_body_3d().translation).length_squared() > INTERACT_RANGE_SQUARED:
if !entity.iss_target_in_interact_range():
return
if target.sentity_interaction_type == EntityEnums.ENITIY_INTERACTION_TYPE_LOOT:

View File

@ -85,7 +85,7 @@ func _process(delta):
if target != _trainer:
hide()
if (_player.get_body_3d().translation - target.get_body_3d().translation).length_squared() > 16:#INTERACT_RANGE_SQUARED:
if !_player.isc_target_in_interact_range():
hide()
func learn() -> void:

View File

@ -79,8 +79,8 @@ func _process(delta):
if target != _vendor:
hide()
if (_player.get_body_3d().translation - target.get_body_3d().translation).length_squared() > 16:#INTERACT_RANGE_SQUARED:
if !_player.isc_target_in_interact_range():
hide()
func inc_page() -> void: