Update spcomp and includes to latest 1.10-fork
disable warning 241: Array-based enum structs will be removed in 1.11
This commit is contained in:
Vendored
+64
-37
@@ -79,6 +79,8 @@
|
||||
#define TF_DEATHFLAG_INTERRUPTED (1 << 6)
|
||||
#define TF_DEATHFLAG_GIBBED (1 << 7)
|
||||
#define TF_DEATHFLAG_PURGATORY (1 << 8)
|
||||
#define TF_DEATHFLAG_MINIBOSS (1 << 9)
|
||||
#define TF_DEATHFLAG_AUSTRALIUM (1 << 10)
|
||||
|
||||
// Custom kill identifiers for the customkill property on the player_death event
|
||||
enum {
|
||||
@@ -159,6 +161,12 @@ enum {
|
||||
TF_CUSTOM_KART,
|
||||
TF_CUSTOM_GIANT_HAMMER,
|
||||
TF_CUSTOM_RUNE_REFLECT,
|
||||
TF_CUSTOM_DRAGONS_FURY_IGNITE,
|
||||
TF_CUSTOM_DRAGONS_FURY_BONUS_BURNING,
|
||||
TF_CUSTOM_SLAP_KILL,
|
||||
TF_CUSTOM_CROC,
|
||||
TF_CUSTOM_TAUNTATK_GASBLAST,
|
||||
TF_CUSTOM_AXTINGUISHER_BOOSTED
|
||||
};
|
||||
|
||||
// Weapon codes as used in some events, such as player_death
|
||||
@@ -268,6 +276,12 @@ enum {
|
||||
TF_WEAPON_GRAPPLINGHOOK,
|
||||
TF_WEAPON_PASSTIME_GUN,
|
||||
TF_WEAPON_CHARGED_SMG,
|
||||
TF_WEAPON_BREAKABLE_SIGN,
|
||||
TF_WEAPON_ROCKETPACK,
|
||||
TF_WEAPON_SLAP,
|
||||
TF_WEAPON_JAR_GAS,
|
||||
TF_WEAPON_GRENADE_JAR_GAS,
|
||||
TF_WEAPON_FLAME_BALL
|
||||
};
|
||||
|
||||
// TF2 Weapon Loadout Slots
|
||||
@@ -339,9 +353,9 @@ static const char TFResourceNames[TFResourceType][] =
|
||||
/**
|
||||
* Gets a client's current team.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @return Current TFTeam of client.
|
||||
* @error Invalid client index.
|
||||
* @param client Client index.
|
||||
* @return Current TFTeam of client.
|
||||
* @error Invalid client index.
|
||||
*/
|
||||
stock TFTeam TF2_GetClientTeam(int client)
|
||||
{
|
||||
@@ -363,9 +377,9 @@ stock void TF2_ChangeClientTeam(int client, TFTeam team)
|
||||
/**
|
||||
* Gets a client's current class.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @return Current TFClassType of player.
|
||||
* @error Invalid client index.
|
||||
* @param client Player's index.
|
||||
* @return Current TFClassType of player.
|
||||
* @error Invalid client index.
|
||||
*/
|
||||
stock TFClassType TF2_GetPlayerClass(int client)
|
||||
{
|
||||
@@ -377,11 +391,11 @@ stock TFClassType TF2_GetPlayerClass(int client)
|
||||
*
|
||||
* Note: If setting player class in a player spawn hook weapons should be set to false.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param classType TFClassType class symbol.
|
||||
* @param weapons This parameter is ignored.
|
||||
* @param persistent If true, changes the player's desired class so the change stays after death.
|
||||
* @error Invalid client index.
|
||||
* @param client Player's index.
|
||||
* @param classType TFClassType class symbol.
|
||||
* @param weapons This parameter is ignored.
|
||||
* @param persistent If true, changes the player's desired class so the change stays after death.
|
||||
* @error Invalid client index.
|
||||
*/
|
||||
stock void TF2_SetPlayerClass(int client, TFClassType classType, bool weapons=true, bool persistent=true)
|
||||
{
|
||||
@@ -400,6 +414,7 @@ stock void TF2_SetPlayerClass(int client, TFClassType classType, bool weapons=tr
|
||||
* @param type ResourceType constant
|
||||
* @return Value or -1 on failure.
|
||||
* @error Invalid client index, client not in game or failed to find resource entity.
|
||||
* @deprecated Use GetPlayerResourceEntity and GetEntProp instead.
|
||||
*/
|
||||
#pragma deprecated Use GetPlayerResourceEntity and GetEntProp instead
|
||||
stock int TF2_GetPlayerResourceData(int client, TFResourceType type)
|
||||
@@ -431,11 +446,12 @@ stock int TF2_GetPlayerResourceData(int client, TFResourceType type)
|
||||
*
|
||||
* Note: The game overwrites these values every frame, so changing them will have very little effect.
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param type ResourceType constant
|
||||
* @param value Value to set.
|
||||
* @return Value or -1 on failure.
|
||||
* @error Invalid client index, client not in game or failed to find resource entity.
|
||||
* @param client Player's index.
|
||||
* @param type ResourceType constant
|
||||
* @param value Value to set.
|
||||
* @return Value or -1 on failure.
|
||||
* @error Invalid client index, client not in game or failed to find resource entity.
|
||||
* @deprecated Use GetPlayerResourceEntity and SetEntProp instead.
|
||||
*/
|
||||
#pragma deprecated Use GetPlayerResourceEntity and SetEntProp instead
|
||||
stock bool TF2_SetPlayerResourceData(int client, TFResourceType type, any value)
|
||||
@@ -467,9 +483,9 @@ stock bool TF2_SetPlayerResourceData(int client, TFResourceType type, any value)
|
||||
/**
|
||||
* Removes all weapons from a client's weapon slot
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param slot Slot index (0-5)
|
||||
* @error Invalid client, invalid slot or lack of mod support
|
||||
* @param client Player's index.
|
||||
* @param slot Slot index (0-5)
|
||||
* @error Invalid client, invalid slot or lack of mod support
|
||||
*/
|
||||
stock void TF2_RemoveWeaponSlot(int client, int slot)
|
||||
{
|
||||
@@ -498,7 +514,7 @@ stock void TF2_RemoveWeaponSlot(int client, int slot)
|
||||
/**
|
||||
* Removes all weapons from a client
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param client Player's index.
|
||||
*/
|
||||
stock void TF2_RemoveAllWeapons(int client)
|
||||
{
|
||||
@@ -511,8 +527,9 @@ stock void TF2_RemoveAllWeapons(int client)
|
||||
/**
|
||||
* Gets a player's condition bits
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @return Player's condition bits
|
||||
* @param client Player's index.
|
||||
* @return Player's condition bits
|
||||
* @deprecated Use TF2_IsPlayerInCondition instead.
|
||||
*/
|
||||
#pragma deprecated Use TF2_IsPlayerInCondition instead.
|
||||
stock int TF2_GetPlayerConditionFlags(int client)
|
||||
@@ -523,9 +540,9 @@ stock int TF2_GetPlayerConditionFlags(int client)
|
||||
/**
|
||||
* Check whether or not a condition is set on a player
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param cond TFCond constant
|
||||
* @return True if set, false otherwise
|
||||
* @param client Player's index.
|
||||
* @param cond TFCond constant
|
||||
* @return True if set, false otherwise
|
||||
*/
|
||||
stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
||||
{
|
||||
@@ -533,7 +550,7 @@ stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
||||
int iCond = view_as<int>(cond);
|
||||
switch (iCond / 32)
|
||||
{
|
||||
case 0:
|
||||
case 0:
|
||||
{
|
||||
int bit = 1 << iCond;
|
||||
if ((GetEntProp(client, Prop_Send, "m_nPlayerCond") & bit) == bit)
|
||||
@@ -546,7 +563,7 @@ stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
case 1:
|
||||
{
|
||||
int bit = (1 << (iCond - 32));
|
||||
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx") & bit) == bit)
|
||||
@@ -554,7 +571,7 @@ stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
case 2:
|
||||
{
|
||||
int bit = (1 << (iCond - 64));
|
||||
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx2") & bit) == bit)
|
||||
@@ -562,7 +579,7 @@ stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
case 3:
|
||||
{
|
||||
int bit = (1 << (iCond - 96));
|
||||
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx3") & bit) == bit)
|
||||
@@ -570,8 +587,18 @@ stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
default:
|
||||
ThrowError("Invalid TFCond value %d", iCond);
|
||||
case 4:
|
||||
{
|
||||
int bit = (1 << (iCond - 128));
|
||||
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx4") & bit) == bit)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
ThrowError("Invalid TFCond value %d", iCond);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -580,9 +607,9 @@ stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
||||
/**
|
||||
* Gets an entity's object type.
|
||||
*
|
||||
* @param entity Entity index.
|
||||
* @return Current TFObjectType of entity.
|
||||
* @error Invalid entity index.
|
||||
* @param entity Entity index.
|
||||
* @return Current TFObjectType of entity.
|
||||
* @error Invalid entity index.
|
||||
*/
|
||||
stock TFObjectType TF2_GetObjectType(int entity)
|
||||
{
|
||||
@@ -599,9 +626,9 @@ stock TFObjectType TF2_GetObjectType(int entity)
|
||||
/**
|
||||
* Gets an entity's object mode.
|
||||
*
|
||||
* @param entity Entity index.
|
||||
* @return Current TFObjectMode of entity.
|
||||
* @error Invalid entity index.
|
||||
* @param entity Entity index.
|
||||
* @return Current TFObjectMode of entity.
|
||||
* @error Invalid entity index.
|
||||
*/
|
||||
stock TFObjectMode TF2_GetObjectMode(int entity)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user