Removed TF2_GivePlayerWeapon() and TF2_EquipPlayerClassWeapons() stocks as they no longer work at all

The 'weapons' paramater in the TF2_SetPlayerClass() class is now ignored since it no longer works
Bumped 1.0.2 versions for the final time

--HG--
branch : sourcemod-1.0.x
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402236
This commit is contained in:
Scott Ehlert 2008-05-31 22:30:57 +00:00
parent 32f2680181
commit 8ad1cb0b8c
13 changed files with 24 additions and 132 deletions

View File

@ -40,7 +40,7 @@
* @file Contains SourceMod version information.
*/
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_SOURCEMOD_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_BINTOOLS_VERSION_H_
#define _INCLUDE_BINTOOLS_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_BINTOOLS_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
#define _INCLUDE_SDKTOOLS_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_SDKTOOLS_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_GEOIP_VERSION_H_
#define _INCLUDE_GEOIP_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_GEOIP_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_MYSQLEXT_VERSION_H_
#define _INCLUDE_MYSQLEXT_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_MYSQLEXT_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_REGEXEXT_VERSION_H_
#define _INCLUDE_REGEXEXT_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_REGEXEXT_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
#define _INCLUDE_SDKTOOLS_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_SDKTOOLS_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
#define _INCLUDE_SQLITEEXT_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_SQLITEEXT_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
#define _INCLUDE_SDKTOOLS_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_SDKTOOLS_VERSION_H_

View File

@ -36,7 +36,7 @@
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
#define _INCLUDE_SQLITEEXT_VERSION_H_
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_SQLITEEXT_VERSION_H_

View File

@ -40,7 +40,7 @@
* @file Contains SourceMod version information.
*/
#define SVN_FULL_VERSION "1.0.2.2232"
#define SVN_FILE_VERSION 1,0,2,2232
#define SVN_FULL_VERSION "1.0.2.2236"
#define SVN_FILE_VERSION 1,0,2,2236
#endif //_INCLUDE_SOURCEMOD_VERSION_H_

View File

@ -102,7 +102,7 @@ stock TFClassType:TF2_GetPlayerClass(client)
*
* @param client Player's index.
* @param class TFClassType class symbol.
* @param weapons If true, changes the players weapon set to that of the new class.
* @param weapons This paramater is ignored.
* @param persistant If true changes the players desired class so the change stays after death.
* @noreturn
* @error Invalid client index.
@ -115,12 +115,6 @@ stock TF2_SetPlayerClass(client, TFClassType:class, bool:weapons=true, bool:pers
{
SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", _:class);
}
if (weapons && IsPlayerAlive(client))
{
TF2_RemoveAllWeapons(client);
TF2_EquipPlayerClassWeapons(client, class);
}
}
/**
@ -223,105 +217,3 @@ stock TF2_RemoveAllWeapons(client)
TF2_RemoveWeaponSlot(client, i);
}
}
/**
* Gives a named weapon to a client
*
* @param client Player's index.
* @param weapon Weapon name
* @return False if weapon could not be created, true on success
* @error Invalid client index or lack of mod support
*/
stock bool:TF2_GivePlayerWeapon(client, const String:weapon[])
{
new weaponIndex = GivePlayerItem(client, weapon);
if (weaponIndex == -1)
{
return false;
}
EquipPlayerWeapon(client, weaponIndex);
return true;
}
/**
* Equips a client with a class's weapons. This does not remove existing weapons.
*
* Note: Some class specific items such tf_weapon_pda_engineer_build are only given
* if the client is the correct class.
*
* @param client Player's index.
* @param class TFClasssType class symbol.
* @noreturn
*/
stock TF2_EquipPlayerClassWeapons(client, TFClassType:class)
{
switch(class)
{
case TFClass_Scout:
{
TF2_GivePlayerWeapon(client, "tf_weapon_scattergun");
TF2_GivePlayerWeapon(client, "tf_weapon_pistol_scout");
TF2_GivePlayerWeapon(client, "tf_weapon_bat");
}
case TFClass_Sniper:
{
TF2_GivePlayerWeapon(client, "tf_weapon_sniperrifle");
TF2_GivePlayerWeapon(client, "tf_weapon_smg");
TF2_GivePlayerWeapon(client, "tf_weapon_club");
}
case TFClass_Soldier:
{
TF2_GivePlayerWeapon(client, "tf_weapon_rocketlauncher");
TF2_GivePlayerWeapon(client, "tf_weapon_shotgun_soldier");
TF2_GivePlayerWeapon(client, "tf_weapon_shovel");
}
case TFClass_DemoMan:
{
TF2_GivePlayerWeapon(client, "tf_weapon_pipebomblauncher");
TF2_GivePlayerWeapon(client, "tf_weapon_grenadelauncher");
TF2_GivePlayerWeapon(client, "tf_weapon_bottle");
}
case TFClass_Medic:
{
TF2_GivePlayerWeapon(client, "tf_weapon_syringegun_medic");
TF2_GivePlayerWeapon(client, "tf_weapon_medigun");
TF2_GivePlayerWeapon(client, "tf_weapon_bonesaw");
}
case TFClass_Heavy:
{
TF2_GivePlayerWeapon(client, "tf_weapon_minigun");
TF2_GivePlayerWeapon(client, "tf_weapon_shotgun_hwg");
TF2_GivePlayerWeapon(client, "tf_weapon_fists");
}
case TFClass_Pyro:
{
TF2_GivePlayerWeapon(client, "tf_weapon_flamethrower");
TF2_GivePlayerWeapon(client, "tf_weapon_shotgun_pyro");
TF2_GivePlayerWeapon(client, "tf_weapon_fireaxe");
}
case TFClass_Spy:
{
TF2_GivePlayerWeapon(client, "tf_weapon_revolver");
TF2_GivePlayerWeapon(client, "tf_weapon_knife");
if (TF2_GetPlayerClass(client) != TFClass_Spy)
return;
TF2_GivePlayerWeapon(client, "tf_weapon_pda_spy");
}
case TFClass_Engineer:
{
TF2_GivePlayerWeapon(client, "tf_weapon_shotgun_primary");
TF2_GivePlayerWeapon(client, "tf_weapon_pistol");
TF2_GivePlayerWeapon(client, "tf_weapon_wrench");
if (TF2_GetPlayerClass(client) != TFClass_Engineer)
return;
TF2_GivePlayerWeapon(client, "tf_weapon_pda_engineer_build");
TF2_GivePlayerWeapon(client, "tf_weapon_pda_engineer_destroy");
}
}
}

View File

@ -39,4 +39,4 @@
#define SOURCEMOD_V_MINOR 0 /**< SourceMod Minor version */
#define SOURCEMOD_V_RELEASE 2 /**< SourceMod Release version */
#define SOURCEMOD_VERSION "1.0.2.2232" /**< SourceMod version string (major.minor.release.build) */
#define SOURCEMOD_VERSION "1.0.2.2236" /**< SourceMod version string (major.minor.release.build) */