mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fixes some runtimes with bots. (#26201)
This commit is contained in:
@@ -99,7 +99,8 @@ length to avoid portals or something i guess?? Not that they're counted right no
|
||||
//replace the passed element at it's right position using the cmp proc
|
||||
/PriorityQueue/proc/ReSort(var/atom/A)
|
||||
var/i = Seek(A)
|
||||
ASSERT(i != 0)
|
||||
if (i == 0)
|
||||
CRASH("[src] was seeking [A] but could not find it.")
|
||||
while(i < L.len && call(cmp)(L[i],L[i+1]) > 0)
|
||||
L.Swap(i,i+1)
|
||||
i++
|
||||
|
||||
@@ -180,7 +180,11 @@
|
||||
frustration = 0
|
||||
return TRUE
|
||||
if(frustration > 5)
|
||||
calc_path(target, .proc/get_path, next)
|
||||
if (target && !target.gcDestroyed)
|
||||
calc_path(target, .proc/get_path, next)
|
||||
else
|
||||
target = null
|
||||
path = list()
|
||||
return
|
||||
|
||||
/obj/machinery/bot/to_bump(var/M) //Leave no man un-phased through!
|
||||
@@ -298,7 +302,11 @@
|
||||
frustration = 0
|
||||
return TRUE
|
||||
if(frustration > 5)
|
||||
calc_path(target, .proc/get_path, next)
|
||||
if (target && !target.gcDestroyed)
|
||||
calc_path(target, .proc/get_path, next)
|
||||
else
|
||||
target = null
|
||||
patrol_path = list()
|
||||
|
||||
// send a radio signal with a single data key/value pair
|
||||
/obj/machinery/bot/proc/post_signal(var/freq, var/key, var/value)
|
||||
|
||||
@@ -31,7 +31,7 @@ var/list/pitbulls_exclude_kinlist = list() //all pitbulls go in here so pitbulls
|
||||
if(locs.len >= 3) //we found 3 locations and thats all we need
|
||||
break
|
||||
var/turf/T = get_step(user, direction) //getting a loc in that direction
|
||||
if(AStar(user.loc, T, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 1)) // if a path exists, so no dense objects in the way its valid salid
|
||||
if(quick_AStar(get_turf(user), T, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 1)) // if a path exists, so no dense objects in the way its valid salid
|
||||
locs += T
|
||||
|
||||
if(locs.len < 3) //if we only found one location, spawn more on top of our tile so we dont get stacked pitbulls
|
||||
|
||||
Reference in New Issue
Block a user