Skip to content

Commit

Permalink
Fix CSquirrelVM::Init hook in server.dll (#544)
Browse files Browse the repository at this point in the history
Fix typo in offset
  • Loading branch information
F1F7Y authored Sep 14, 2023
1 parent e51d345 commit 1979247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NorthstarDLL/squirrel/squirrel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ ON_DLL_LOAD_RELIESON("server.dll", ServerSquirrel, ConCommand, (CModule module))
MAKEHOOK(module.Offset(0x26E20), &DestroyVMHook<ScriptContext::SERVER>, &DestroyVM<ScriptContext::SERVER>);
MAKEHOOK(module.Offset(0x799E0), &ScriptCompileErrorHook<ScriptContext::SERVER>, &SQCompileError<ScriptContext::SERVER>);
MAKEHOOK(module.Offset(0x1D5C0), &CallScriptInitCallbackHook<ScriptContext::SERVER>, &CallScriptInitCallback<ScriptContext::SERVER>);
MAKEHOOK(module.Offset(0x17BE0), &CSquirrelVM_initHook<ScriptContext::SERVER>, &CSquirrelVM_init<ScriptContext::SERVER>);
MAKEHOOK(module.Offset(0x1B7E0), &CSquirrelVM_initHook<ScriptContext::SERVER>, &CSquirrelVM_init<ScriptContext::SERVER>);
// FCVAR_CHEAT and FCVAR_GAMEDLL_FOR_REMOTE_CLIENTS allows clients to execute this, but since it's unsafe we only allow it when cheats
// are enabled for script_client and script_ui, we don't use cheats, so clients can execute them on themselves all they want
RegisterConCommand(
Expand Down

0 comments on commit 1979247

Please sign in to comment.