Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into gamemode_fd
Browse files Browse the repository at this point in the history
  • Loading branch information
Zanieon committed Jan 6, 2025
2 parents a4a27fe + 5b67e5e commit 855a121
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ void function InitMainMenu()
AddMenuFooterOption( menu, BUTTON_A, "#A_BUTTON_SELECT", "" )
#endif // PC_PROG

#if VANILLA
AddMenuFooterOption( menu, BUTTON_X, "#X_BUTTON_INBOX_ACCEPT", "#INBOX_ACCEPT", OpenDataCenterDialog, IsDataCenterFooterValid, UpdateDataCenterFooter )
#endif

#if DEV
if ( DevStartPoints() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function BaseGametype_Init()
level.titanAlwaysAvailableForTeam <- [ 0, 0, 0, 0 ]

level.missingPlayersTimeout <- null
level.customOOBTimer <- 0.0

CreateTeamColorControlPoints()

Expand Down Expand Up @@ -1792,10 +1793,14 @@ void function EntityOutOfBounds( entity trigger, entity ent, entity caller, var

//printt( "Valid Out OfBounds Entity, EntityOutOfBounds" )

float overridenOOBTimer = expect float( level.customOOBTimer )
if ( !(ent in file.outOfBoundsTable) ) //Note that we never remove the ent from the table after adding it
{
OutOfBoundsDataStruct initialDataStruct
initialDataStruct.timeBackInBound = max( 0, Time() - OUT_OF_BOUNDS_DECAY_TIME )

if( overridenOOBTimer > 0.0 )
initialDataStruct.timeLeftBeforeDyingFromOutOfBounds = overridenOOBTimer

ManageAddEntToOutOfBoundsTable( ent, initialDataStruct )
}
Expand All @@ -1813,6 +1818,12 @@ void function EntityOutOfBounds( entity trigger, entity ent, entity caller, var
float outOfBoundsTimeRegained = decayTime * ( OUT_OF_BOUNDS_TIME_LIMIT / OUT_OF_BOUNDS_DECAY_TIME )
float deadTime = clamp( dataStruct.timeLeftBeforeDyingFromOutOfBounds + outOfBoundsTimeRegained, 0.0, OUT_OF_BOUNDS_TIME_LIMIT )

if( overridenOOBTimer > 0.0 )
{
outOfBoundsTimeRegained = decayTime * ( overridenOOBTimer / OUT_OF_BOUNDS_DECAY_TIME )
deadTime = clamp( dataStruct.timeLeftBeforeDyingFromOutOfBounds + outOfBoundsTimeRegained, 0.0, overridenOOBTimer )
}

//printt( "Decay Time: " + decayTime + ", outOfBoundsTimeRegained:" + outOfBoundsTimeRegained + ", timeLeftBeforeDyingFromOutOfBounds: " + dataStruct.timeLeftBeforeDyingFromOutOfBounds + ", deadTime: " + deadTime )

dataStruct.timeLeftBeforeDyingFromOutOfBounds = deadTime
Expand Down

0 comments on commit 855a121

Please sign in to comment.