mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Mapbase v2.1
- Fixed parallax corrected cubemaps not working when cubemaps are disabled - Fixed a crash with some new script_intro code - Fixed item_health/suitcharger not emptying or using correct animation with keyvalue charge - Added a new "Always touchable" spawnflag for weapons and items that should disregard obstructions - Added "OnFoundNPC" output on scripted_sequence for when a NPC starts moving to play the script - Fixed npc_snipers not working when parented or not working when attacking parented targets - Changed "ai_nographrebuildmessage" to "ai_norebuildgraphmessage" to reduce confusion and increase visibility (it is assumed nobody was using it before, at least not in a compatibility-breaking way) - Added damage bit modification to filter_damage_mod - Added Add/RemoveSolidFlags input to all entities + added "Collide with owner" solid flag from the VDC - Added custom model support to item_health/suitcharger
This commit is contained in:
@@ -522,7 +522,14 @@ bool CNewRecharge::KeyValue( const char *szKeyName, const char *szValue )
|
||||
|
||||
void CNewRecharge::Precache( void )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
if ( GetModelName() == NULL_STRING )
|
||||
SetModelName( AllocPooledString(HEALTH_CHARGER_MODEL_NAME) );
|
||||
|
||||
PrecacheModel( STRING(GetModelName()) );
|
||||
#else
|
||||
PrecacheModel( HEALTH_CHARGER_MODEL_NAME );
|
||||
#endif
|
||||
|
||||
PrecacheScriptSound( "SuitRecharge.Deny" );
|
||||
PrecacheScriptSound( "SuitRecharge.Start" );
|
||||
@@ -564,7 +571,11 @@ void CNewRecharge::Spawn()
|
||||
SetSolid( SOLID_VPHYSICS );
|
||||
CreateVPhysics();
|
||||
|
||||
#ifdef MAPBASE
|
||||
SetModel( STRING(GetModelName()) );
|
||||
#else
|
||||
SetModel( HEALTH_CHARGER_MODEL_NAME );
|
||||
#endif
|
||||
AddEffects( EF_NOSHADOW );
|
||||
|
||||
ResetSequence( LookupSequence( "idle" ) );
|
||||
@@ -576,7 +587,10 @@ void CNewRecharge::Spawn()
|
||||
if (m_iJuice == 0)
|
||||
UpdateJuice( MaxJuice() );
|
||||
else if (m_iJuice == -1)
|
||||
{
|
||||
UpdateJuice( 0 );
|
||||
ResetSequence( LookupSequence( "empty" ) );
|
||||
}
|
||||
else
|
||||
UpdateJuice( m_iJuice );
|
||||
#else
|
||||
@@ -683,22 +697,22 @@ void CNewRecharge::InputRecharge( inputdata_t &inputdata )
|
||||
|
||||
void CNewRecharge::InputSetCharge( inputdata_t &inputdata )
|
||||
{
|
||||
ResetSequence( LookupSequence( "idle" ) );
|
||||
|
||||
int iJuice = inputdata.value.Int();
|
||||
|
||||
m_flJuice = m_iMaxJuice = m_iJuice = iJuice;
|
||||
|
||||
ResetSequence( m_iJuice > 0 ? LookupSequence( "idle" ) : LookupSequence( "empty" ) );
|
||||
StudioFrameAdvance();
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
void CNewRecharge::InputSetChargeNoMax( inputdata_t &inputdata )
|
||||
{
|
||||
ResetSequence( LookupSequence( "idle" ) );
|
||||
|
||||
m_flJuice = inputdata.value.Float();
|
||||
|
||||
UpdateJuice(m_flJuice);
|
||||
|
||||
ResetSequence( m_iJuice > 0 ? LookupSequence( "idle" ) : LookupSequence( "empty" ) );
|
||||
StudioFrameAdvance();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user