mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +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:
@@ -1801,22 +1801,6 @@ void CBaseCombatWeapon::InputHideWeapon( inputdata_t &inputdata )
|
||||
SetWeaponVisible( false );
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
const char *CBaseCombatWeapon::ScriptGetPrimaryAmmoType()
|
||||
{
|
||||
return GetPrimaryAmmoType() <= GetAmmoDef()->m_nAmmoIndex ? GetAmmoDef()->m_AmmoType[GetPrimaryAmmoType()].pName : NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
const char *CBaseCombatWeapon::ScriptGetSecondaryAmmoType()
|
||||
{
|
||||
return GetSecondaryAmmoType() <= GetAmmoDef()->m_nAmmoIndex ? GetAmmoDef()->m_AmmoType[GetSecondaryAmmoType()].pName : NULL;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -2910,8 +2894,8 @@ BEGIN_ENT_SCRIPTDESC( CBaseCombatWeapon, CBaseAnimating, "The base class for all
|
||||
DEFINE_SCRIPTFUNC( UsesClipsForAmmo2, "Check if the weapon uses clips for secondary ammo." )
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetPrimaryAmmoType, "GetPrimaryAmmoType", "Get the weapon's primary ammo type." )
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetSecondaryAmmoType, "GetSecondaryAmmoType", "Get the weapon's secondary ammo type." )
|
||||
DEFINE_SCRIPTFUNC( GetPrimaryAmmoType, "Get the weapon's primary ammo type." )
|
||||
DEFINE_SCRIPTFUNC( GetSecondaryAmmoType, "Get the weapon's secondary ammo type." )
|
||||
#endif
|
||||
|
||||
DEFINE_SCRIPTFUNC( GetSubType, "Get the weapon's subtype." )
|
||||
|
||||
Reference in New Issue
Block a user