Common: EULA accept check should always return true for dedicated servers

IsEULAUpToDate will always fail on dedicated servers as there is no user interface to display and accept the EULA (dedi's can also be ran without a terminal). The dedicated server users agree with the EULA upon launching the dedicated server.
This commit is contained in:
Kawe Mazidjatari 2024-10-06 22:33:09 +02:00
parent 7a62cf8c8b
commit ab0672126d
2 changed files with 21 additions and 9 deletions

View File

@ -514,4 +514,23 @@ void ConCommand_PurgeShipped(void)
}
}
#endif // DEDICATED
}
}
//-----------------------------------------------------------------------------
// Purpose: checks if the accepted EULA is up to date.
// Output : true on success, false on failure.
//-----------------------------------------------------------------------------
bool IsEULAUpToDate()
{
#ifdef DEDICATED
// Users of the dedicated servers are by default agreeing to the EULA
// when using it. They can use it offline (not using the r5reloaded
// master servers) to not accept it. The challenge of implementing
// something that allows the dedi operator to agree to the EULA upon
// launch is that it will break the automation of spinning up dedi
// instances.
return true;
#else
return (eula_version_accepted->GetInt() == eula_version->GetInt());
#endif // DEDICATED
}

View File

@ -135,14 +135,7 @@ extern ConVar* rui_defaultDebugFontFace;
extern ConVar* miles_language;
#endif
//-----------------------------------------------------------------------------
// Purpose: checks if the accepted EULA is up to date.
// Output : true on success, false on failure.
//-----------------------------------------------------------------------------
inline bool IsEULAUpToDate()
{
return (eula_version_accepted->GetInt() == eula_version->GetInt());
}
bool IsEULAUpToDate();
void ConVar_InitShipped(void);
void ConVar_PurgeShipped(void);