Skip to content

Commit

Permalink
Change so models are only precached on the active days
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalBlue1 committed Dec 10, 2023
1 parent 1db8c6b commit 76ddcea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Northstar.Custom/mod/scripts/vscripts/_event_models.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ global function EventModelsInit

void function EventModelsInit()
{
PrecacheModel( $"models/northstar/desertlands_holiday_tree.mdl" )
PrecacheModel( $"models/northstar/floor.mdl" )

if( !GetConVarBool( "ns_show_event_models" ) )
return

table timeParts = GetUnixTimeParts()
int month = expect int( timeParts[ "month" ] )
int day = expect int( timeParts[ "day" ] )

if( ( ( month == 12 ) && ( day >= 18 ) ) || ( ( month == 1 ) && ( day <= 6 ) ) )
if( ( ( month == 12 ) && ( day >= 1 ) ) || ( ( month == 1 ) && ( day <= 6 ) ) )
{
PrecacheModel( $"models/northstar/desertlands_holiday_tree.mdl" )
PrecacheModel( $"models/northstar/floor.mdl" )

CreatePropDynamic( $"models/northstar/desertlands_holiday_tree.mdl", < -60, 740, 30 >, < 0, 0, 0 >, SOLID_VPHYSICS, 1000 )
CreatePropDynamic( $"models/northstar/floor.mdl", < -60, 740, 30 >, < 0, 0, 0 >, SOLID_VPHYSICS, 1000 )
}
Expand Down

0 comments on commit 76ddcea

Please sign in to comment.