-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nav: - Typical fixes. - Bots won't fall to water all the time from walkways and shacks. - A lot of bad connections fixed (like just going through the roof for example). - Added a ladder to an area where specials have almost no way to get to you. - Should be a lot less stuckage on the prop_wall_breakables. Lump: - Fixed bridge lever prop remaining glowing after being lowered. - Set bridge lowering speed to 24 from 5 (in order to match the audio). - Slightly adjusted a ladder to prevent getting stuck while climbing. - Item density adjustments.
- Loading branch information
1 parent
1872fbe
commit f1c685f
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
::breakableWalls <- []; | ||
|
||
local wallAreas = {}; | ||
NavMesh.GetAreasWithAttributes( 8, wallAreas ); //NO_JUMP areas indicate prop_wall_breakable is above them | ||
|
||
local ix = 0, ent = null; | ||
foreach( area in wallAreas ) | ||
{ | ||
if ( ent = Entities.FindByClassnameWithin( null, "prop_wall_breakable", area.GetCenter(), 20 ) ) | ||
{ | ||
area.MarkAsBlocked( -1 ); | ||
|
||
breakableWalls.append( ent ); | ||
EntityOutputs.AddOutput( ent, "OnBreak", "worldspawn", "RunScriptCode", format( "if(!breakableWalls[%d].IsValid())NavMesh.GetNavAreaByID(%d).UnblockArea()", ix++, area.GetID() ), 0.5, -1 ); | ||
} | ||
} | ||
|
||
local screenAreas = {}; | ||
NavMesh.GetAreasWithAttributes( 512, screenAreas ); //DONT_HIDE areas indicate bug screen prop_dynamic is above them | ||
local screenRegex = regexp( "models/props_shacks/screen0\\d\\.mdl" ); | ||
|
||
foreach( area in screenAreas ) | ||
{ | ||
for ( local screen = null; screen = Entities.FindByClassnameWithin( screen, "prop_dynamic", area.GetCenter(), 15 ); ) | ||
{ | ||
if ( screenRegex.match( screen.GetModelName() ) ) | ||
{ | ||
area.MarkAsBlocked( -1 ); | ||
EntityOutputs.AddOutput( screen, "OnTakeDamage", "worldspawn", "RunScriptCode", format( "NavMesh.GetNavAreaByID(%d).UnblockArea()", area.GetID() ), 0.5, -1 ); | ||
break; | ||
} | ||
} | ||
} | ||
|
||
EntFire( "walkway_water_avoidance", "AddOutput", "maxs 500 500 60" ); | ||
EntFire( "walkway_water_avoidance", "RunScriptCode", "{t<-{},NavMesh.GetNavAreasOverlappingEntityExtent(self, t)}foreach(a in t) if(a.IsUnderwater() && !a.HasAttributes(32)) a.MarkObstacleToAvoid(100)", 0.1 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters