File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,6 +227,44 @@ void ConCommand_ns_send_friend_request(const CCommand& args)
227227}
228228
229229
230+ DECLARE_HOOK (
231+ CheckIfOriginIsInstalled,
232+ engine.dll + 0xa1850 ,
233+ [](auto & hook, void * a1) -> bool
234+ {
235+ if (!strstr (GetCommandLineA (), " -noOriginStartup" ))
236+ return hook.Original (a1);
237+
238+ if (hook.Original (a1))
239+ {
240+ NS::log::NORTHSTAR->warn (
241+ " Origin is NOT installed according to OriginSDK's check (HKLM\\ SOFTWARE\\ Wow6432Node\\ Origin\\ ClientPath is "
242+ " missing/empty)." );
243+ NS::log::NORTHSTAR->warn (
244+ " We are bypassing this check in case LSX server is remotely ran (such as in Linux in another WINE prefix), but note that "
245+ " things will fail if Origin is actually not running." );
246+ }
247+
248+ return true ;
249+ });
250+
251+ DECLARE_HOOK (
252+ TryToStartOrigin,
253+ engine.dll + 0xa19b0 ,
254+ [](auto & hook, void * a1) -> uint64_t
255+ {
256+ if (!strstr (GetCommandLineA (), " -noOriginStartup" ))
257+ return hook.Original (a1);
258+
259+ if (hook.Original (a1) != 0 )
260+ {
261+ NS::log::NORTHSTAR->warn (
262+ " Origin process has failed to start. We are ignoring this and let it fail on LSX connection attempt, because LSX might "
263+ " still be up regardless, even if this failed." );
264+ }
265+ return 0 ;
266+ });
267+
230268ON_DLL_LOAD_CLIENT_RELIESON (" engine.dll" , ClientOrigin, ConCommand, [](CModule module )
231269{
232270 DISPATCH_MODULE (OriginHooks)
You can’t perform that action at this time.
0 commit comments