mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Candidate for backwards compatibility.
This commit is contained in:
parent
f32a7f59f0
commit
b269517e6f
@ -2,7 +2,7 @@
|
|||||||
Project: Vice City Multiplayer 0.4 Server / Plugin Kit
|
Project: Vice City Multiplayer 0.4 Server / Plugin Kit
|
||||||
File: plugin.h
|
File: plugin.h
|
||||||
|
|
||||||
Copyright 2011-2019 Ago Allikmaa (maxorator)
|
Copyright 2011-2016 Ago Allikmaa (maxorator)
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -31,7 +31,7 @@ typedef struct {
|
|||||||
} ServerSettings;
|
} ServerSettings;
|
||||||
|
|
||||||
#define PLUGIN_API_MAJOR 2
|
#define PLUGIN_API_MAJOR 2
|
||||||
#define PLUGIN_API_MINOR 1
|
#define PLUGIN_API_MINOR 0
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t structSize;
|
uint32_t structSize;
|
||||||
@ -60,8 +60,6 @@ typedef enum {
|
|||||||
vcmpEntityPoolObject = 2,
|
vcmpEntityPoolObject = 2,
|
||||||
vcmpEntityPoolPickup = 3,
|
vcmpEntityPoolPickup = 3,
|
||||||
vcmpEntityPoolRadio = 4,
|
vcmpEntityPoolRadio = 4,
|
||||||
vcmpEntityPoolPlayer = 5,
|
|
||||||
vcmpEntityReserved1 = 6,
|
|
||||||
vcmpEntityPoolBlip = 7,
|
vcmpEntityPoolBlip = 7,
|
||||||
vcmpEntityPoolCheckPoint = 8,
|
vcmpEntityPoolCheckPoint = 8,
|
||||||
forceSizeVcmpEntityPool = INT32_MAX
|
forceSizeVcmpEntityPool = INT32_MAX
|
||||||
@ -103,7 +101,7 @@ typedef enum {
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
vcmpPlayerUpdateNormal = 0,
|
vcmpPlayerUpdateNormal = 0,
|
||||||
vcmpPlayerUpdateAimingDeprecated = 1,
|
vcmpPlayerUpdateAiming = 1,
|
||||||
vcmpPlayerUpdateDriver = 2,
|
vcmpPlayerUpdateDriver = 2,
|
||||||
vcmpPlayerUpdatePassenger = 3,
|
vcmpPlayerUpdatePassenger = 3,
|
||||||
forceSizeVcmpPlayerUpdate = INT32_MAX
|
forceSizeVcmpPlayerUpdate = INT32_MAX
|
||||||
@ -158,7 +156,6 @@ typedef enum {
|
|||||||
vcmpServerOptionWallGlitch = 19,
|
vcmpServerOptionWallGlitch = 19,
|
||||||
vcmpServerOptionDisableBackfaceCulling = 20,
|
vcmpServerOptionDisableBackfaceCulling = 20,
|
||||||
vcmpServerOptionDisableHeliBladeDamage = 21,
|
vcmpServerOptionDisableHeliBladeDamage = 21,
|
||||||
vcmpServerOptionDisableCrouch = 22,
|
|
||||||
forceSizeVcmpServerOption = INT32_MAX
|
forceSizeVcmpServerOption = INT32_MAX
|
||||||
} vcmpServerOption;
|
} vcmpServerOption;
|
||||||
|
|
||||||
@ -172,8 +169,7 @@ typedef enum {
|
|||||||
vcmpPlayerOptionCanAttack = 6,
|
vcmpPlayerOptionCanAttack = 6,
|
||||||
vcmpPlayerOptionHasMarker = 7,
|
vcmpPlayerOptionHasMarker = 7,
|
||||||
vcmpPlayerOptionChatTagsEnabled = 8,
|
vcmpPlayerOptionChatTagsEnabled = 8,
|
||||||
vcmpPlayerOptionDrunkEffectsDeprecated = 9,
|
vcmpPlayerOptionDrunkEffects = 9,
|
||||||
vcmpPlayerOptionBleeding = 10,
|
|
||||||
forceSizeVcmpPlayerOption = INT32_MAX
|
forceSizeVcmpPlayerOption = INT32_MAX
|
||||||
} vcmpPlayerOption;
|
} vcmpPlayerOption;
|
||||||
|
|
||||||
@ -185,9 +181,6 @@ typedef enum {
|
|||||||
vcmpVehicleOptionGhost = 4,
|
vcmpVehicleOptionGhost = 4,
|
||||||
vcmpVehicleOptionSiren = 5,
|
vcmpVehicleOptionSiren = 5,
|
||||||
vcmpVehicleOptionSingleUse = 6,
|
vcmpVehicleOptionSingleUse = 6,
|
||||||
vcmpVehicleOptionEngineDisabled = 7,
|
|
||||||
vcmpVehicleOptionBootOpen = 8,
|
|
||||||
vcmpVehicleOptionBonnetOpen = 9,
|
|
||||||
forceSizeVcmpVehicleOption = INT32_MAX
|
forceSizeVcmpVehicleOption = INT32_MAX
|
||||||
} vcmpVehicleOption;
|
} vcmpVehicleOption;
|
||||||
|
|
||||||
@ -196,31 +189,6 @@ typedef enum {
|
|||||||
forceSizeVcmpPickupOption = INT32_MAX
|
forceSizeVcmpPickupOption = INT32_MAX
|
||||||
} vcmpPickupOption;
|
} vcmpPickupOption;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
vcmpNetworkStatisticsOptionDataSentPerSecond = 0,
|
|
||||||
vcmpNetworkStatisticsOptionDataResentPerSecond = 1,
|
|
||||||
vcmpNetworkStatisticsOptionDataReceivedPerSecond = 2,
|
|
||||||
vcmpNetworkStatisticsOptionDataDiscardedPerSecond = 3,
|
|
||||||
vcmpNetworkStatisticsOptionAllBytesSentPerSecond = 4,
|
|
||||||
vcmpNetworkStatisticsOptionAllBytesReceivedPerSecond = 5,
|
|
||||||
|
|
||||||
vcmpNetworkStatisticsOptionDataSentTotal = 6,
|
|
||||||
vcmpNetworkStatisticsOptionDataResentTotal = 7,
|
|
||||||
vcmpNetworkStatisticsOptionDataReceivedTotal = 8,
|
|
||||||
vcmpNetworkStatisticsOptionDataDiscardedTotal = 9,
|
|
||||||
vcmpNetworkStatisticsOptionAllBytesSentTotal = 10,
|
|
||||||
vcmpNetworkStatisticsOptionAllBytesReceivedTotal = 11,
|
|
||||||
|
|
||||||
vcmpNetworkStatisticsOptionMessagesWaiting = 12,
|
|
||||||
vcmpNetworkStatisticsOptionMessagesResending = 13,
|
|
||||||
vcmpNetworkStatisticsOptionBytesResending = 14,
|
|
||||||
|
|
||||||
vcmpNetworkStatisticsOptionPacketLossPerSecond = 15,
|
|
||||||
vcmpNetworkStatisticsOptionPacketLossTotal = 16,
|
|
||||||
|
|
||||||
forceSizeVcmpNetworkStatisticsOption = INT32_MAX
|
|
||||||
} vcmpNetworkStatisticsOption;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t structSize;
|
uint32_t structSize;
|
||||||
|
|
||||||
@ -238,7 +206,7 @@ typedef struct {
|
|||||||
uint32_t (*GetNumberOfPlugins) (void);
|
uint32_t (*GetNumberOfPlugins) (void);
|
||||||
/* vcmpErrorNoSuchEntity, vcmpErrorNullArgument */
|
/* vcmpErrorNoSuchEntity, vcmpErrorNullArgument */
|
||||||
vcmpError (*GetPluginInfo) (int32_t pluginId, PluginInfo* pluginInfo);
|
vcmpError (*GetPluginInfo) (int32_t pluginId, PluginInfo* pluginInfo);
|
||||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
/* -1 == vcmpEntityNone */
|
||||||
int32_t (*FindPlugin) (const char* pluginName);
|
int32_t (*FindPlugin) (const char* pluginName);
|
||||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||||
const void** (*GetPluginExports) (int32_t pluginId, size_t* exportCount);
|
const void** (*GetPluginExports) (int32_t pluginId, size_t* exportCount);
|
||||||
@ -378,7 +346,7 @@ typedef struct {
|
|||||||
* Key binds
|
* Key binds
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
/* -1 == vcmpEntityNone */
|
||||||
int32_t (*GetKeyBindUnusedSlot) (void);
|
int32_t (*GetKeyBindUnusedSlot) (void);
|
||||||
/* vcmpErrorNoSuchEntity */
|
/* vcmpErrorNoSuchEntity */
|
||||||
vcmpError (*GetKeyBindData) (int32_t bindId, uint8_t* isCalledOnReleaseOut, int32_t* keyOneOut, int32_t* keyTwoOut, int32_t* keyThreeOut);
|
vcmpError (*GetKeyBindData) (int32_t bindId, uint8_t* isCalledOnReleaseOut, int32_t* keyOneOut, int32_t* keyTwoOut, int32_t* keyThreeOut);
|
||||||
@ -451,7 +419,7 @@ typedef struct {
|
|||||||
* Player access and basic info
|
* Player access and basic info
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
/* -1 == vcmpEntityNone */
|
||||||
int32_t (*GetPlayerIdFromName) (const char* name);
|
int32_t (*GetPlayerIdFromName) (const char* name);
|
||||||
/* success */
|
/* success */
|
||||||
uint8_t (*IsPlayerConnected) (int32_t playerId);
|
uint8_t (*IsPlayerConnected) (int32_t playerId);
|
||||||
@ -921,8 +889,7 @@ typedef struct {
|
|||||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||||
uint8_t (*IsObjectTouchedReportEnabled) (int32_t objectId);
|
uint8_t (*IsObjectTouchedReportEnabled) (int32_t objectId);
|
||||||
|
|
||||||
/* 04rel005 SDK functions */
|
// TODO: MOVE LATER
|
||||||
/* ---------------------------------------------------------- */
|
|
||||||
vcmpError (*GetPlayerModuleList) (int32_t playerId);
|
vcmpError (*GetPlayerModuleList) (int32_t playerId);
|
||||||
|
|
||||||
/* vcmpErrorNoSuchEntity, vcmpErrorArgumentOutOfBounds */
|
/* vcmpErrorNoSuchEntity, vcmpErrorArgumentOutOfBounds */
|
||||||
@ -940,35 +907,6 @@ typedef struct {
|
|||||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||||
uint32_t(*GetVehicleLightsData) (int32_t vehicleId);
|
uint32_t(*GetVehicleLightsData) (int32_t vehicleId);
|
||||||
|
|
||||||
/* 04rel007 SDK functions */
|
|
||||||
/* ---------------------------------------------------------- */
|
|
||||||
/* vcmpErrorNoSuchEntity */
|
|
||||||
vcmpError (*KillPlayer) (int32_t playerId);
|
|
||||||
|
|
||||||
/* vcmpErrorNoSuchEntity */
|
|
||||||
vcmpError (*SetVehicle3DArrowForPlayer) (int32_t vehicleId, int32_t targetPlayerId, uint8_t isEnabled);
|
|
||||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
|
||||||
uint8_t (*GetVehicle3DArrowForPlayer) (int32_t vehicleId, int32_t targetPlayerId);
|
|
||||||
/* vcmpErrorNoSuchEntity */
|
|
||||||
vcmpError (*SetPlayer3DArrowForPlayer) (int32_t playerId, int32_t targetPlayerId, uint8_t isEnabled);
|
|
||||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
|
||||||
uint8_t (*GetPlayer3DArrowForPlayer) (int32_t playerId, int32_t targetPlayerId);
|
|
||||||
|
|
||||||
/* vcmpErrorNoSuchEntity */
|
|
||||||
vcmpError (*SetPlayerDrunkHandling) (int32_t playerId, uint32_t drunkLevel);
|
|
||||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
|
||||||
uint32_t (*GetPlayerDrunkHandling) (int32_t playerId);
|
|
||||||
/* vcmpErrorNoSuchEntity */
|
|
||||||
vcmpError (*SetPlayerDrunkVisuals) (int32_t playerId, uint8_t drunkLevel);
|
|
||||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
|
||||||
uint8_t (*GetPlayerDrunkVisuals) (int32_t playerId);
|
|
||||||
|
|
||||||
/* vcmpErrorNoSuchEntity, vcmpErrorRequestDenied */
|
|
||||||
vcmpError (*InterpolateCameraLookAt) (int32_t playerId, float lookX, float lookY, float lookZ, uint32_t interpTimeMS);
|
|
||||||
|
|
||||||
/* GetLastError: vcmpErrorNoSuchEntity, vcmpErrorArgumentOutOfBounds */
|
|
||||||
double (*GetNetworkStatistics) (int32_t playerId, vcmpNetworkStatisticsOption option);
|
|
||||||
|
|
||||||
} PluginFuncs;
|
} PluginFuncs;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -1031,12 +969,7 @@ typedef struct {
|
|||||||
void (*OnEntityPoolChange) (vcmpEntityPool entityType, int32_t entityId, uint8_t isDeleted);
|
void (*OnEntityPoolChange) (vcmpEntityPool entityType, int32_t entityId, uint8_t isDeleted);
|
||||||
void (*OnServerPerformanceReport) (size_t entryCount, const char** descriptions, uint64_t* times);
|
void (*OnServerPerformanceReport) (size_t entryCount, const char** descriptions, uint64_t* times);
|
||||||
|
|
||||||
/* 04rel005 SDK functions */
|
// TODO: MOVE LATER
|
||||||
/* ---------------------------------------------------------- */
|
|
||||||
void(*OnPlayerModuleList) (int32_t playerId, const char* list);
|
void(*OnPlayerModuleList) (int32_t playerId, const char* list);
|
||||||
|
|
||||||
/* 04rel007 SDK functions */
|
|
||||||
/* ---------------------------------------------------------- */
|
|
||||||
void (*OnEntityStreamingChange) (int32_t playerId, int32_t entityId, vcmpEntityPool entityType, uint8_t isDeleted);
|
|
||||||
|
|
||||||
} PluginCallbacks;
|
} PluginCallbacks;
|
1042
include/vcmp.new.h
Normal file
1042
include/vcmp.new.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -194,8 +194,9 @@ protected:
|
|||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnDestroyed;
|
SignalPair mOnDestroyed;
|
||||||
SignalPair mOnCustom;
|
SignalPair mOnCustom;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnStream;
|
SignalPair mOnStream;
|
||||||
|
#endif
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnEntered;
|
SignalPair mOnEntered;
|
||||||
SignalPair mOnExited;
|
SignalPair mOnExited;
|
||||||
@ -327,8 +328,9 @@ protected:
|
|||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnDestroyed;
|
SignalPair mOnDestroyed;
|
||||||
SignalPair mOnCustom;
|
SignalPair mOnCustom;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnStream;
|
SignalPair mOnStream;
|
||||||
|
#endif
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnShot;
|
SignalPair mOnShot;
|
||||||
SignalPair mOnTouched;
|
SignalPair mOnTouched;
|
||||||
@ -393,8 +395,9 @@ protected:
|
|||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnDestroyed;
|
SignalPair mOnDestroyed;
|
||||||
SignalPair mOnCustom;
|
SignalPair mOnCustom;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnStream;
|
SignalPair mOnStream;
|
||||||
|
#endif
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnRespawn;
|
SignalPair mOnRespawn;
|
||||||
SignalPair mOnClaimed;
|
SignalPair mOnClaimed;
|
||||||
@ -487,8 +490,9 @@ protected:
|
|||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnDestroyed;
|
SignalPair mOnDestroyed;
|
||||||
SignalPair mOnCustom;
|
SignalPair mOnCustom;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnStream;
|
SignalPair mOnStream;
|
||||||
|
#endif
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnRequestClass;
|
SignalPair mOnRequestClass;
|
||||||
SignalPair mOnRequestSpawn;
|
SignalPair mOnRequestSpawn;
|
||||||
@ -545,7 +549,9 @@ protected:
|
|||||||
SignalPair mOnCheckpointEntered;
|
SignalPair mOnCheckpointEntered;
|
||||||
SignalPair mOnCheckpointExited;
|
SignalPair mOnCheckpointExited;
|
||||||
SignalPair mOnClientScriptData;
|
SignalPair mOnClientScriptData;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnEntityStream;
|
SignalPair mOnEntityStream;
|
||||||
|
#endif
|
||||||
SignalPair mOnUpdate;
|
SignalPair mOnUpdate;
|
||||||
SignalPair mOnHealth;
|
SignalPair mOnHealth;
|
||||||
SignalPair mOnArmour;
|
SignalPair mOnArmour;
|
||||||
@ -636,8 +642,9 @@ protected:
|
|||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnDestroyed;
|
SignalPair mOnDestroyed;
|
||||||
SignalPair mOnCustom;
|
SignalPair mOnCustom;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnStream;
|
SignalPair mOnStream;
|
||||||
|
#endif
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
SignalPair mOnEmbarking;
|
SignalPair mOnEmbarking;
|
||||||
SignalPair mOnEmbarked;
|
SignalPair mOnEmbarked;
|
||||||
@ -1265,7 +1272,7 @@ public:
|
|||||||
* Entity pool changes events.
|
* Entity pool changes events.
|
||||||
*/
|
*/
|
||||||
void EmitEntityPool(vcmpEntityPool entity_type, Int32 entity_id, bool is_deleted);
|
void EmitEntityPool(vcmpEntityPool entity_type, Int32 entity_id, bool is_deleted);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Entity streaming changes events.
|
* Entity streaming changes events.
|
||||||
*/
|
*/
|
||||||
@ -1275,7 +1282,7 @@ public:
|
|||||||
void EmitPlayerStream(int32_t player_id, int32_t entity_id, bool is_deleted);
|
void EmitPlayerStream(int32_t player_id, int32_t entity_id, bool is_deleted);
|
||||||
void EmitVehicleStream(int32_t player_id, int32_t entity_id, bool is_deleted);
|
void EmitVehicleStream(int32_t player_id, int32_t entity_id, bool is_deleted);
|
||||||
void EmitEntityStreaming(int32_t player_id, int32_t entity_id, vcmpEntityPool entity_type, bool is_deleted);
|
void EmitEntityStreaming(int32_t player_id, int32_t entity_id, vcmpEntityPool entity_type, bool is_deleted);
|
||||||
|
#endif
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Entity update events.
|
* Entity update events.
|
||||||
*/
|
*/
|
||||||
@ -1321,11 +1328,13 @@ public:
|
|||||||
SignalPair mOnPickupCustom;
|
SignalPair mOnPickupCustom;
|
||||||
SignalPair mOnPlayerCustom;
|
SignalPair mOnPlayerCustom;
|
||||||
SignalPair mOnVehicleCustom;
|
SignalPair mOnVehicleCustom;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnCheckpointStream;
|
SignalPair mOnCheckpointStream;
|
||||||
SignalPair mOnObjectStream;
|
SignalPair mOnObjectStream;
|
||||||
SignalPair mOnPickupStream;
|
SignalPair mOnPickupStream;
|
||||||
SignalPair mOnPlayerStream;
|
SignalPair mOnPlayerStream;
|
||||||
SignalPair mOnVehicleStream;
|
SignalPair mOnVehicleStream;
|
||||||
|
#endif
|
||||||
SignalPair mOnServerStartup;
|
SignalPair mOnServerStartup;
|
||||||
SignalPair mOnServerShutdown;
|
SignalPair mOnServerShutdown;
|
||||||
SignalPair mOnServerFrame;
|
SignalPair mOnServerFrame;
|
||||||
@ -1432,7 +1441,9 @@ public:
|
|||||||
SignalPair mOnVehicleHandlingRule;
|
SignalPair mOnVehicleHandlingRule;
|
||||||
SignalPair mOnVehicleEnterArea;
|
SignalPair mOnVehicleEnterArea;
|
||||||
SignalPair mOnVehicleLeaveArea;
|
SignalPair mOnVehicleLeaveArea;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
SignalPair mOnEntityStream;
|
SignalPair mOnEntityStream;
|
||||||
|
#endif
|
||||||
SignalPair mOnServerOption;
|
SignalPair mOnServerOption;
|
||||||
SignalPair mOnScriptReload;
|
SignalPair mOnScriptReload;
|
||||||
SignalPair mOnScriptLoaded;
|
SignalPair mOnScriptLoaded;
|
||||||
|
@ -1364,12 +1364,14 @@ void Core::EmitEntityPool(vcmpEntityPool entity_type, Int32 entity_id, bool is_d
|
|||||||
case vcmpEntityPoolRadio:
|
case vcmpEntityPoolRadio:
|
||||||
// @TODO Implement...
|
// @TODO Implement...
|
||||||
//break;
|
//break;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
case vcmpEntityPoolPlayer:
|
case vcmpEntityPoolPlayer:
|
||||||
// @TODO Implement...
|
// @TODO Implement...
|
||||||
//break;
|
//break;
|
||||||
case vcmpEntityReserved1:
|
case vcmpEntityReserved1:
|
||||||
// @TODO Implement...
|
// @TODO Implement...
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case vcmpEntityPoolBlip:
|
case vcmpEntityPoolBlip:
|
||||||
// Do we even have this blip that we're trying to delete?
|
// Do we even have this blip that we're trying to delete?
|
||||||
if (is_deleted && VALID_ENTITY(m_Blips[entity_id].mID))
|
if (is_deleted && VALID_ENTITY(m_Blips[entity_id].mID))
|
||||||
@ -1551,7 +1553,7 @@ void Core::EmitPlayerUpdate(Int32 player_id, vcmpPlayerUpdate update_type)
|
|||||||
(*mOnPlayerUpdate.first)(inst.mObj, static_cast< Int32 >(update_type));
|
(*mOnPlayerUpdate.first)(inst.mObj, static_cast< Int32 >(update_type));
|
||||||
SQMOD_CO_EV_TRACEBACK("[TRACE>] Core::PlayerUpdate")
|
SQMOD_CO_EV_TRACEBACK("[TRACE>] Core::PlayerUpdate")
|
||||||
}
|
}
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Core::EmitCheckpointStream(int32_t player_id, int32_t entity_id, bool is_deleted)
|
void Core::EmitCheckpointStream(int32_t player_id, int32_t entity_id, bool is_deleted)
|
||||||
{
|
{
|
||||||
@ -1679,7 +1681,7 @@ void Core::EmitEntityStreaming(int32_t player_id, int32_t entity_id, vcmpEntityP
|
|||||||
}
|
}
|
||||||
SQMOD_CO_EV_TRACEBACK("[TRACE>] Core::EntityStreaming")
|
SQMOD_CO_EV_TRACEBACK("[TRACE>] Core::EntityStreaming")
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Core::EmitVehicleUpdate(Int32 vehicle_id, vcmpVehicleUpdate update_type)
|
void Core::EmitVehicleUpdate(Int32 vehicle_id, vcmpVehicleUpdate update_type)
|
||||||
{
|
{
|
||||||
|
@ -417,7 +417,9 @@ void Core::CheckpointInst::InitEvents()
|
|||||||
// Proceed to initializing the events
|
// Proceed to initializing the events
|
||||||
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
||||||
InitSignalPair(mOnCustom, mEvents, "Custom");
|
InitSignalPair(mOnCustom, mEvents, "Custom");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnStream, mEvents, "Stream");
|
InitSignalPair(mOnStream, mEvents, "Stream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnEntered, mEvents, "Entered");
|
InitSignalPair(mOnEntered, mEvents, "Entered");
|
||||||
InitSignalPair(mOnExited, mEvents, "Exited");
|
InitSignalPair(mOnExited, mEvents, "Exited");
|
||||||
InitSignalPair(mOnWorld, mEvents, "World");
|
InitSignalPair(mOnWorld, mEvents, "World");
|
||||||
@ -429,7 +431,9 @@ void Core::CheckpointInst::DropEvents()
|
|||||||
{
|
{
|
||||||
ResetSignalPair(mOnDestroyed);
|
ResetSignalPair(mOnDestroyed);
|
||||||
ResetSignalPair(mOnCustom);
|
ResetSignalPair(mOnCustom);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnStream);
|
ResetSignalPair(mOnStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnEntered);
|
ResetSignalPair(mOnEntered);
|
||||||
ResetSignalPair(mOnExited);
|
ResetSignalPair(mOnExited);
|
||||||
ResetSignalPair(mOnWorld);
|
ResetSignalPair(mOnWorld);
|
||||||
@ -485,7 +489,9 @@ void Core::ObjectInst::InitEvents()
|
|||||||
// Proceed to initializing the events
|
// Proceed to initializing the events
|
||||||
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
||||||
InitSignalPair(mOnCustom, mEvents, "Custom");
|
InitSignalPair(mOnCustom, mEvents, "Custom");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnStream, mEvents, "Stream");
|
InitSignalPair(mOnStream, mEvents, "Stream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnShot, mEvents, "Shot");
|
InitSignalPair(mOnShot, mEvents, "Shot");
|
||||||
InitSignalPair(mOnTouched, mEvents, "Touched");
|
InitSignalPair(mOnTouched, mEvents, "Touched");
|
||||||
InitSignalPair(mOnWorld, mEvents, "World");
|
InitSignalPair(mOnWorld, mEvents, "World");
|
||||||
@ -498,7 +504,9 @@ void Core::ObjectInst::DropEvents()
|
|||||||
{
|
{
|
||||||
ResetSignalPair(mOnDestroyed);
|
ResetSignalPair(mOnDestroyed);
|
||||||
ResetSignalPair(mOnCustom);
|
ResetSignalPair(mOnCustom);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnStream);
|
ResetSignalPair(mOnStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnShot);
|
ResetSignalPair(mOnShot);
|
||||||
ResetSignalPair(mOnTouched);
|
ResetSignalPair(mOnTouched);
|
||||||
ResetSignalPair(mOnWorld);
|
ResetSignalPair(mOnWorld);
|
||||||
@ -524,7 +532,9 @@ void Core::PickupInst::InitEvents()
|
|||||||
// Proceed to initializing the events
|
// Proceed to initializing the events
|
||||||
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
||||||
InitSignalPair(mOnCustom, mEvents, "Custom");
|
InitSignalPair(mOnCustom, mEvents, "Custom");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnStream, mEvents, "Stream");
|
InitSignalPair(mOnStream, mEvents, "Stream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnRespawn, mEvents, "Respawn");
|
InitSignalPair(mOnRespawn, mEvents, "Respawn");
|
||||||
InitSignalPair(mOnClaimed, mEvents, "Claimed");
|
InitSignalPair(mOnClaimed, mEvents, "Claimed");
|
||||||
InitSignalPair(mOnCollected, mEvents, "Collected");
|
InitSignalPair(mOnCollected, mEvents, "Collected");
|
||||||
@ -540,7 +550,9 @@ void Core::PickupInst::DropEvents()
|
|||||||
{
|
{
|
||||||
ResetSignalPair(mOnDestroyed);
|
ResetSignalPair(mOnDestroyed);
|
||||||
ResetSignalPair(mOnCustom);
|
ResetSignalPair(mOnCustom);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnStream);
|
ResetSignalPair(mOnStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnRespawn);
|
ResetSignalPair(mOnRespawn);
|
||||||
ResetSignalPair(mOnClaimed);
|
ResetSignalPair(mOnClaimed);
|
||||||
ResetSignalPair(mOnCollected);
|
ResetSignalPair(mOnCollected);
|
||||||
@ -569,7 +581,9 @@ void Core::PlayerInst::InitEvents()
|
|||||||
// Proceed to initializing the events
|
// Proceed to initializing the events
|
||||||
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
||||||
InitSignalPair(mOnCustom, mEvents, "Custom");
|
InitSignalPair(mOnCustom, mEvents, "Custom");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnStream, mEvents, "Stream");
|
InitSignalPair(mOnStream, mEvents, "Stream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnRequestClass, mEvents, "RequestClass");
|
InitSignalPair(mOnRequestClass, mEvents, "RequestClass");
|
||||||
InitSignalPair(mOnRequestSpawn, mEvents, "RequestSpawn");
|
InitSignalPair(mOnRequestSpawn, mEvents, "RequestSpawn");
|
||||||
InitSignalPair(mOnSpawn, mEvents, "Spawn");
|
InitSignalPair(mOnSpawn, mEvents, "Spawn");
|
||||||
@ -625,7 +639,9 @@ void Core::PlayerInst::InitEvents()
|
|||||||
InitSignalPair(mOnCheckpointEntered, mEvents, "CheckpointEntered");
|
InitSignalPair(mOnCheckpointEntered, mEvents, "CheckpointEntered");
|
||||||
InitSignalPair(mOnCheckpointExited, mEvents, "CheckpointExited");
|
InitSignalPair(mOnCheckpointExited, mEvents, "CheckpointExited");
|
||||||
InitSignalPair(mOnClientScriptData, mEvents, "ClientScriptData");
|
InitSignalPair(mOnClientScriptData, mEvents, "ClientScriptData");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnEntityStream, mEvents, "EntityStream");
|
InitSignalPair(mOnEntityStream, mEvents, "EntityStream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnUpdate, mEvents, "Update");
|
InitSignalPair(mOnUpdate, mEvents, "Update");
|
||||||
InitSignalPair(mOnHealth, mEvents, "Health");
|
InitSignalPair(mOnHealth, mEvents, "Health");
|
||||||
InitSignalPair(mOnArmour, mEvents, "Armour");
|
InitSignalPair(mOnArmour, mEvents, "Armour");
|
||||||
@ -651,7 +667,9 @@ void Core::PlayerInst::DropEvents()
|
|||||||
{
|
{
|
||||||
ResetSignalPair(mOnDestroyed);
|
ResetSignalPair(mOnDestroyed);
|
||||||
ResetSignalPair(mOnCustom);
|
ResetSignalPair(mOnCustom);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnStream);
|
ResetSignalPair(mOnStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnRequestClass);
|
ResetSignalPair(mOnRequestClass);
|
||||||
ResetSignalPair(mOnRequestSpawn);
|
ResetSignalPair(mOnRequestSpawn);
|
||||||
ResetSignalPair(mOnSpawn);
|
ResetSignalPair(mOnSpawn);
|
||||||
@ -707,7 +725,9 @@ void Core::PlayerInst::DropEvents()
|
|||||||
ResetSignalPair(mOnCheckpointEntered);
|
ResetSignalPair(mOnCheckpointEntered);
|
||||||
ResetSignalPair(mOnCheckpointExited);
|
ResetSignalPair(mOnCheckpointExited);
|
||||||
ResetSignalPair(mOnClientScriptData);
|
ResetSignalPair(mOnClientScriptData);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnEntityStream);
|
ResetSignalPair(mOnEntityStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnUpdate);
|
ResetSignalPair(mOnUpdate);
|
||||||
ResetSignalPair(mOnHealth);
|
ResetSignalPair(mOnHealth);
|
||||||
ResetSignalPair(mOnArmour);
|
ResetSignalPair(mOnArmour);
|
||||||
@ -746,7 +766,9 @@ void Core::VehicleInst::InitEvents()
|
|||||||
// Proceed to initializing the events
|
// Proceed to initializing the events
|
||||||
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
InitSignalPair(mOnDestroyed, mEvents, "Destroyed");
|
||||||
InitSignalPair(mOnCustom, mEvents, "Custom");
|
InitSignalPair(mOnCustom, mEvents, "Custom");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnStream, mEvents, "Stream");
|
InitSignalPair(mOnStream, mEvents, "Stream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnEmbarking, mEvents, "Embarking");
|
InitSignalPair(mOnEmbarking, mEvents, "Embarking");
|
||||||
InitSignalPair(mOnEmbarked, mEvents, "Embarked");
|
InitSignalPair(mOnEmbarked, mEvents, "Embarked");
|
||||||
InitSignalPair(mOnDisembark, mEvents, "Disembark");
|
InitSignalPair(mOnDisembark, mEvents, "Disembark");
|
||||||
@ -774,7 +796,9 @@ void Core::VehicleInst::DropEvents()
|
|||||||
{
|
{
|
||||||
ResetSignalPair(mOnDestroyed);
|
ResetSignalPair(mOnDestroyed);
|
||||||
ResetSignalPair(mOnCustom);
|
ResetSignalPair(mOnCustom);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnStream);
|
ResetSignalPair(mOnStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnEmbarking);
|
ResetSignalPair(mOnEmbarking);
|
||||||
ResetSignalPair(mOnEmbarked);
|
ResetSignalPair(mOnEmbarked);
|
||||||
ResetSignalPair(mOnDisembark);
|
ResetSignalPair(mOnDisembark);
|
||||||
|
@ -75,11 +75,13 @@ void Core::InitEvents()
|
|||||||
InitSignalPair(mOnPickupCustom, m_Events, "PickupCustom");
|
InitSignalPair(mOnPickupCustom, m_Events, "PickupCustom");
|
||||||
InitSignalPair(mOnPlayerCustom, m_Events, "PlayerCustom");
|
InitSignalPair(mOnPlayerCustom, m_Events, "PlayerCustom");
|
||||||
InitSignalPair(mOnVehicleCustom, m_Events, "VehicleCustom");
|
InitSignalPair(mOnVehicleCustom, m_Events, "VehicleCustom");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnCheckpointStream, m_Events, "CheckpointStream");
|
InitSignalPair(mOnCheckpointStream, m_Events, "CheckpointStream");
|
||||||
InitSignalPair(mOnObjectStream, m_Events, "ObjectStream");
|
InitSignalPair(mOnObjectStream, m_Events, "ObjectStream");
|
||||||
InitSignalPair(mOnPickupStream, m_Events, "PickupStream");
|
InitSignalPair(mOnPickupStream, m_Events, "PickupStream");
|
||||||
InitSignalPair(mOnPlayerStream, m_Events, "PlayerStream");
|
InitSignalPair(mOnPlayerStream, m_Events, "PlayerStream");
|
||||||
InitSignalPair(mOnVehicleStream, m_Events, "VehicleStream");
|
InitSignalPair(mOnVehicleStream, m_Events, "VehicleStream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnServerStartup, m_Events, "ServerStartup");
|
InitSignalPair(mOnServerStartup, m_Events, "ServerStartup");
|
||||||
InitSignalPair(mOnServerShutdown, m_Events, "ServerShutdown");
|
InitSignalPair(mOnServerShutdown, m_Events, "ServerShutdown");
|
||||||
InitSignalPair(mOnServerFrame, m_Events, "ServerFrame");
|
InitSignalPair(mOnServerFrame, m_Events, "ServerFrame");
|
||||||
@ -186,7 +188,9 @@ void Core::InitEvents()
|
|||||||
InitSignalPair(mOnVehicleHandlingRule, m_Events, "VehicleHandlingRule");
|
InitSignalPair(mOnVehicleHandlingRule, m_Events, "VehicleHandlingRule");
|
||||||
InitSignalPair(mOnVehicleEnterArea, m_Events, "VehicleEnterArea");
|
InitSignalPair(mOnVehicleEnterArea, m_Events, "VehicleEnterArea");
|
||||||
InitSignalPair(mOnVehicleLeaveArea, m_Events, "VehicleLeaveArea");
|
InitSignalPair(mOnVehicleLeaveArea, m_Events, "VehicleLeaveArea");
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
InitSignalPair(mOnEntityStream, m_Events, "EntityStream");
|
InitSignalPair(mOnEntityStream, m_Events, "EntityStream");
|
||||||
|
#endif
|
||||||
InitSignalPair(mOnServerOption, m_Events, "ServerOption");
|
InitSignalPair(mOnServerOption, m_Events, "ServerOption");
|
||||||
InitSignalPair(mOnScriptReload, m_Events, "ScriptReload");
|
InitSignalPair(mOnScriptReload, m_Events, "ScriptReload");
|
||||||
InitSignalPair(mOnScriptLoaded, m_Events, "ScriptLoaded");
|
InitSignalPair(mOnScriptLoaded, m_Events, "ScriptLoaded");
|
||||||
@ -216,11 +220,13 @@ void Core::DropEvents()
|
|||||||
ResetSignalPair(mOnPickupCustom);
|
ResetSignalPair(mOnPickupCustom);
|
||||||
ResetSignalPair(mOnPlayerCustom);
|
ResetSignalPair(mOnPlayerCustom);
|
||||||
ResetSignalPair(mOnVehicleCustom);
|
ResetSignalPair(mOnVehicleCustom);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnCheckpointStream);
|
ResetSignalPair(mOnCheckpointStream);
|
||||||
ResetSignalPair(mOnObjectStream);
|
ResetSignalPair(mOnObjectStream);
|
||||||
ResetSignalPair(mOnPickupStream);
|
ResetSignalPair(mOnPickupStream);
|
||||||
ResetSignalPair(mOnPlayerStream);
|
ResetSignalPair(mOnPlayerStream);
|
||||||
ResetSignalPair(mOnVehicleStream);
|
ResetSignalPair(mOnVehicleStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnServerStartup);
|
ResetSignalPair(mOnServerStartup);
|
||||||
ResetSignalPair(mOnServerShutdown);
|
ResetSignalPair(mOnServerShutdown);
|
||||||
ResetSignalPair(mOnServerFrame);
|
ResetSignalPair(mOnServerFrame);
|
||||||
@ -327,7 +333,9 @@ void Core::DropEvents()
|
|||||||
ResetSignalPair(mOnVehicleHandlingRule);
|
ResetSignalPair(mOnVehicleHandlingRule);
|
||||||
ResetSignalPair(mOnVehicleEnterArea);
|
ResetSignalPair(mOnVehicleEnterArea);
|
||||||
ResetSignalPair(mOnVehicleLeaveArea);
|
ResetSignalPair(mOnVehicleLeaveArea);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
ResetSignalPair(mOnEntityStream);
|
ResetSignalPair(mOnEntityStream);
|
||||||
|
#endif
|
||||||
ResetSignalPair(mOnServerOption);
|
ResetSignalPair(mOnServerOption);
|
||||||
ResetSignalPair(mOnScriptReload);
|
ResetSignalPair(mOnScriptReload);
|
||||||
ResetSignalPair(mOnScriptLoaded);
|
ResetSignalPair(mOnScriptLoaded);
|
||||||
|
@ -239,7 +239,7 @@ CSStr CPlayer::GetUID2() const
|
|||||||
// Return the requested information
|
// Return the requested information
|
||||||
return s_Buffer;
|
return s_Buffer;
|
||||||
}
|
}
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CPlayer::Kill() const
|
void CPlayer::Kill() const
|
||||||
{
|
{
|
||||||
@ -248,7 +248,7 @@ void CPlayer::Kill() const
|
|||||||
// Perform the requested operation
|
// Perform the requested operation
|
||||||
_Func->KillPlayer(m_ID);
|
_Func->KillPlayer(m_ID);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CPlayer::Kick() const
|
void CPlayer::Kick() const
|
||||||
{
|
{
|
||||||
@ -400,7 +400,7 @@ void CPlayer::SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj &
|
|||||||
Core::Get().EmitPlayerOption(m_ID, option_id, current, header, payload);
|
Core::Get().EmitPlayerOption(m_ID, option_id, current, header, payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
SQFloat CPlayer::GetNetworkStatisticsF(Int32 option_id) const
|
SQFloat CPlayer::GetNetworkStatisticsF(Int32 option_id) const
|
||||||
{
|
{
|
||||||
@ -422,7 +422,7 @@ SQInteger CPlayer::GetNetworkStatisticsI(Int32 option_id) const
|
|||||||
// Return it in the proper type
|
// Return it in the proper type
|
||||||
return static_cast< SQInteger >(value);
|
return static_cast< SQInteger >(value);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
Int32 CPlayer::GetWorld() const
|
Int32 CPlayer::GetWorld() const
|
||||||
{
|
{
|
||||||
@ -1407,7 +1407,7 @@ void CPlayer::Unspectate() const
|
|||||||
// Spectate the given target
|
// Spectate the given target
|
||||||
_Func->SetPlayerSpectateTarget(m_ID, -1);
|
_Func->SetPlayerSpectateTarget(m_ID, -1);
|
||||||
}
|
}
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CPlayer::SetPlayer3DArrow(CPlayer & target, bool toggle) const
|
void CPlayer::SetPlayer3DArrow(CPlayer & target, bool toggle) const
|
||||||
{
|
{
|
||||||
@ -1460,7 +1460,7 @@ bool CPlayer::InterpolateCameraLookAtEx(Float32 x, Float32 y, Float32 z, Uint32
|
|||||||
// Perform the requested operation
|
// Perform the requested operation
|
||||||
return _Func->InterpolateCameraLookAt(m_ID, x, y, z, ms) != vcmpErrorRequestDenied;
|
return _Func->InterpolateCameraLookAt(m_ID, x, y, z, ms) != vcmpErrorRequestDenied;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CPlayer::Redirect(StackStrF & ip, Uint32 port, StackStrF & nick,
|
void CPlayer::Redirect(StackStrF & ip, Uint32 port, StackStrF & nick,
|
||||||
StackStrF & server_pass, StackStrF & user_pass)
|
StackStrF & server_pass, StackStrF & user_pass)
|
||||||
@ -1492,7 +1492,7 @@ void CPlayer::PlaySound(Int32 sound_id) const
|
|||||||
// Perform the requested operation
|
// Perform the requested operation
|
||||||
_Func->PlaySound(_Func->GetPlayerUniqueWorld(m_ID), sound_id, NAN, NAN, NAN);
|
_Func->PlaySound(_Func->GetPlayerUniqueWorld(m_ID), sound_id, NAN, NAN, NAN);
|
||||||
}
|
}
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CPlayer::SetDrunkHandling(SQInteger level) const
|
void CPlayer::SetDrunkHandling(SQInteger level) const
|
||||||
{
|
{
|
||||||
@ -1528,7 +1528,7 @@ SQInteger CPlayer::GetDrunkVisuals() const
|
|||||||
// Perform the requested operation
|
// Perform the requested operation
|
||||||
return _Func->GetPlayerDrunkVisuals(m_ID);
|
return _Func->GetPlayerDrunkVisuals(m_ID);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
LightObj & CPlayer::CreateCheckpointEx(Int32 world, bool sphere, Float32 x, Float32 y, Float32 z,
|
LightObj & CPlayer::CreateCheckpointEx(Int32 world, bool sphere, Float32 x, Float32 y, Float32 z,
|
||||||
Uint8 r, Uint8 g, Uint8 b, Uint8 a, Float32 radius) const
|
Uint8 r, Uint8 g, Uint8 b, Uint8 a, Float32 radius) const
|
||||||
@ -2793,8 +2793,10 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
|||||||
.Prop(_SC("Away"), &CPlayer::IsAway)
|
.Prop(_SC("Away"), &CPlayer::IsAway)
|
||||||
.Prop(_SC("Spec"), &CPlayer::GetSpectator, &CPlayer::SetSpectator)
|
.Prop(_SC("Spec"), &CPlayer::GetSpectator, &CPlayer::SetSpectator)
|
||||||
.Prop(_SC("SpecID"), &CPlayer::GetSpectatorID, &CPlayer::SetSpectatorID)
|
.Prop(_SC("SpecID"), &CPlayer::GetSpectatorID, &CPlayer::SetSpectatorID)
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
.Prop(_SC("DrunkHandling"), &CPlayer::GetDrunkHandling, &CPlayer::SetDrunkHandling)
|
.Prop(_SC("DrunkHandling"), &CPlayer::GetDrunkHandling, &CPlayer::SetDrunkHandling)
|
||||||
.Prop(_SC("DrunkVisuals"), &CPlayer::GetDrunkVisuals, &CPlayer::SetDrunkVisuals)
|
.Prop(_SC("DrunkVisuals"), &CPlayer::GetDrunkVisuals, &CPlayer::SetDrunkVisuals)
|
||||||
|
#endif
|
||||||
.Prop(_SC("CollideAreas"), &CPlayer::GetCollideAreas, &CPlayer::SetCollideAreas)
|
.Prop(_SC("CollideAreas"), &CPlayer::GetCollideAreas, &CPlayer::SetCollideAreas)
|
||||||
.Prop(_SC("Authority"), &CPlayer::GetAuthority, &CPlayer::SetAuthority)
|
.Prop(_SC("Authority"), &CPlayer::GetAuthority, &CPlayer::SetAuthority)
|
||||||
.Prop(_SC("TrackPosition"), &CPlayer::GetTrackPosition, &CPlayer::SetTrackPosition)
|
.Prop(_SC("TrackPosition"), &CPlayer::GetTrackPosition, &CPlayer::SetTrackPosition)
|
||||||
@ -2815,7 +2817,9 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
|||||||
.Prop(_SC("Blue"), &CPlayer::GetColorB, &CPlayer::SetColorB)
|
.Prop(_SC("Blue"), &CPlayer::GetColorB, &CPlayer::SetColorB)
|
||||||
// Member Methods
|
// Member Methods
|
||||||
.Func(_SC("StreamedFor"), &CPlayer::IsStreamedFor)
|
.Func(_SC("StreamedFor"), &CPlayer::IsStreamedFor)
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
.Func(_SC("Kill"), &CPlayer::Kill)
|
.Func(_SC("Kill"), &CPlayer::Kill)
|
||||||
|
#endif
|
||||||
.Func(_SC("Kick"), &CPlayer::Kick)
|
.Func(_SC("Kick"), &CPlayer::Kick)
|
||||||
.Func(_SC("Ban"), &CPlayer::Ban)
|
.Func(_SC("Ban"), &CPlayer::Ban)
|
||||||
.Func(_SC("KickBecause"), &CPlayer::KickBecause)
|
.Func(_SC("KickBecause"), &CPlayer::KickBecause)
|
||||||
@ -2824,8 +2828,10 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
|||||||
.Func(_SC("GetOption"), &CPlayer::GetOption)
|
.Func(_SC("GetOption"), &CPlayer::GetOption)
|
||||||
.Func(_SC("SetOption"), &CPlayer::SetOption)
|
.Func(_SC("SetOption"), &CPlayer::SetOption)
|
||||||
.Func(_SC("SetOptionEx"), &CPlayer::SetOptionEx)
|
.Func(_SC("SetOptionEx"), &CPlayer::SetOptionEx)
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
.Func(_SC("GetNetworkStatisticsF"), &CPlayer::GetNetworkStatisticsF)
|
.Func(_SC("GetNetworkStatisticsF"), &CPlayer::GetNetworkStatisticsF)
|
||||||
.Func(_SC("GetNetworkStatisticsI"), &CPlayer::GetNetworkStatisticsI)
|
.Func(_SC("GetNetworkStatisticsI"), &CPlayer::GetNetworkStatisticsI)
|
||||||
|
#endif
|
||||||
.Func(_SC("WorldCompatible"), &CPlayer::IsWorldCompatible)
|
.Func(_SC("WorldCompatible"), &CPlayer::IsWorldCompatible)
|
||||||
.Func(_SC("SetColor"), &CPlayer::SetColorEx)
|
.Func(_SC("SetColor"), &CPlayer::SetColorEx)
|
||||||
.Func(_SC("SetColour"), &CPlayer::SetColorEx)
|
.Func(_SC("SetColour"), &CPlayer::SetColorEx)
|
||||||
@ -2847,12 +2853,14 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
|||||||
.Func(_SC("Spectating"), &CPlayer::GetSpectator)
|
.Func(_SC("Spectating"), &CPlayer::GetSpectator)
|
||||||
.Func(_SC("Unspectate"), &CPlayer::Unspectate)
|
.Func(_SC("Unspectate"), &CPlayer::Unspectate)
|
||||||
.Func(_SC("Spectate"), &CPlayer::SetSpectator)
|
.Func(_SC("Spectate"), &CPlayer::SetSpectator)
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
.Func(_SC("SetPlayer3DArrow"), &CPlayer::SetPlayer3DArrow)
|
.Func(_SC("SetPlayer3DArrow"), &CPlayer::SetPlayer3DArrow)
|
||||||
.Func(_SC("GetPlayer3DArrow"), &CPlayer::GetPlayer3DArrow)
|
.Func(_SC("GetPlayer3DArrow"), &CPlayer::GetPlayer3DArrow)
|
||||||
.Func(_SC("SetPlayer3DArrowID"), &CPlayer::SetPlayer3DArrowID)
|
.Func(_SC("SetPlayer3DArrowID"), &CPlayer::SetPlayer3DArrowID)
|
||||||
.Func(_SC("GetPlayer3DArrowID"), &CPlayer::GetPlayer3DArrowID)
|
.Func(_SC("GetPlayer3DArrowID"), &CPlayer::GetPlayer3DArrowID)
|
||||||
.Func(_SC("InterpolateCameraLookAt"), &CPlayer::InterpolateCameraLookAt)
|
.Func(_SC("InterpolateCameraLookAt"), &CPlayer::InterpolateCameraLookAt)
|
||||||
.Func(_SC("InterpolateCameraLookAtEx"), &CPlayer::InterpolateCameraLookAtEx)
|
.Func(_SC("InterpolateCameraLookAtEx"), &CPlayer::InterpolateCameraLookAtEx)
|
||||||
|
#endif
|
||||||
.Func(_SC("Redirect"), &CPlayer::Redirect)
|
.Func(_SC("Redirect"), &CPlayer::Redirect)
|
||||||
.Func(_SC("GetModuleList"), &CPlayer::GetModuleList)
|
.Func(_SC("GetModuleList"), &CPlayer::GetModuleList)
|
||||||
.Func(_SC("PlaySound"), &CPlayer::PlaySound)
|
.Func(_SC("PlaySound"), &CPlayer::PlaySound)
|
||||||
|
@ -264,12 +264,12 @@ public:
|
|||||||
* Retrieve the unique user identifier version 2 of the managed player entity.
|
* Retrieve the unique user identifier version 2 of the managed player entity.
|
||||||
*/
|
*/
|
||||||
CSStr GetUID2() const;
|
CSStr GetUID2() const;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Set player's health to 0 and reset the death reason.
|
* Set player's health to 0 and reset the death reason.
|
||||||
*/
|
*/
|
||||||
void Kill() const;
|
void Kill() const;
|
||||||
|
#endif
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Kick the managed player entity from the server.
|
* Kick the managed player entity from the server.
|
||||||
*/
|
*/
|
||||||
@ -324,7 +324,7 @@ public:
|
|||||||
* Modify the current option value of the managed player entity.
|
* Modify the current option value of the managed player entity.
|
||||||
*/
|
*/
|
||||||
void SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj & payload);
|
void SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj & payload);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Retrieve network statistics related to the managed player entity.
|
* Retrieve network statistics related to the managed player entity.
|
||||||
*/
|
*/
|
||||||
@ -334,7 +334,7 @@ public:
|
|||||||
* Retrieve network statistics related to the managed player entity.
|
* Retrieve network statistics related to the managed player entity.
|
||||||
*/
|
*/
|
||||||
SQInteger GetNetworkStatisticsI(Int32 option_id) const;
|
SQInteger GetNetworkStatisticsI(Int32 option_id) const;
|
||||||
|
#endif
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Retrieve the world in which the managed player entity exists.
|
* Retrieve the world in which the managed player entity exists.
|
||||||
*/
|
*/
|
||||||
@ -754,7 +754,7 @@ public:
|
|||||||
* Set the managed player entity to spectate no one.
|
* Set the managed player entity to spectate no one.
|
||||||
*/
|
*/
|
||||||
void Unspectate() const;
|
void Unspectate() const;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Set whether the target player will see an objective arrow over a player.
|
* Set whether the target player will see an objective arrow over a player.
|
||||||
*/
|
*/
|
||||||
@ -784,7 +784,7 @@ public:
|
|||||||
* Smoothly pivots the camera angle.
|
* Smoothly pivots the camera angle.
|
||||||
*/
|
*/
|
||||||
bool InterpolateCameraLookAtEx(Float32 x, Float32 y, Float32 z, Uint32 ms) const;
|
bool InterpolateCameraLookAtEx(Float32 x, Float32 y, Float32 z, Uint32 ms) const;
|
||||||
|
#endif
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Redirect the managed player entity to the specified server.
|
* Redirect the managed player entity to the specified server.
|
||||||
*/
|
*/
|
||||||
@ -800,7 +800,7 @@ public:
|
|||||||
* Retrieve the authority level of the managed player entity.
|
* Retrieve the authority level of the managed player entity.
|
||||||
*/
|
*/
|
||||||
void PlaySound(Int32 sound_id) const;
|
void PlaySound(Int32 sound_id) const;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Set how delayed a player's turn handling is when in a vehicle.
|
* Set how delayed a player's turn handling is when in a vehicle.
|
||||||
*/
|
*/
|
||||||
@ -820,7 +820,7 @@ public:
|
|||||||
* Retrieve how intense the drunk blur overlay is for a player.
|
* Retrieve how intense the drunk blur overlay is for a player.
|
||||||
*/
|
*/
|
||||||
SQInteger GetDrunkVisuals() const;
|
SQInteger GetDrunkVisuals() const;
|
||||||
|
#endif
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Create a checkpoint or sphere for this player.
|
* Create a checkpoint or sphere for this player.
|
||||||
*/
|
*/
|
||||||
|
@ -1147,7 +1147,7 @@ bool CVehicle::Embark(CPlayer & player, Int32 slot, bool allocate, bool warp) co
|
|||||||
return (_Func->PutPlayerInVehicle(player.GetID(), m_ID, slot, allocate, warp)
|
return (_Func->PutPlayerInVehicle(player.GetID(), m_ID, slot, allocate, warp)
|
||||||
!= vcmpErrorRequestDenied);
|
!= vcmpErrorRequestDenied);
|
||||||
}
|
}
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CVehicle::SetPlayer3DArrow(CPlayer & target, bool toggle) const
|
void CVehicle::SetPlayer3DArrow(CPlayer & target, bool toggle) const
|
||||||
{
|
{
|
||||||
@ -1183,7 +1183,7 @@ bool CVehicle::GetPlayer3DArrowID(SQInteger id) const
|
|||||||
// Spectate the given target
|
// Spectate the given target
|
||||||
return _Func->GetVehicle3DArrowForPlayer(m_ID, id);
|
return _Func->GetVehicle3DArrowForPlayer(m_ID, id);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool CVehicle::GetCollideAreas() const
|
bool CVehicle::GetCollideAreas() const
|
||||||
{
|
{
|
||||||
@ -2074,10 +2074,12 @@ void Register_CVehicle(HSQUIRRELVM vm)
|
|||||||
.Func(_SC("SetHandlingRule"), &CVehicle::SetHandlingRule)
|
.Func(_SC("SetHandlingRule"), &CVehicle::SetHandlingRule)
|
||||||
.Func(_SC("ResetHandlingRule"), &CVehicle::ResetHandlingRule)
|
.Func(_SC("ResetHandlingRule"), &CVehicle::ResetHandlingRule)
|
||||||
.Func(_SC("ResetHandlings"), &CVehicle::ResetHandlings)
|
.Func(_SC("ResetHandlings"), &CVehicle::ResetHandlings)
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
.Func(_SC("SetPlayer3DArrow"), &CVehicle::SetPlayer3DArrow)
|
.Func(_SC("SetPlayer3DArrow"), &CVehicle::SetPlayer3DArrow)
|
||||||
.Func(_SC("GetPlayer3DArrow"), &CVehicle::GetPlayer3DArrow)
|
.Func(_SC("GetPlayer3DArrow"), &CVehicle::GetPlayer3DArrow)
|
||||||
.Func(_SC("SetPlayer3DArrowID"), &CVehicle::SetPlayer3DArrowID)
|
.Func(_SC("SetPlayer3DArrowID"), &CVehicle::SetPlayer3DArrowID)
|
||||||
.Func(_SC("GetPlayer3DArrowID"), &CVehicle::GetPlayer3DArrowID)
|
.Func(_SC("GetPlayer3DArrowID"), &CVehicle::GetPlayer3DArrowID)
|
||||||
|
#endif
|
||||||
.Func(_SC("AreasCollide"), &CVehicle::SetAreasCollide)
|
.Func(_SC("AreasCollide"), &CVehicle::SetAreasCollide)
|
||||||
// Member Overloads
|
// Member Overloads
|
||||||
.Overload< void (CVehicle::*)(const Vector3 &, bool) const >
|
.Overload< void (CVehicle::*)(const Vector3 &, bool) const >
|
||||||
|
@ -621,7 +621,7 @@ public:
|
|||||||
* Embark the specified player entity into the managed vehicle entity.
|
* Embark the specified player entity into the managed vehicle entity.
|
||||||
*/
|
*/
|
||||||
bool Embark(CPlayer & player, Int32 slot, bool allocate, bool warp) const;
|
bool Embark(CPlayer & player, Int32 slot, bool allocate, bool warp) const;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Set whether the target player will see an objective arrow over a vehicle.
|
* Set whether the target player will see an objective arrow over a vehicle.
|
||||||
*/
|
*/
|
||||||
@ -641,7 +641,7 @@ public:
|
|||||||
* See whether the target player sees an objective arrow over a vehicle.
|
* See whether the target player sees an objective arrow over a vehicle.
|
||||||
*/
|
*/
|
||||||
bool GetPlayer3DArrowID(SQInteger id) const;
|
bool GetPlayer3DArrowID(SQInteger id) const;
|
||||||
|
#endif
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* See whether the managed vehicle entity collides with user defined areas.
|
* See whether the managed vehicle entity collides with user defined areas.
|
||||||
*/
|
*/
|
||||||
|
@ -913,6 +913,7 @@ static void OnEntityPoolChange(vcmpEntityPool entity_type, int32_t entity_id, ui
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
static void OnEntityStreamingChange(int32_t player_id, int32_t entity_id, vcmpEntityPool entity_type, uint8_t is_deleted)
|
static void OnEntityStreamingChange(int32_t player_id, int32_t entity_id, vcmpEntityPool entity_type, uint8_t is_deleted)
|
||||||
{
|
{
|
||||||
// Attempt to forward the event
|
// Attempt to forward the event
|
||||||
@ -926,7 +927,7 @@ static void OnEntityStreamingChange(int32_t player_id, int32_t entity_id, vcmpEn
|
|||||||
// See if a reload was requested
|
// See if a reload was requested
|
||||||
SQMOD_RELOAD_CHECK(false)
|
SQMOD_RELOAD_CHECK(false)
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
static void OnServerPerformanceReport(size_t /*entry_count*/, CCStr * /*descriptions*/, uint64_t * /*times*/)
|
static void OnServerPerformanceReport(size_t /*entry_count*/, CCStr * /*descriptions*/, uint64_t * /*times*/)
|
||||||
{
|
{
|
||||||
@ -1035,7 +1036,9 @@ SQMOD_API_EXPORT unsigned int VcmpPluginInit(PluginFuncs * funcs, PluginCallback
|
|||||||
_Clbk->OnEntityPoolChange = OnEntityPoolChange;
|
_Clbk->OnEntityPoolChange = OnEntityPoolChange;
|
||||||
_Clbk->OnServerPerformanceReport = OnServerPerformanceReport;
|
_Clbk->OnServerPerformanceReport = OnServerPerformanceReport;
|
||||||
_Clbk->OnPlayerModuleList = OnPlayerModuleList;
|
_Clbk->OnPlayerModuleList = OnPlayerModuleList;
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
_Clbk->OnEntityStreamingChange = OnEntityStreamingChange;
|
_Clbk->OnEntityStreamingChange = OnEntityStreamingChange;
|
||||||
|
#endif
|
||||||
// Attempt to initialize the plug-in exports
|
// Attempt to initialize the plug-in exports
|
||||||
InitExports();
|
InitExports();
|
||||||
// Dummy spacing
|
// Dummy spacing
|
||||||
|
@ -252,7 +252,9 @@ static const EnumElement g_EntityPoolEnum[] = {
|
|||||||
{_SC("Object"), vcmpEntityPoolObject},
|
{_SC("Object"), vcmpEntityPoolObject},
|
||||||
{_SC("Pickup"), vcmpEntityPoolPickup},
|
{_SC("Pickup"), vcmpEntityPoolPickup},
|
||||||
{_SC("Radio"), vcmpEntityPoolRadio},
|
{_SC("Radio"), vcmpEntityPoolRadio},
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
{_SC("Player"), vcmpEntityPoolPlayer},
|
{_SC("Player"), vcmpEntityPoolPlayer},
|
||||||
|
#endif
|
||||||
{_SC("Blip"), vcmpEntityPoolBlip},
|
{_SC("Blip"), vcmpEntityPoolBlip},
|
||||||
{_SC("Checkpoint"), vcmpEntityPoolCheckPoint},
|
{_SC("Checkpoint"), vcmpEntityPoolCheckPoint},
|
||||||
{_SC("Max"), vcmpEntityPoolCheckPoint}
|
{_SC("Max"), vcmpEntityPoolCheckPoint}
|
||||||
@ -262,6 +264,9 @@ static const EnumElement g_EntityPoolEnum[] = {
|
|||||||
static const EnumElement g_PlayerUpdateEnum[] = {
|
static const EnumElement g_PlayerUpdateEnum[] = {
|
||||||
{_SC("Unknown"), SQMOD_UNKNOWN},
|
{_SC("Unknown"), SQMOD_UNKNOWN},
|
||||||
{_SC("Normal"), vcmpPlayerUpdateNormal},
|
{_SC("Normal"), vcmpPlayerUpdateNormal},
|
||||||
|
#if SQMOD_SDK_PRIOR(2, 1)
|
||||||
|
{_SC("Aiming"), vcmpPlayerUpdateAiming},
|
||||||
|
#endif
|
||||||
{_SC("Driver"), vcmpPlayerUpdateDriver},
|
{_SC("Driver"), vcmpPlayerUpdateDriver},
|
||||||
{_SC("Passenger"), vcmpPlayerUpdatePassenger},
|
{_SC("Passenger"), vcmpPlayerUpdatePassenger},
|
||||||
{_SC("Max"), vcmpPlayerUpdatePassenger}
|
{_SC("Max"), vcmpPlayerUpdatePassenger}
|
||||||
@ -337,8 +342,12 @@ static const EnumElement g_ServerOptionEnum[] = {
|
|||||||
{_SC("WallGlitch"), vcmpServerOptionWallGlitch},
|
{_SC("WallGlitch"), vcmpServerOptionWallGlitch},
|
||||||
{_SC("DisableBackfaceCulling"), vcmpServerOptionDisableBackfaceCulling},
|
{_SC("DisableBackfaceCulling"), vcmpServerOptionDisableBackfaceCulling},
|
||||||
{_SC("DisableHeliBladeDamage"), vcmpServerOptionDisableHeliBladeDamage},
|
{_SC("DisableHeliBladeDamage"), vcmpServerOptionDisableHeliBladeDamage},
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
{_SC("DisableCrouch"), vcmpServerOptionDisableCrouch},
|
{_SC("DisableCrouch"), vcmpServerOptionDisableCrouch},
|
||||||
{_SC("Max"), vcmpServerOptionDisableCrouch}
|
{_SC("Max"), vcmpServerOptionDisableCrouch}
|
||||||
|
#else
|
||||||
|
{_SC("Max"), vcmpServerOptionDisableHeliBladeDamage}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
@ -353,8 +362,13 @@ static const EnumElement g_PlayerOptionEnum[] = {
|
|||||||
{_SC("CanAttack"), vcmpPlayerOptionCanAttack},
|
{_SC("CanAttack"), vcmpPlayerOptionCanAttack},
|
||||||
{_SC("HasMarker"), vcmpPlayerOptionHasMarker},
|
{_SC("HasMarker"), vcmpPlayerOptionHasMarker},
|
||||||
{_SC("ChatTagsEnabled"), vcmpPlayerOptionChatTagsEnabled},
|
{_SC("ChatTagsEnabled"), vcmpPlayerOptionChatTagsEnabled},
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
{_SC("DrunkEffects"), vcmpPlayerOptionBleeding},
|
{_SC("DrunkEffects"), vcmpPlayerOptionBleeding},
|
||||||
{_SC("Max"), vcmpPlayerOptionBleeding}
|
{_SC("Max"), vcmpPlayerOptionBleeding}
|
||||||
|
#else
|
||||||
|
{_SC("DrunkEffects"), vcmpPlayerOptionDrunkEffects},
|
||||||
|
{_SC("Max"), vcmpPlayerOptionDrunkEffects}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
@ -367,10 +381,14 @@ static const EnumElement g_VehicleOptionEnum[] = {
|
|||||||
{_SC("Ghost"), vcmpVehicleOptionGhost},
|
{_SC("Ghost"), vcmpVehicleOptionGhost},
|
||||||
{_SC("Siren"), vcmpVehicleOptionSiren},
|
{_SC("Siren"), vcmpVehicleOptionSiren},
|
||||||
{_SC("SingleUse"), vcmpVehicleOptionSingleUse},
|
{_SC("SingleUse"), vcmpVehicleOptionSingleUse},
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
{_SC("EngineDisabled"), vcmpVehicleOptionEngineDisabled},
|
{_SC("EngineDisabled"), vcmpVehicleOptionEngineDisabled},
|
||||||
{_SC("BootOpen"), vcmpVehicleOptionBootOpen},
|
{_SC("BootOpen"), vcmpVehicleOptionBootOpen},
|
||||||
{_SC("BonnetOpen"), vcmpVehicleOptionBonnetOpen},
|
{_SC("BonnetOpen"), vcmpVehicleOptionBonnetOpen},
|
||||||
{_SC("Max"), vcmpVehicleOptionBootOpen}
|
{_SC("Max"), vcmpVehicleOptionBonnetOpen}
|
||||||
|
#else
|
||||||
|
{_SC("Max"), vcmpVehicleOptionSingleUse}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
@ -381,6 +399,7 @@ static const EnumElement g_PickupOptionEnum[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
static const EnumElement g_NetworkStatisticsOptionEnum[] = {
|
static const EnumElement g_NetworkStatisticsOptionEnum[] = {
|
||||||
{_SC("Unknown"), SQMOD_UNKNOWN},
|
{_SC("Unknown"), SQMOD_UNKNOWN},
|
||||||
{_SC("DataSentPerSecond"), vcmpNetworkStatisticsOptionDataSentPerSecond},
|
{_SC("DataSentPerSecond"), vcmpNetworkStatisticsOptionDataSentPerSecond},
|
||||||
@ -402,7 +421,7 @@ static const EnumElement g_NetworkStatisticsOptionEnum[] = {
|
|||||||
{_SC("PacketLossTotal"), vcmpNetworkStatisticsOptionPacketLossTotal},
|
{_SC("PacketLossTotal"), vcmpNetworkStatisticsOptionPacketLossTotal},
|
||||||
{_SC("Max"), vcmpNetworkStatisticsOptionPacketLossTotal}
|
{_SC("Max"), vcmpNetworkStatisticsOptionPacketLossTotal}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
static const EnumElement g_BodyPartEnum[] = {
|
static const EnumElement g_BodyPartEnum[] = {
|
||||||
{_SC("Unknown"), SQMOD_UNKNOWN},
|
{_SC("Unknown"), SQMOD_UNKNOWN},
|
||||||
@ -1230,7 +1249,9 @@ static const EnumElements g_EnumList[] = {
|
|||||||
{_SC("SqPlayerOption"), g_PlayerOptionEnum},
|
{_SC("SqPlayerOption"), g_PlayerOptionEnum},
|
||||||
{_SC("SqVehicleOption"), g_VehicleOptionEnum},
|
{_SC("SqVehicleOption"), g_VehicleOptionEnum},
|
||||||
{_SC("SqPickupOption"), g_PickupOptionEnum},
|
{_SC("SqPickupOption"), g_PickupOptionEnum},
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
{_SC("NetworkStatisticsOption"), g_NetworkStatisticsOptionEnum},
|
{_SC("NetworkStatisticsOption"), g_NetworkStatisticsOptionEnum},
|
||||||
|
#endif
|
||||||
{_SC("SqBodyPart"), g_BodyPartEnum},
|
{_SC("SqBodyPart"), g_BodyPartEnum},
|
||||||
{_SC("SqPlayerState"), g_PlayerStateEnum},
|
{_SC("SqPlayerState"), g_PlayerStateEnum},
|
||||||
{_SC("SqPlayerAction"), g_PlayerActionEnum},
|
{_SC("SqPlayerAction"), g_PlayerActionEnum},
|
||||||
|
@ -850,7 +850,7 @@ void SetFallTimer(Uint16 rate)
|
|||||||
{
|
{
|
||||||
_Func->SetFallTimer(rate);
|
_Func->SetFallTimer(rate);
|
||||||
}
|
}
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
SQFloat GetNetworkStatisticsF(Int32 option_id)
|
SQFloat GetNetworkStatisticsF(Int32 option_id)
|
||||||
{
|
{
|
||||||
@ -868,5 +868,5 @@ SQInteger GetNetworkStatisticsI(Int32 option_id)
|
|||||||
// Return it in the proper type
|
// Return it in the proper type
|
||||||
return static_cast< SQInteger >(value);
|
return static_cast< SQInteger >(value);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} // Namespace:: SqMod
|
} // Namespace:: SqMod
|
||||||
|
@ -478,7 +478,7 @@ Uint16 GetFallTimer();
|
|||||||
* Modify the fall timer rate.
|
* Modify the fall timer rate.
|
||||||
*/
|
*/
|
||||||
void SetFallTimer(Uint16 rate);
|
void SetFallTimer(Uint16 rate);
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
/* ------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------
|
||||||
* Retrieve network statistics related to the server.
|
* Retrieve network statistics related to the server.
|
||||||
*/
|
*/
|
||||||
@ -488,7 +488,7 @@ SQFloat GetNetworkStatisticsF(Int32 option_id);
|
|||||||
* Retrieve network statistics related to the server.
|
* Retrieve network statistics related to the server.
|
||||||
*/
|
*/
|
||||||
SQInteger GetNetworkStatisticsI(Int32 option_id);
|
SQInteger GetNetworkStatisticsI(Int32 option_id);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
} // Namespace:: SqMod
|
} // Namespace:: SqMod
|
||||||
|
@ -122,8 +122,11 @@ void Register_Misc(HSQUIRRELVM vm)
|
|||||||
.Func(_SC("GetDistrictNameEx"), &GetDistrictNameEx)
|
.Func(_SC("GetDistrictNameEx"), &GetDistrictNameEx)
|
||||||
.Func(_SC("GetFallTimer"), &GetFallTimer)
|
.Func(_SC("GetFallTimer"), &GetFallTimer)
|
||||||
.Func(_SC("SetFallTimer"), &SetFallTimer)
|
.Func(_SC("SetFallTimer"), &SetFallTimer)
|
||||||
|
#if SQMOD_SDK_LEAST(2, 1)
|
||||||
.Func(_SC("GetNetworkStatisticsF"), &GetNetworkStatisticsF)
|
.Func(_SC("GetNetworkStatisticsF"), &GetNetworkStatisticsF)
|
||||||
.Func(_SC("GetNetworkStatisticsI"), &GetNetworkStatisticsI);
|
.Func(_SC("GetNetworkStatisticsI"), &GetNetworkStatisticsI)
|
||||||
|
#endif
|
||||||
|
; // Uggly? I know. But does the job.
|
||||||
|
|
||||||
RootTable(vm).Bind(_SC("SqServer"), srvns);
|
RootTable(vm).Bind(_SC("SqServer"), srvns);
|
||||||
|
|
||||||
|
@ -121,6 +121,13 @@
|
|||||||
#define SQMOD_VERSION_MINOR 0
|
#define SQMOD_VERSION_MINOR 0
|
||||||
#define SQMOD_VERSION_PATCH 1
|
#define SQMOD_VERSION_PATCH 1
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------------------------------
|
||||||
|
* VCMP SDK VERSION CHECK.
|
||||||
|
*/
|
||||||
|
#define SQMOD_SDK_MATCH(MJR, MNR) ((PLUGIN_API_MAJOR == MJR) && (PLUGIN_API_MINOR == MNR))
|
||||||
|
#define SQMOD_SDK_LEAST(MJR, MNR) ((PLUGIN_API_MAJOR >= MJR) && (PLUGIN_API_MINOR >= MNR))
|
||||||
|
#define SQMOD_SDK_PRIOR(MJR, MNR) ((PLUGIN_API_MAJOR < MJR) && (PLUGIN_API_MINOR < MNR))
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------
|
||||||
* SQUIRREL FORWARD DECLARATIONS
|
* SQUIRREL FORWARD DECLARATIONS
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user