Skip to content

Commit

Permalink
Moved some scripts execution from IO to vscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
shqke committed Feb 3, 2022
1 parent f46fb86 commit dc88c4d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions root/scripts/vscripts/community/mapfixes.nut
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ local s_CommunityUpdate =
{
// Hook events now, after ScriptMode_Init has just cleared them.
ListenForGameEvent( "round_start" );

// Broadcast "before round_start but during ScriptMode_Init", when some things were already set.
InvokeScopedMethod( "OnScriptMode_Init" );
}

// Functions that spawn in the map-specific fixes for any Mutation/Base mode.
Expand Down
5 changes: 5 additions & 0 deletions root/scripts/vscripts/community/maps/c1m1_hotel.nut
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ g_Chapter = "DEAD CENTER - HOTEL";

devchap( "ALL MODES" );

function OnScriptMode_Init()
{
IncludeScript("c1m1_reserved_wanderers", g_MapScript.LocalScript);
}

function DoRoundFixes()
{
make_clip( "_cliphang_window", "Survivors", 1, "-72 -123 -12", "127 14 44", "2335 6420 2804" );
Expand Down
5 changes: 5 additions & 0 deletions root/scripts/vscripts/community/maps/c8m1_apartment.nut
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ PrecacheModel( "models/props_update/c8m1_rooftop_1.mdl" );
PrecacheModel( "models/props_update/c8m1_rooftop_2.mdl" );
PrecacheModel( "models/props_rooftop/acunit01.mdl" );

function OnScriptMode_Init()
{
IncludeScript("c8m1_apartment", g_MapScript.LocalScript);
}

function DoRoundFixes()
{
make_clip( "_fallrevive_griefroom", "Survivors", 1, "-8 -40 -276", "8 40 276", "632 984 292" );
Expand Down

0 comments on commit dc88c4d

Please sign in to comment.