@@ -91,6 +91,8 @@ void function EarnMeterMP_PlayerLifeThink( entity player )
91
91
EarnObject pilotReward = PlayerEarnMeter_GetReward( player )
92
92
float pilotRewardFrac = PlayerEarnMeter_GetRewardFrac( player )
93
93
int lastEarnMeterMode = PlayerEarnMeter_GetMode( player )
94
+ bool saidTitanSoon = false
95
+ bool titanReadyMsg = false
94
96
float lastPassiveGainTime = Time()
95
97
96
98
OnThreadEnd(
@@ -148,15 +150,34 @@ void function EarnMeterMP_PlayerLifeThink( entity player )
148
150
149
151
if ( lastEarnMeterMode == eEarnMeterMode.DEFAULT )
150
152
{
153
+ if ( Riff_TitanAvailability() != eTitanAvailability.Never )
154
+ {
155
+ if ( PlayerEarnMeter_GetOwnedFrac( player ) >= 0.75 && PlayerEarnMeter_GetOwnedFrac( player ) < 0.95 && !saidTitanSoon )
156
+ {
157
+ PlayFactionDialogueToPlayer( "mp_titanSoon", player )
158
+ saidTitanSoon = true
159
+ }
160
+ else if( PlayerEarnMeter_GetOwnedFrac( player ) < 0.75 )
161
+ saidTitanSoon = false
162
+ }
163
+
151
164
if ( PlayerEarnMeter_GetOwnedFrac( player ) < 1.0 )
165
+ {
152
166
PlayerEarnMeter_DisableGoal( player )
167
+ titanReadyMsg = false
168
+ }
153
169
else if ( player.GetPlayerNetInt( "goalState" ) != eRewardState.UNAVAILABLE )
154
170
{
155
171
// if goal is enabled then the client will show "titan ready" alerts even if it isn't
156
172
// the problem is that if the goal isn't available when we fill the earnmeter, then it won't make it available
157
173
// so unfortunately we have to do this manually
158
174
player.SetPlayerNetInt( "goalState", eRewardState.AVAILABLE )
159
175
PlayerEarnMeter_RefreshGoal( player )
176
+ if( !titanReadyMsg )
177
+ {
178
+ Remote_CallFunction_NonReplay( player, "ServerCallback_TitanReadyMessage" )
179
+ titanReadyMsg = true
180
+ }
160
181
}
161
182
162
183
if ( Time() - lastPassiveGainTime > 4.0 && file.passiveMeterGainEnabled ) // this might be 5.0
0 commit comments