mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#include "core/stdafx.h"
|
|
#include "ebisusdk/EbisuSDK.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
bool IsOriginInitialized()
|
|
{
|
|
#ifndef DEDICATED
|
|
if ((!(*g_OriginErrorLevel)
|
|
&& (*g_bEbisuSDKInitialized)
|
|
&& (*g_NucleusID)
|
|
&& (*g_bEbisuSDKCvarInitialized)))
|
|
// && (*g_OriginAuthCode)
|
|
// && (g_OriginNucleusToken[0])))
|
|
#endif // DEDICATED
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: sets the EbisuSDK globals for dedicated to satisfy command callbacks
|
|
//-----------------------------------------------------------------------------
|
|
void HEbisuSDK_Init()
|
|
{
|
|
|
|
FILE* sNameCfg;
|
|
CHAR sNameBuf[64] = { 0 };
|
|
fopen_s(&sNameCfg, "platform\\cfg\\name.cfg", "r");
|
|
|
|
if (sNameCfg)
|
|
{
|
|
while (fgets(sNameBuf, sizeof(sNameBuf), sNameCfg) != NULL)
|
|
{
|
|
fclose(sNameCfg);
|
|
}
|
|
}
|
|
memcpy((char*)g_sPlayerName, sNameBuf, sizeof(sNameBuf));
|
|
|
|
*(char*)g_bEbisuSDKInitialized = (char)0x1; // <- 1st EbisuSDK check
|
|
*(char*)g_bEbisuSDKCvarInitialized = (char)0x1; // <- 2nd EbisuSDK check
|
|
*(char*)g_NucleusID = (char)0x1; // <- 3rd EbisuSDK
|
|
|
|
#ifdef DEDICATED
|
|
*(char*)g_bEbisuSDKInitialized = (char)0x1; // <- 1st EbisuSDK
|
|
*(char*)g_bEbisuSDKCvarInitialized = (char)0x1; // <- 2nd EbisuSDK
|
|
*(char*)g_NucleusID = (char)0x1; // <- 3rd EbisuSDK
|
|
#endif // DEDICATED
|
|
}
|
|
|
|
void EbisuSDK_Attach()
|
|
{
|
|
//
|
|
}
|
|
|
|
void EbisuSDK_Detach()
|
|
{
|
|
//
|
|
}
|