Skip to content

Commit 82eec75

Browse files
authored
Detour Ahead 3 Fire Escape Pathing (#957)
* Detour Ahead 3 Fix AI pathing issues on fire escape Fixed navs and collisions to prevent AIs getting themselves stuck under the fire escape windows Fixes broken apartment window frames being solid and getting pushed when AIs climb through them * Apply tank ban range from #953 to all ZM configs
1 parent 87a8c70 commit 82eec75

10 files changed

Lines changed: 87 additions & 16 deletions

File tree

cfg/cfgogl/zh1v1/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/cfgogl/zh2v2/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/cfgogl/zh3v3/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/cfgogl/zm1v1/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/cfgogl/zm2v2/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/cfgogl/zm3v3/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/cfgogl/zonehunters/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/cfgogl/zoneretro/mapinfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
"end_dist" "245.495361"
11141114
"tank_ban_flow"
11151115
{
1116-
"During sewers"
1116+
"During sewers + double ladder drop"
11171117
{
1118-
"min" "60"
1118+
"min" "52"
11191119
"max" "79"
11201120
}
11211121
}

cfg/stripper/zonemod/maps/cdta_03warehouse.cfg

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
; == DIRECTOR & EVENT MODIFICATION ==
99
; == Modify director behaviour and events ==
1010
; =====================================================
11+
; --- Run nav fixes script
12+
; --- Fix 1: Fixes AI having issues pathing over the balcony under the fire escape and attempting to path into the fire escape from under it
13+
add:
14+
{
15+
"classname" "logic_auto"
16+
"OnMapSpawn" "director,RunScriptFile,nav_fixes/cdta_03warehouse_navfixes,20,-1"
17+
}
1118
; --- Remove director script that causes the map to spawn natural hordes
1219
modify:
1320
{
@@ -786,6 +793,45 @@ modify:
786793
"damagefilter" "explosion_filter_class"
787794
}
788795
}
796+
; --- Fix the broken apartment window frames being solid
797+
modify:
798+
{
799+
match:
800+
{
801+
"model" "models/props_windows/window_urban_apt_frame.mdl"
802+
}
803+
replace:
804+
{
805+
"spawnflags" "268"
806+
}
807+
}
808+
; --- Replace fire escape ladder with dynamic prop (physics version causes navs to be blocked automatically which prevents pathing)
809+
; --- & Remove the nav blocker covering the ladder to prevent AI tanks getting themselves stuck / being unable to path through the building
810+
filter:
811+
{
812+
"targetname" "elblock"
813+
}
814+
{
815+
"targetname" "escapeladder"
816+
}
817+
add:
818+
{
819+
"classname" "prop_dynamic_override"
820+
"origin" "-896 -7943 419.7"
821+
"angles" "0 0 -13"
822+
"model" "models/dtafireescape/dta_fireescapeladder.mdl"
823+
"solid" "6"
824+
"disableshadows" "1"
825+
}
826+
; --- Re-add func_playerinfectedclip on fire escape that is removed by global filters
827+
add:
828+
{
829+
"classname" "func_playerinfected_clip"
830+
"targetname" "escapeclip2"
831+
"model" "*267"
832+
"spawnflags" "2"
833+
"Solidity" "2"
834+
}
789835
; --- Remove triggers that lower the ladder
790836
filter:
791837
{
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
printl("\n[NavFixes] cdta_03warehouse initialized\n")
2+
3+
//Fix 1: Fix AI having issues pathing over the balcony under the fire escape//
4+
//Issue: Nav area on balcony has is only connected by the ladder which AI doesn't see as a valid path from above, and nav under the fire escape is connected to the fire escape which causes AI to attempt to path through it
5+
function cdta_03warehouse_navfixes_fix1()
6+
{
7+
//Get nav areas:
8+
//Problematic nav areas
9+
local fix1_balconyNav_a = NavMesh.GetNavAreaByID(162748)
10+
local fix1_underLadderNav_b = NavMesh.GetNavAreaByID(162745)
11+
//Nav areas to connect
12+
local fix1_nav_a = NavMesh.GetNavAreaByID(162689)
13+
local fix1_nav_b = NavMesh.GetNavAreaByID(136940)
14+
15+
//Create one-way connection between nav areas
16+
fix1_balconyNav_a.ConnectTo(fix1_nav_a,-1)
17+
//Disconnect invalid navs on fire escape
18+
fix1_underLadderNav_b.Disconnect(fix1_nav_b)
19+
fix1_nav_b.Disconnect(fix1_underLadderNav_b)
20+
21+
printl("\n[NavFixes] Fix 1 applied\n")
22+
}
23+
24+
25+
cdta_03warehouse_navfixes_fix1()

0 commit comments

Comments
 (0)