mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Update the plugin SDK.
Expose new constants and remove deprecated ones.
This commit is contained in:
parent
f1a2e8f003
commit
5266465df6
@ -103,7 +103,7 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
vcmpPlayerUpdateNormal = 0,
|
||||
vcmpPlayerUpdateAiming = 1,
|
||||
vcmpPlayerUpdateAimingDeprecated = 1,
|
||||
vcmpPlayerUpdateDriver = 2,
|
||||
vcmpPlayerUpdatePassenger = 3,
|
||||
forceSizeVcmpPlayerUpdate = INT32_MAX
|
||||
@ -187,6 +187,7 @@ typedef enum {
|
||||
vcmpVehicleOptionSingleUse = 6,
|
||||
vcmpVehicleOptionEngineDisabled = 7,
|
||||
vcmpVehicleOptionBootOpen = 8,
|
||||
vcmpVehicleOptionBonnetOpen = 9,
|
||||
forceSizeVcmpVehicleOption = INT32_MAX
|
||||
} vcmpVehicleOption;
|
||||
|
||||
@ -195,6 +196,31 @@ typedef enum {
|
||||
forceSizeVcmpPickupOption = INT32_MAX
|
||||
} 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 {
|
||||
uint32_t structSize;
|
||||
|
||||
@ -212,7 +238,7 @@ typedef struct {
|
||||
uint32_t (*GetNumberOfPlugins) (void);
|
||||
/* vcmpErrorNoSuchEntity, vcmpErrorNullArgument */
|
||||
vcmpError (*GetPluginInfo) (int32_t pluginId, PluginInfo* pluginInfo);
|
||||
/* -1 == vcmpEntityNone */
|
||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
||||
int32_t (*FindPlugin) (const char* pluginName);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
const void** (*GetPluginExports) (int32_t pluginId, size_t* exportCount);
|
||||
@ -352,7 +378,7 @@ typedef struct {
|
||||
* Key binds
|
||||
*/
|
||||
|
||||
/* -1 == vcmpEntityNone */
|
||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
||||
int32_t (*GetKeyBindUnusedSlot) (void);
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*GetKeyBindData) (int32_t bindId, uint8_t* isCalledOnReleaseOut, int32_t* keyOneOut, int32_t* keyTwoOut, int32_t* keyThreeOut);
|
||||
@ -425,7 +451,7 @@ typedef struct {
|
||||
* Player access and basic info
|
||||
*/
|
||||
|
||||
/* -1 == vcmpEntityNone */
|
||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
||||
int32_t (*GetPlayerIdFromName) (const char* name);
|
||||
/* success */
|
||||
uint8_t (*IsPlayerConnected) (int32_t playerId);
|
||||
@ -920,25 +946,28 @@ typedef struct {
|
||||
vcmpError (*KillPlayer) (int32_t playerId);
|
||||
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetVehicle3DArrowForPlayer) (int32_t nVehicleId, int32_t nTargetPlayerId, uint8_t bEnabled);
|
||||
vcmpError (*SetVehicle3DArrowForPlayer) (int32_t vehicleId, int32_t targetPlayerId, uint8_t isEnabled);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint8_t (*GetVehicle3DArrowForPlayer) (int32_t nVehicleId, int32_t nTargetPlayerId);
|
||||
uint8_t (*GetVehicle3DArrowForPlayer) (int32_t vehicleId, int32_t targetPlayerId);
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetPlayer3DArrowForPlayer) (int32_t nPlayerId, int32_t nTargetPlayerId, uint8_t bEnabled);
|
||||
vcmpError (*SetPlayer3DArrowForPlayer) (int32_t playerId, int32_t targetPlayerId, uint8_t isEnabled);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint8_t (*GetPlayer3DArrowForPlayer) (int32_t nPlayerId, int32_t nTargetPlayerId);
|
||||
uint8_t (*GetPlayer3DArrowForPlayer) (int32_t playerId, int32_t targetPlayerId);
|
||||
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetPlayerDrunkHandling) (int32_t nPlayerId, uint32_t dwDrunkLevel);
|
||||
vcmpError (*SetPlayerDrunkHandling) (int32_t playerId, uint32_t drunkLevel);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint32_t (*GetPlayerDrunkHandling) (int32_t nPlayerId);
|
||||
uint32_t (*GetPlayerDrunkHandling) (int32_t playerId);
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetPlayerDrunkVisuals) (int32_t nPlayerId, uint8_t byteDrunkLevel);
|
||||
vcmpError (*SetPlayerDrunkVisuals) (int32_t playerId, uint8_t drunkLevel);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint8_t (*GetPlayerDrunkVisuals) (int32_t nPlayerId);
|
||||
uint8_t (*GetPlayerDrunkVisuals) (int32_t playerId);
|
||||
|
||||
/* vcmpErrorNoSuchEntity, vcmpErrorRequestDenied */
|
||||
vcmpError (*InterpolateCameraLookAt) (int32_t playerId, float lookX, float lookY, float lookZ, uint32_t dwInterpTimeMS);
|
||||
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;
|
||||
|
||||
|
@ -262,7 +262,6 @@ static const EnumElement g_EntityPoolEnum[] = {
|
||||
static const EnumElement g_PlayerUpdateEnum[] = {
|
||||
{_SC("Unknown"), SQMOD_UNKNOWN},
|
||||
{_SC("Normal"), vcmpPlayerUpdateNormal},
|
||||
{_SC("Aiming"), vcmpPlayerUpdateAiming},
|
||||
{_SC("Driver"), vcmpPlayerUpdateDriver},
|
||||
{_SC("Passenger"), vcmpPlayerUpdatePassenger},
|
||||
{_SC("Max"), vcmpPlayerUpdatePassenger}
|
||||
@ -370,6 +369,7 @@ static const EnumElement g_VehicleOptionEnum[] = {
|
||||
{_SC("SingleUse"), vcmpVehicleOptionSingleUse},
|
||||
{_SC("EngineDisabled"), vcmpVehicleOptionEngineDisabled},
|
||||
{_SC("BootOpen"), vcmpVehicleOptionBootOpen},
|
||||
{_SC("BonnetOpen"), vcmpVehicleOptionBonnetOpen},
|
||||
{_SC("Max"), vcmpVehicleOptionBootOpen}
|
||||
};
|
||||
|
||||
@ -380,6 +380,29 @@ static const EnumElement g_PickupOptionEnum[] = {
|
||||
{_SC("Max"), vcmpPickupOptionSingleUse}
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
static const EnumElement g_NetworkStatisticsOptionEnum[] = {
|
||||
{_SC("Unknown"), SQMOD_UNKNOWN},
|
||||
{_SC("DataSentPerSecond"), vcmpNetworkStatisticsOptionDataSentPerSecond},
|
||||
{_SC("DataResentPerSecond"), vcmpNetworkStatisticsOptionDataResentPerSecond},
|
||||
{_SC("DataReceivedPerSecond"), vcmpNetworkStatisticsOptionDataReceivedPerSecond},
|
||||
{_SC("DataDiscardedPerSecond"), vcmpNetworkStatisticsOptionDataDiscardedPerSecond},
|
||||
{_SC("AllBytesSentPerSecond"), vcmpNetworkStatisticsOptionAllBytesSentPerSecond},
|
||||
{_SC("AllBytesReceivedPerSecond"), vcmpNetworkStatisticsOptionAllBytesReceivedPerSecond},
|
||||
{_SC("DataSentTotal"), vcmpNetworkStatisticsOptionDataSentTotal},
|
||||
{_SC("DataResentTotal"), vcmpNetworkStatisticsOptionDataResentTotal},
|
||||
{_SC("DataReceivedTotal"), vcmpNetworkStatisticsOptionDataReceivedTotal},
|
||||
{_SC("DataDiscardedTotal"), vcmpNetworkStatisticsOptionDataDiscardedTotal},
|
||||
{_SC("AllBytesSentTotal"), vcmpNetworkStatisticsOptionAllBytesSentTotal},
|
||||
{_SC("AllBytesReceivedTotal"), vcmpNetworkStatisticsOptionAllBytesReceivedTotal},
|
||||
{_SC("MessagesWaiting"), vcmpNetworkStatisticsOptionMessagesWaiting},
|
||||
{_SC("MessagesResending"), vcmpNetworkStatisticsOptionMessagesResending},
|
||||
{_SC("BytesResending"), vcmpNetworkStatisticsOptionBytesResending},
|
||||
{_SC("PacketLossPerSecond"), vcmpNetworkStatisticsOptionPacketLossPerSecond},
|
||||
{_SC("PacketLossTotal"), vcmpNetworkStatisticsOptionPacketLossTotal},
|
||||
{_SC("Max"), vcmpNetworkStatisticsOptionPacketLossTotal}
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
static const EnumElement g_BodyPartEnum[] = {
|
||||
{_SC("Unknown"), SQMOD_UNKNOWN},
|
||||
@ -1190,32 +1213,33 @@ static const EnumElement g_AsciiEnum[] = {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
static const EnumElements g_EnumList[] = {
|
||||
{_SC("SqMod"), g_SqMod},
|
||||
{_SC("SqArchitecture"), g_ArchitectureEnum},
|
||||
{_SC("SqPlatform"), g_PlatformEnum},
|
||||
{_SC("SqEvent"), g_EventEnum},
|
||||
{_SC("SqCreate"), g_CreateEnum},
|
||||
{_SC("SqDestroy"), g_DestroyEnum},
|
||||
{_SC("SqServerError"), g_ServerErrorEnum},
|
||||
{_SC("SqEntityPool"), g_EntityPoolEnum},
|
||||
{_SC("SqPlayerUpdate"), g_PlayerUpdateEnum},
|
||||
{_SC("SqVehicleUpdate"), g_VehicleUpdateEnum},
|
||||
{_SC("SqPlayerVehicle"), g_PlayerVehicleEnum},
|
||||
{_SC("SqVehicleSync"), g_VehicleSyncEnum},
|
||||
{_SC("SqPartReason"), g_PartReasonEnum},
|
||||
{_SC("SqServerOption"), g_ServerOptionEnum},
|
||||
{_SC("SqPlayerOption"), g_PlayerOptionEnum},
|
||||
{_SC("SqVehicleOption"), g_VehicleOptionEnum},
|
||||
{_SC("SqPickupOption"), g_PickupOptionEnum},
|
||||
{_SC("SqBodyPart"), g_BodyPartEnum},
|
||||
{_SC("SqPlayerState"), g_PlayerStateEnum},
|
||||
{_SC("SqPlayerAction"), g_PlayerActionEnum},
|
||||
{_SC("SqWeather"), g_WeatherEnum},
|
||||
{_SC("SqWep"), g_WeaponEnum},
|
||||
{_SC("SqVeh"), g_VehicleEnum},
|
||||
{_SC("SqSkin"), g_SkinEnum},
|
||||
{_SC("SqKeyCode"), g_KeyCodeEnum},
|
||||
{_SC("SqASCII"), g_AsciiEnum}
|
||||
{_SC("SqMod"), g_SqMod},
|
||||
{_SC("SqArchitecture"), g_ArchitectureEnum},
|
||||
{_SC("SqPlatform"), g_PlatformEnum},
|
||||
{_SC("SqEvent"), g_EventEnum},
|
||||
{_SC("SqCreate"), g_CreateEnum},
|
||||
{_SC("SqDestroy"), g_DestroyEnum},
|
||||
{_SC("SqServerError"), g_ServerErrorEnum},
|
||||
{_SC("SqEntityPool"), g_EntityPoolEnum},
|
||||
{_SC("SqPlayerUpdate"), g_PlayerUpdateEnum},
|
||||
{_SC("SqVehicleUpdate"), g_VehicleUpdateEnum},
|
||||
{_SC("SqPlayerVehicle"), g_PlayerVehicleEnum},
|
||||
{_SC("SqVehicleSync"), g_VehicleSyncEnum},
|
||||
{_SC("SqPartReason"), g_PartReasonEnum},
|
||||
{_SC("SqServerOption"), g_ServerOptionEnum},
|
||||
{_SC("SqPlayerOption"), g_PlayerOptionEnum},
|
||||
{_SC("SqVehicleOption"), g_VehicleOptionEnum},
|
||||
{_SC("SqPickupOption"), g_PickupOptionEnum},
|
||||
{_SC("NetworkStatisticsOption"), g_NetworkStatisticsOptionEnum},
|
||||
{_SC("SqBodyPart"), g_BodyPartEnum},
|
||||
{_SC("SqPlayerState"), g_PlayerStateEnum},
|
||||
{_SC("SqPlayerAction"), g_PlayerActionEnum},
|
||||
{_SC("SqWeather"), g_WeatherEnum},
|
||||
{_SC("SqWep"), g_WeaponEnum},
|
||||
{_SC("SqVeh"), g_VehicleEnum},
|
||||
{_SC("SqSkin"), g_SkinEnum},
|
||||
{_SC("SqKeyCode"), g_KeyCodeEnum},
|
||||
{_SC("SqASCII"), g_AsciiEnum}
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user