Update compiler and includes to version 1.7.0.

This commit is contained in:
Richard Helgeby
2015-03-21 15:43:24 +01:00
parent 743d17e05a
commit 5ec3694535
54 changed files with 4087 additions and 1599 deletions
+48 -13
View File
@@ -249,6 +249,7 @@ enum {
TF_WEAPON_SPELLBOOK,
TF_WEAPON_SPELLBOOK_PROJECTILE,
TF_WEAPON_SNIPERRIFLE_CLASSIC,
TF_WEAPON_PARACHUTE,
};
// TF2 Weapon Loadout Slots
@@ -318,7 +319,19 @@ static const String:TFResourceNames[TFResourceType][] =
};
/**
* Get's a Clients current class.
* Gets a client's current team.
*
* @param client Client index.
* @return Current TFTeam of client.
* @error Invalid client index.
*/
stock TFTeam:TF2_GetClientTeam(client)
{
return TFTeam:GetClientTeam(client);
}
/**
* Gets a client's current class.
*
* @param client Player's index.
* @return Current TFClassType of player.
@@ -330,24 +343,24 @@ stock TFClassType:TF2_GetPlayerClass(client)
}
/**
* Set's a Clients class.
* Sets a client's class.
*
* Note: If setting player class in a player spawn hook weapons should be set to false.
*
* @param client Player's index.
* @param class TFClassType class symbol.
* @param weapons This paramater is ignored.
* @param persistent If true changes the players desired class so the change stays after death.
* @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.
* @noreturn
* @error Invalid client index.
*/
stock TF2_SetPlayerClass(client, TFClassType:class, bool:weapons=true, bool:persistent=true)
stock TF2_SetPlayerClass(client, TFClassType:classType, bool:weapons=true, bool:persistent=true)
{
SetEntProp(client, Prop_Send, "m_iClass", _:class);
SetEntProp(client, Prop_Send, "m_iClass", _:classType);
if (persistent)
{
SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", _:class);
SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", _:classType);
}
}
@@ -368,12 +381,12 @@ stock TF2_GetPlayerResourceData(client, TFResourceType:type)
}
new offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]);
if (offset < 1)
{
return -1;
}
new entity = TF2_GetResourceEntity();
if (entity == -1)
@@ -404,12 +417,12 @@ stock bool:TF2_SetPlayerResourceData(client, TFResourceType:type, any:value)
}
new offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]);
if (offset < 1)
{
return false;
}
new entity = TF2_GetResourceEntity();
if (entity == -1)
@@ -435,6 +448,20 @@ stock TF2_RemoveWeaponSlot(client, slot)
new weaponIndex;
while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
{
// bug #6206
// papering over a valve bug where a weapon's extra wearables aren't properly removed from the weapon's owner
new extraWearable = GetEntPropEnt(weaponIndex, Prop_Send, "m_hExtraWearable");
if (extraWearable != -1)
{
TF2_RemoveWearable(client, extraWearable);
}
extraWearable = GetEntPropEnt(weaponIndex, Prop_Send, "m_hExtraWearableViewModel");
if (extraWearable != -1)
{
TF2_RemoveWearable(client, extraWearable);
}
RemovePlayerItem(client, weaponIndex);
AcceptEntityInput(weaponIndex, "Kill");
}
@@ -497,7 +524,7 @@ stock bool:TF2_IsPlayerInCondition(client, TFCond:cond)
return true;
}
}
else
else if (_:cond < 96)
{
new bit = (1 << (_:cond - 64));
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx2") & bit) == bit)
@@ -505,6 +532,14 @@ stock bool:TF2_IsPlayerInCondition(client, TFCond:cond)
return true;
}
}
else
{
new bit = (1 << (_:cond - 96));
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx3") & bit) == bit)
{
return true;
}
}
return false;
}