Updated the engine, and removed the now unneeded gdscript classes.

This commit is contained in:
Relintai 2023-01-14 00:29:45 +01:00
parent 8f74ecb974
commit 2a6d8ba550
4 changed files with 1 additions and 99 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "c4864a0e5f73a375259503ea1485794a6aad6df7"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "65485930a20f65844d496b4ba47dec5b6ed70b91"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "983090d21a08ebed30a5ce06681269819ab12e48"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "terraman": {"master": "c72d8fc03295588fc18c5168ce351bd0c321ec5f"}, "pandemonium_engine": {"master": "36477a1a73128284db82b242d75df95a38a0c8e9"}}
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "c4864a0e5f73a375259503ea1485794a6aad6df7"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "65485930a20f65844d496b4ba47dec5b6ed70b91"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "983090d21a08ebed30a5ce06681269819ab12e48"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "terraman": {"master": "c72d8fc03295588fc18c5168ce351bd0c321ec5f"}, "pandemonium_engine": {"master": "caf3f1210b6d759065a6e2fceeab4cb31ba1c683"}}

View File

@ -1,23 +0,0 @@
extends GSAIProximity
class_name GSAIInfiniteProximity
# Determines any agent that is in the specified list as being neighbors with the
# owner agent, regardless of distance.
# @category - Proximities
# Returns a number of neighbors based on a `callback` function.
#
# `_find_neighbors` calls `callback` for each agent in the `agents` array and
# adds one to the count if its `callback` returns true.
# @tags - virtual
func _find_neighbors(callback: FuncRef) -> int:
var neighbor_count : int = 0
var agent_count : int = agents.size()
for i in range(agent_count):
var current_agent : GSAISteeringAgent = agents[i] as GSAISteeringAgent
if current_agent != agent:
if callback.call_func(current_agent):
neighbor_count += 1
return neighbor_count

View File

@ -1,63 +0,0 @@
extends GSAIProximity
class_name GSAIRadiusProximity
# Determines any agent that is in the specified list as being neighbors with the owner agent if
# they lie within the specified radius.
# @category - Proximities
# The radius around the owning agent to find neighbors in
var radius : float = 0.0
var _last_frame : int = 0
var _scene_tree : SceneTree
func _init() -> void:
_scene_tree = Engine.get_main_loop()
# Returns a number of neighbors based on a `callback` function.
#
# `_find_neighbors` calls `callback` for each agent in the `agents` array that lie within
# the radius around the owning agent and adds one to the count if its `callback` returns true.
# @tags - virtual
func _find_neighbors(callback : FuncRef) -> int:
var agent_count : int = agents.size()
var lagents : Array = get_agents()
var neighbor_count : int = 0
var current_frame : int
if _scene_tree:
current_frame = _scene_tree.get_frame()
else:
current_frame = -_last_frame
if current_frame != _last_frame:
_last_frame = current_frame
var owner_position : Vector3 = agent.position
for i in range(agent_count):
var current_agent : GSAISteeringAgent = lagents[i] as GSAISteeringAgent
if current_agent != agent:
var distance_squared : float = owner_position.distance_squared_to(current_agent.position)
var range_to : float = radius + current_agent.bounding_radius
if distance_squared < range_to * range_to:
if callback.call_func(current_agent):
current_agent.is_tagged = true
neighbor_count += 1
continue
current_agent.is_tagged = false
else:
for i in range(agent_count):
var current_agent : GSAISteeringAgent = lagents[i] as GSAISteeringAgent
if current_agent != agent and current_agent.is_tagged:
if callback.call_func(current_agent):
neighbor_count += 1
return neighbor_count

View File

@ -54,11 +54,6 @@ _global_script_classes=[ {
"language": @"GDScript",
"path": "res://addons/com.gdquest.godot-steering-ai-framework/Behaviors/GSAIFollowPath.gd"
}, {
"base": "GSAIProximity",
"class": @"GSAIInfiniteProximity",
"language": @"GDScript",
"path": "res://addons/com.gdquest.godot-steering-ai-framework/Proximities/GSAIInfiniteProximity.gd"
}, {
"base": "GSAISpecializedAgent",
"class": @"GSAIKinematicBody2DAgent",
"language": @"GDScript",
@ -89,11 +84,6 @@ _global_script_classes=[ {
"language": @"GDScript",
"path": "res://addons/com.gdquest.godot-steering-ai-framework/Behaviors/GSAIPursue.gd"
}, {
"base": "GSAIProximity",
"class": @"GSAIRadiusProximity",
"language": @"GDScript",
"path": "res://addons/com.gdquest.godot-steering-ai-framework/Proximities/GSAIRadiusProximity.gd"
}, {
"base": "GSAISpecializedAgent",
"class": @"GSAIRigidBody2DAgent",
"language": @"GDScript",
@ -124,11 +114,9 @@ _global_script_class_icons={
@"DemoPickerUI": "",
@"GSAIBlend": "",
@"GSAIEvade": "",
@"GSAIRadiusProximity": "",
@"GSAIFlee": "",
@"GSAIPursue": "",
@"GSAISpecializedAgent": "",
@"GSAIInfiniteProximity": "",
@"GSAILookWhereYouGo": "",
@"GSAIRigidBody3DAgent": "",
@"GSAIAvoidCollisions": "",