1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-21 20:27:13 +01:00

Stop using hard-coded values for plug-in commands in the host plug-in.

This commit is contained in:
Sandu Liviu Catalin 2016-07-17 03:56:52 +03:00
parent 78f5ef7811
commit 9434deb804
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
// ------------------------------------------------------------------------------------------------
#include "Core.hpp"
#include "Logger.hpp"
#include "SqMod.h"
// ------------------------------------------------------------------------------------------------
#include "Entity/Blip.hpp"
@ -350,7 +351,7 @@ bool Core::Execute()
LogDbg("Signaling outside plug-ins to register their API");
// Tell modules to do their monkey business
_Func->SendPluginCommand(0xDEADBABE, "");
_Func->SendPluginCommand(SQMOD_LOAD_CMD, "");
LogDbg("Attempting to compile the specified scripts");
// Compile scripts first so that the constants can take effect
@ -447,7 +448,7 @@ void Core::Terminate(bool shutdown)
{
LogDbg("Signaling outside plug-ins to release their resources");
// Tell modules to do their monkey business
_Func->SendPluginCommand(0xDEADC0DE, "");
_Func->SendPluginCommand(SQMOD_TERMINATE_CMD, "");
}
LogDbg("Clearing the entity containers");
// Release all entity resources by clearing the containers
@ -488,7 +489,7 @@ void Core::Terminate(bool shutdown)
LogDbg("Signaling outside plug-ins to release the virtual machine");
// Tell modules to do their monkey business
_Func->SendPluginCommand(0xDEADBEAF, "");
_Func->SendPluginCommand(SQMOD_RELEASED_CMD, "");
}
LogDbg("Squirrel plugin was successfully terminated");

View File

@ -91,7 +91,7 @@ static uint8_t OnServerInitialise(void)
try
{
// Signal outside plug-ins to do fetch our proxies
_Func->SendPluginCommand(0xDABBAD00, "%d", SQMOD_API_VER);
_Func->SendPluginCommand(SQMOD_INITIALIZE_CMD, "%d", SQMOD_API_VER);
// Attempt to load the module core
if (Core::Get().Execute())
{