1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2026-01-14 11:14:40 +01:00

Implement new API changes.

Initial implementation of entity streaming events, 3D arrows, drunk effects., camera interpolation, entity options and whatnot. Not yet tested!
This commit is contained in:
Sandu Liviu Catalin
2019-06-02 00:39:06 +03:00
parent 0b0ec9c40c
commit 7fdcf7efc0
11 changed files with 452 additions and 12 deletions

View File

@@ -867,6 +867,19 @@ static void OnEntityPoolChange(vcmpEntityPool entity_type, int32_t entity_id, ui
SQMOD_RELOAD_CHECK(false)
}
// ------------------------------------------------------------------------------------------------
static void OnEntityStreamingChange(int32_t player_id, int32_t entity_id, vcmpEntityPool entity_type, uint8_t is_deleted)
{
// Attempt to forward the event
try
{
Core::Get().EmitEntityStreaming(player_id, entity_id, entity_type, is_deleted);
}
SQMOD_CATCH_EVENT_EXCEPTION(OnEntityStreamingChange)
// See if a reload was requested
SQMOD_RELOAD_CHECK(false)
}
// ------------------------------------------------------------------------------------------------
static void OnServerPerformanceReport(size_t /*entry_count*/, CCStr * /*descriptions*/, uint64_t * /*times*/)
{
@@ -973,6 +986,7 @@ SQMOD_API_EXPORT unsigned int VcmpPluginInit(PluginFuncs * funcs, PluginCallback
_Clbk->OnEntityPoolChange = OnEntityPoolChange;
_Clbk->OnServerPerformanceReport = OnServerPerformanceReport;
_Clbk->OnPlayerModuleList = OnPlayerModuleList;
_Clbk->OnEntityStreamingChange = OnEntityStreamingChange;
// Attempt to initialize the plug-in exports
InitExports();
// Dummy spacing