Skip to content

Commit

Permalink
Update c3m3 Nav and Lump
Browse files Browse the repository at this point in the history
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
Rayman1103 committed Jan 20, 2022
1 parent 1872fbe commit f1c685f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
Binary file modified root/maps/c3m3_shantytown.nav
Binary file not shown.
Binary file modified root/maps/c3m3_shantytown_h_0.lmp
Binary file not shown.
Binary file modified root/maps/c3m3_shantytown_l_0.lmp
Binary file not shown.
36 changes: 36 additions & 0 deletions root/scripts/vscripts/community/c3m3_breakablewalls.nut
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 );
8 changes: 8 additions & 0 deletions root/scripts/vscripts/community/maps/c3m3_shantytown.nut
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ function DoRoundFixes()
make_prop( "dynamic", "_permstuck_cratebot", "models/props_crates/static_crate_40.mdl", "-3749.85 -183.67 -3.164", "0 0 0" );
make_prop( "dynamic", "_permstuck_cratetop", "models/props_crates/static_crate_40.mdl", "-3749.85 -182.67 36.837", "0 -30 0" );

make_trigmove( "_antistuck_crouch1", "Duck", "-186.0 -70.0 -30.0", "186.0 70.0 30.0", "-4333.0 -2855.0 16.9" );
make_trigmove( "_antistuck_crouch2", "Duck", "-65 -30 -30", "65 30 30", "-4875 -2730 18.5" );
make_trigmove( "_antistuck_crouch3", "Duck", "-26 -69 -30", "26 69 30", "-3691 -3155 16.5" );
make_trigmove( "_antistuck_crouch4", "Duck", "-12.5 -2 -30", "12.5 2 30", "-5233.5 -3123 21.8" );
make_trigmove( "_antistuck_crouch5", "Duck", "-29.5 -7.5 -30.0", "29.5 7.5 30.0", "-2652.5 -1078.5 13.0" );
make_trigmove( "_antistuck_crouch6", "Duck", "-53.0 -47.0 -30.0", "53.0 47.0 30.0", "-2746.0 -1271.0 21.0" );
make_trigmove( "_antistuck_crouch7", "Duck", "-56.5 -50.0 -30.0", "56.5 50.0 30.0", "-2591.5 -723.0 21.9" );

if ( g_BaseMode == "versus" )
{
devchap( "BASE VERSUS" );
Expand Down

0 comments on commit f1c685f

Please sign in to comment.