mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Mapbase v6.0
- Fixed path_track paths saving as pointers instead of handles - Fixed player animations not falling to base class correctly - Fixed logic_externaldata creating garbage in trailing spaces - Added "SetHandModelSkin" input - Added unique colors for various types of console message, adjustable via convars - Added the ability to use map-specific weapon scripts - Added a way to display (placeholder) text entirely from Faceposer scenes - Added "autobreak" keyvalue to game_text, which automatically breaks long text into different lines - Added the ability to change a game_text's font (very limited) - Added LightToggle input to point_spotlight - Added Enable/DisableSprites on npc_manhack - Added ai_goal_police behavior from metrocops to Combine soldiers and citizens - Added func_precipitation particle rain systems from the Alien Swarm SDK - Added new func_precipitation spawnflags for controlling behavior in particle types - Added "mapbase_version" cvar which shows the version of Mapbase a mod might be running on - Fixed an oversight with NPC crouch activities which was causing npc_metropolice to stop firing in standoffs - Added toggleable patches to npc_combine AI which make soldiers less likely to stand around without shooting or rush to melee when not needed - Added key for custom logo font on env_credits scripts - Added SetSpeed and SetPushDir inputs for trigger_push - Added a bunch of I/O/KV to func_fish_pool to allow for more control over the fish - Added OnLostEnemy/Player support for npc_combine_camera - Added enhanced save/restore for the Response System, toggleable via convar - Added a convar which allows users to disable weapon autoswitching when picking up ammo - Split VScript base script into its own file - Added VScript descriptions for NPC squads and the manager class which handles them - Moved several classes, functions, etc. to the VScript library itself for future usage in other projects, like VBSP - Added VScript to VBSP with basic map file interfacing - Made some VScript documentation more clear due to deprecation of online documentation - Added VScript "hook" registration, creating a standardized system which shows up in script_help documentation - Added VScript-driven custom weapons - Added clientside VScript scopes - Added a bunch of weapon-related VScript functions - Split a bunch of cluttered VScript stuff into different files - Added VScript functions for "following" entities/bonemerging - Added VScript functions for grenades - Added a few more VScript trigger functions - Added OnDeath hook for VScript - Fixed documentation for aliased functions in VScript - Fixed $bumpmask not working on SDK_LightmappedGeneric - Made vertex blend swapping in Hammer use a constant instead of a combo (makes it easier to compile the shader, especially for $bumpmask's sake) - Fixed brush phong, etc. causing SDK_WorldVertexTransition to stop working - Added limited support for $envmapmask in the bumpmapping shader - Fixed more issues with parallax corrected cubemaps and instances - Made instance variable recursion consistent with VMFII
This commit is contained in:
@@ -116,6 +116,10 @@ ConVar autoaim_unlock_target( "autoaim_unlock_target", "0.8666" );
|
||||
|
||||
ConVar sv_stickysprint("sv_stickysprint", "0", FCVAR_ARCHIVE | FCVAR_ARCHIVE_XBOX);
|
||||
|
||||
#ifdef MAPBASE
|
||||
ConVar player_autoswitch_enabled( "player_autoswitch_enabled", "1", FCVAR_NONE, "This convar was added by Mapbase to toggle whether players automatically switch to their ''best'' weapon upon picking up ammo for it after it was dry." );
|
||||
#endif
|
||||
|
||||
#define FLASH_DRAIN_TIME 1.1111 // 100 units / 90 secs
|
||||
#define FLASH_CHARGE_TIME 50.0f // 100 units / 2 secs
|
||||
|
||||
@@ -254,6 +258,7 @@ public:
|
||||
void InputGetAmmoOnWeapon( inputdata_t &inputdata );
|
||||
|
||||
void InputSetHandModel( inputdata_t &inputdata );
|
||||
void InputSetHandModelSkin( inputdata_t &inputdata );
|
||||
|
||||
void InputSetPlayerModel( inputdata_t &inputdata );
|
||||
void InputSetPlayerDrawExternally( inputdata_t &inputdata );
|
||||
@@ -1371,7 +1376,10 @@ void CHL2_Player::ResetAnimation( void )
|
||||
void CHL2_Player::SetAnimation( PLAYER_ANIM playerAnim )
|
||||
{
|
||||
if (!hl2_use_hl2dm_anims.GetBool())
|
||||
{
|
||||
BaseClass::SetAnimation( playerAnim );
|
||||
return;
|
||||
}
|
||||
|
||||
int animDesired;
|
||||
|
||||
@@ -3252,6 +3260,15 @@ bool CHL2_Player::ShouldKeepLockedAutoaimTarget( EHANDLE hLockedTarget )
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CHL2_Player::CanAutoSwitchToNextBestWeapon( CBaseCombatWeapon *pWeapon )
|
||||
{
|
||||
return player_autoswitch_enabled.GetBool();
|
||||
}
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
// Input : iCount -
|
||||
@@ -3293,6 +3310,9 @@ int CHL2_Player::GiveAmmo( int nCount, int nAmmoIndex, bool bSuppressSound)
|
||||
|
||||
if ( pWeapon && pWeapon->GetPrimaryAmmoType() == nAmmoIndex )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
if (CanAutoSwitchToNextBestWeapon(pWeapon))
|
||||
#endif
|
||||
SwitchToNextBestWeapon(GetActiveWeapon());
|
||||
}
|
||||
}
|
||||
@@ -4591,6 +4611,7 @@ BEGIN_DATADESC( CLogicPlayerProxy )
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "RequestPlayerFlashBattery", InputRequestPlayerFlashBattery ),
|
||||
DEFINE_INPUTFUNC( FIELD_STRING, "GetAmmoOnWeapon", InputGetAmmoOnWeapon ),
|
||||
DEFINE_INPUTFUNC( FIELD_STRING, "SetHandModel", InputSetHandModel ),
|
||||
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetHandModelSkin", InputSetHandModelSkin ),
|
||||
DEFINE_INPUTFUNC( FIELD_STRING, "SetPlayerModel", InputSetPlayerModel ),
|
||||
DEFINE_INPUTFUNC( FIELD_BOOLEAN, "SetPlayerDrawExternally", InputSetPlayerDrawExternally ),
|
||||
DEFINE_INPUT( m_MaxArmor, FIELD_INTEGER, "SetMaxInputArmor" ),
|
||||
@@ -5023,6 +5044,17 @@ void CLogicPlayerProxy::InputSetHandModel( inputdata_t &inputdata )
|
||||
vm->SetModel(STRING(iszModel));
|
||||
}
|
||||
|
||||
void CLogicPlayerProxy::InputSetHandModelSkin( inputdata_t &inputdata )
|
||||
{
|
||||
if (!m_hPlayer)
|
||||
return;
|
||||
|
||||
CBasePlayer *pPlayer = static_cast<CBasePlayer*>( m_hPlayer.Get() );
|
||||
CBaseViewModel *vm = pPlayer->GetViewModel(1);
|
||||
if (vm)
|
||||
vm->m_nSkin = inputdata.value.Int();
|
||||
}
|
||||
|
||||
void CLogicPlayerProxy::InputSetPlayerModel( inputdata_t &inputdata )
|
||||
{
|
||||
if (!m_hPlayer)
|
||||
|
||||
Reference in New Issue
Block a user