mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Mapbase v4.1
- Exposed CAmmoDef to VScript and changed ammo type functions accordingly - Added TakeHealth and IsAlive to CBaseEntity - Added $treeSway - Added several inputs to control env_wind keyvalues + a new $treeSway scale keyvalue - Added "Expanded name fixup" keyvalue to point_template which allows name fixup to fix up output parameters - Fixed the rope on rappelling NPCs causing graphical issues - Fixed prop_vehicle_prisoner_pod missing "EnterVehicle", "EnterVehicleImmediate", and "ExitVehicle" inputs - Fixed hostile citizens not damaging player - Fixed an uncommon npc_metropolice crash from when it's not in a squad - Made SetTarget input update target handling on NPCs - Changed ammo type functions to be more organized, added AmmoDef singleton - Added more precache functions - Added various misc. entity functions, like GetAllWeapons or AddOutput - Added more utility functions
This commit is contained in:
@@ -157,6 +157,7 @@ BEGIN_ENT_SCRIPTDESC( CBaseCombatCharacter, CBaseFlex, "The base class shared by
|
||||
DEFINE_SCRIPTFUNC( WeaponCount, "Get the number of weapons a character possesses." )
|
||||
DEFINE_SCRIPTFUNC_NAMED( GetScriptWeaponIndex, "GetWeapon", "Get a specific weapon in the character's inventory." )
|
||||
DEFINE_SCRIPTFUNC_NAMED( GetScriptWeaponByType, "FindWeapon", "Find a specific weapon in the character's inventory by its classname." )
|
||||
DEFINE_SCRIPTFUNC_NAMED( GetScriptAllWeapons, "GetAllWeapons", "Get the character's weapon inventory." )
|
||||
|
||||
DEFINE_SCRIPTFUNC_NAMED( Weapon_ShootPosition, "ShootPosition", "Get the character's shoot position." )
|
||||
DEFINE_SCRIPTFUNC_NAMED( Weapon_DropAll, "DropAllWeapons", "Make the character drop all of its weapons." )
|
||||
@@ -4377,6 +4378,19 @@ HSCRIPT CBaseCombatCharacter::GetScriptWeaponByType( const char *pszWeapon, int
|
||||
return ToHScript( Weapon_OwnsThisType( pszWeapon, iSubType ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseCombatCharacter::GetScriptAllWeapons( HSCRIPT hTable )
|
||||
{
|
||||
for (int i=0;i<MAX_WEAPONS;i++)
|
||||
{
|
||||
if (m_hMyWeapons[i])
|
||||
{
|
||||
g_pScriptVM->SetValue( hTable, m_hMyWeapons[i]->GetClassname(), ToHScript( m_hMyWeapons[i] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseCombatCharacter::ScriptEquipWeapon( HSCRIPT hWeapon )
|
||||
|
||||
Reference in New Issue
Block a user