Skip to content

Commit

Permalink
Merge branch 'main' into feat/mad-abort
Browse files Browse the repository at this point in the history
  • Loading branch information
Alystrasz authored Oct 6, 2024
2 parents 4866d3f + 22109d6 commit a2c344e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ void function AddInWorldMinimapObject( entity ent ) //TODO: If we want radar jam

void function AddInWorldMinimapObjectInternal( entity ent, var screen )
{
printt( "AddInWorldMinimapObject" )
printt( screen )
printt( ent )

bool isNPCTitan = ent.IsNPC() && ent.IsTitan()
bool isPetTitan = ent == GetLocalViewPlayer().GetPetTitan()
bool isLocalPlayer = ent == GetLocalViewPlayer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ void function EarnMeterMP_PlayerLifeThink( entity player )
EarnObject pilotReward = PlayerEarnMeter_GetReward( player )
float pilotRewardFrac = PlayerEarnMeter_GetRewardFrac( player )
int lastEarnMeterMode = PlayerEarnMeter_GetMode( player )
bool saidTitanSoon = false
bool titanReadyMsg = false
float lastPassiveGainTime = Time()

OnThreadEnd(
Expand Down Expand Up @@ -148,15 +150,34 @@ void function EarnMeterMP_PlayerLifeThink( entity player )

if ( lastEarnMeterMode == eEarnMeterMode.DEFAULT )
{
if ( Riff_TitanAvailability() != eTitanAvailability.Never )
{
if ( PlayerEarnMeter_GetOwnedFrac( player ) >= 0.75 && PlayerEarnMeter_GetOwnedFrac( player ) < 0.95 && !saidTitanSoon )
{
PlayFactionDialogueToPlayer( "mp_titanSoon", player )
saidTitanSoon = true
}
else if( PlayerEarnMeter_GetOwnedFrac( player ) < 0.75 )
saidTitanSoon = false
}

if ( PlayerEarnMeter_GetOwnedFrac( player ) < 1.0 )
{
PlayerEarnMeter_DisableGoal( player )
titanReadyMsg = false
}
else if ( player.GetPlayerNetInt( "goalState" ) != eRewardState.UNAVAILABLE )
{
// if goal is enabled then the client will show "titan ready" alerts even if it isn't
// the problem is that if the goal isn't available when we fill the earnmeter, then it won't make it available
// so unfortunately we have to do this manually
player.SetPlayerNetInt( "goalState", eRewardState.AVAILABLE )
PlayerEarnMeter_RefreshGoal( player )
if( !titanReadyMsg )
{
Remote_CallFunction_NonReplay( player, "ServerCallback_TitanReadyMessage" )
titanReadyMsg = true
}
}

if ( Time() - lastPassiveGainTime > 4.0 && file.passiveMeterGainEnabled ) // this might be 5.0
Expand Down

0 comments on commit a2c344e

Please sign in to comment.