From 35f76781cdc2e49a7bebc15e5f3ed0ba14f4f76c Mon Sep 17 00:00:00 2001 From: ggGhosTt Date: Tue, 9 Apr 2024 15:52:05 -0400 Subject: [PATCH] Bypass crash on invalid AI map at kamp point Since CS has a couple of these and now we have properly working checks which force the crash. --- gamedata/scripts/xr_kamp.script | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gamedata/scripts/xr_kamp.script b/gamedata/scripts/xr_kamp.script index 7dfc4f090..da3a2930a 100644 --- a/gamedata/scripts/xr_kamp.script +++ b/gamedata/scripts/xr_kamp.script @@ -306,7 +306,8 @@ function CKampManager:getDestVertex(npc, radius) dest_vertex = level.vertex_id(tmp_pos) if dest_vertex == 4294967295 then if radius < 1 then - abort("Invalid AI map at kamp point [%s]", self.kamp_name) + log("Invalid AI map at kamp point [%s]", self.kamp_name) + dest_vertex = utils.send_to_nearest_accessible_vertex(npc, dest_vertex) else radius = radius - 0.5 end