mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-03 14:06:44 +00:00
commit
e852953d9d
@ -1149,7 +1149,7 @@ void C_BaseFlex::SetupWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightC
|
|||||||
{
|
{
|
||||||
// hack in an initialization
|
// hack in an initialization
|
||||||
LinkToGlobalFlexControllers( GetModelPtr() );
|
LinkToGlobalFlexControllers( GetModelPtr() );
|
||||||
m_iBlink = AddGlobalFlexController( "UH" );
|
m_iBlink = AddGlobalFlexController( "blink" );
|
||||||
|
|
||||||
if ( SetupGlobalWeights( pBoneToWorld, nFlexWeightCount, pFlexWeights, pFlexDelayedWeights ) )
|
if ( SetupGlobalWeights( pBoneToWorld, nFlexWeightCount, pFlexWeights, pFlexDelayedWeights ) )
|
||||||
{
|
{
|
||||||
|
@ -159,7 +159,7 @@ void CGlowOverlay::UpdateSkyGlowObstruction( float zFar, bool bCacheFullSceneSta
|
|||||||
if ( PixelVisibility_IsAvailable() )
|
if ( PixelVisibility_IsAvailable() )
|
||||||
{
|
{
|
||||||
// Trace a ray at the object.
|
// Trace a ray at the object.
|
||||||
Vector pos = CurrentViewOrigin() + m_vDirection * zFar * 0.999f;
|
Vector pos = CurrentViewOrigin() + m_vDirection * zFar * 0.99f; //9f;
|
||||||
|
|
||||||
// UNDONE: Can probably do only the pixelvis query in this case if you can figure out where
|
// UNDONE: Can probably do only the pixelvis query in this case if you can figure out where
|
||||||
// to put it - or save the position of this trace
|
// to put it - or save the position of this trace
|
||||||
|
@ -642,16 +642,17 @@ void CViewRender::SetUpViews()
|
|||||||
// Initialize view structure with default values
|
// Initialize view structure with default values
|
||||||
float farZ = GetZFar();
|
float farZ = GetZFar();
|
||||||
|
|
||||||
// Set up the mono/middle view.
|
// Set up the mono/middle view.
|
||||||
CViewSetup &view = m_View;
|
CViewSetup &view = m_View;
|
||||||
|
|
||||||
view.zFar = farZ;
|
view.zFar = farZ;
|
||||||
view.zFarViewmodel = farZ;
|
view.zFarViewmodel = farZ;
|
||||||
// UNDONE: Make this farther out?
|
|
||||||
|
// UNDONE: Make this farther out?
|
||||||
// closest point of approach seems to be view center to top of crouched box
|
// closest point of approach seems to be view center to top of crouched box
|
||||||
view.zNear = GetZNear();
|
view.zNear = GetZNear();
|
||||||
view.zNearViewmodel = 1;
|
view.zNearViewmodel = 1;
|
||||||
view.fov = default_fov.GetFloat();
|
view.fov = default_fov.GetFloat();
|
||||||
|
|
||||||
view.m_bOrtho = false;
|
view.m_bOrtho = false;
|
||||||
view.m_bViewToProjectionOverride = false;
|
view.m_bViewToProjectionOverride = false;
|
||||||
@ -736,7 +737,7 @@ void CViewRender::SetUpViews()
|
|||||||
float flFOVOffset = fDefaultFov - view.fov;
|
float flFOVOffset = fDefaultFov - view.fov;
|
||||||
|
|
||||||
//Adjust the viewmodel's FOV to move with any FOV offsets on the viewer's end
|
//Adjust the viewmodel's FOV to move with any FOV offsets on the viewer's end
|
||||||
view.fovViewmodel = g_pClientMode->GetViewModelFOV() - flFOVOffset;
|
view.fovViewmodel = fabs( g_pClientMode->GetViewModelFOV() - flFOVOffset );
|
||||||
|
|
||||||
if ( UseVR() )
|
if ( UseVR() )
|
||||||
{
|
{
|
||||||
|
@ -6560,6 +6560,12 @@ float CAI_BaseNPC::ThrowLimit( const Vector &vecStart,
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CAI_BaseNPC::SetupVPhysicsHull()
|
void CAI_BaseNPC::SetupVPhysicsHull()
|
||||||
{
|
{
|
||||||
|
if( GetModelPtr() == NULL )
|
||||||
|
{
|
||||||
|
UTIL_Remove( this );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( GetMoveType() == MOVETYPE_VPHYSICS || GetMoveType() == MOVETYPE_NONE )
|
if ( GetMoveType() == MOVETYPE_VPHYSICS || GetMoveType() == MOVETYPE_NONE )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -155,9 +155,10 @@ void CGrenadeFrag::OnRestore( void )
|
|||||||
void CGrenadeFrag::CreateEffects( void )
|
void CGrenadeFrag::CreateEffects( void )
|
||||||
{
|
{
|
||||||
// Start up the eye glow
|
// Start up the eye glow
|
||||||
m_pMainGlow = CSprite::SpriteCreate( "sprites/redglow1.vmt", GetLocalOrigin(), false );
|
if( !m_pMainGlow )
|
||||||
|
m_pMainGlow = CSprite::SpriteCreate( "sprites/redglow1.vmt", GetLocalOrigin(), false );
|
||||||
|
|
||||||
int nAttachment = LookupAttachment( "fuse" );
|
int nAttachment = LookupAttachment( "fuse" );
|
||||||
|
|
||||||
if ( m_pMainGlow != NULL )
|
if ( m_pMainGlow != NULL )
|
||||||
{
|
{
|
||||||
@ -169,7 +170,8 @@ void CGrenadeFrag::CreateEffects( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start up the eye trail
|
// Start up the eye trail
|
||||||
m_pGlowTrail = CSpriteTrail::SpriteTrailCreate( "sprites/bluelaser1.vmt", GetLocalOrigin(), false );
|
if( !m_pGlowTrail )
|
||||||
|
m_pGlowTrail = CSpriteTrail::SpriteTrailCreate( "sprites/bluelaser1.vmt", GetLocalOrigin(), false );
|
||||||
|
|
||||||
if ( m_pGlowTrail != NULL )
|
if ( m_pGlowTrail != NULL )
|
||||||
{
|
{
|
||||||
@ -450,4 +452,4 @@ bool Fraggrenade_WasCreatedByCombine( const CBaseEntity *pEntity )
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -378,7 +378,7 @@ void CNPC_Combine::PostNPCInit()
|
|||||||
// an AR2.
|
// an AR2.
|
||||||
if( !GetActiveWeapon() || !FClassnameIs( GetActiveWeapon(), "weapon_ar2" ) )
|
if( !GetActiveWeapon() || !FClassnameIs( GetActiveWeapon(), "weapon_ar2" ) )
|
||||||
{
|
{
|
||||||
DevWarning("**Combine Elite Soldier MUST be equipped with AR2\n");
|
// DevWarning("**Combine Elite Soldier MUST be equipped with AR2\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2320,7 +2320,18 @@ void CNPC_Combine::HandleAnimEvent( animevent_t *pEvent )
|
|||||||
{
|
{
|
||||||
if ( pEvent->event == COMBINE_AE_BEGIN_ALTFIRE )
|
if ( pEvent->event == COMBINE_AE_BEGIN_ALTFIRE )
|
||||||
{
|
{
|
||||||
EmitSound( "Weapon_CombineGuard.Special1" );
|
if( FClassnameIs( GetActiveWeapon(), "weapon_ar2" ) )
|
||||||
|
{
|
||||||
|
EmitSound( "Weapon_CombineGuard.Special1" );
|
||||||
|
}
|
||||||
|
else if( FClassnameIs( GetActiveWeapon(), "weapon_smg1" ) )
|
||||||
|
{
|
||||||
|
EmitSound( "Weapon_SMG1.Double" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EmitSound( "Weapon_CombineGuard.Special1" );
|
||||||
|
}
|
||||||
handledEvent = true;
|
handledEvent = true;
|
||||||
}
|
}
|
||||||
else if ( pEvent->event == COMBINE_AE_ALTFIRE )
|
else if ( pEvent->event == COMBINE_AE_ALTFIRE )
|
||||||
@ -2565,7 +2576,7 @@ void CNPC_Combine::SpeakSentence( int sentenceType )
|
|||||||
//=========================================================
|
//=========================================================
|
||||||
// PainSound
|
// PainSound
|
||||||
//=========================================================
|
//=========================================================
|
||||||
void CNPC_Combine::PainSound ( void )
|
void CNPC_Combine::PainSound ( const CTakeDamageInfo &damageinfo )
|
||||||
{
|
{
|
||||||
// NOTE: The response system deals with this at the moment
|
// NOTE: The response system deals with this at the moment
|
||||||
if ( GetFlags() & FL_DISSOLVING )
|
if ( GetFlags() & FL_DISSOLVING )
|
||||||
|
@ -126,7 +126,7 @@ public:
|
|||||||
// Sounds
|
// Sounds
|
||||||
// -------------
|
// -------------
|
||||||
void DeathSound( void );
|
void DeathSound( void );
|
||||||
void PainSound( void );
|
void PainSound( const CTakeDamageInfo &damageinfo );
|
||||||
void IdleSound( void );
|
void IdleSound( void );
|
||||||
void AlertSound( void );
|
void AlertSound( void );
|
||||||
void LostEnemySound( void );
|
void LostEnemySound( void );
|
||||||
|
@ -343,6 +343,8 @@ private:
|
|||||||
int m_iMachineGunRefAttachment;
|
int m_iMachineGunRefAttachment;
|
||||||
int m_iAttachmentTroopDeploy;
|
int m_iAttachmentTroopDeploy;
|
||||||
int m_iAttachmentDeployStart;
|
int m_iAttachmentDeployStart;
|
||||||
|
int m_poseWeapon_Pitch;
|
||||||
|
int m_poseWeapon_Yaw;
|
||||||
|
|
||||||
// Sounds
|
// Sounds
|
||||||
CSoundPatch *m_pCannonSound;
|
CSoundPatch *m_pCannonSound;
|
||||||
@ -363,8 +365,7 @@ protected:
|
|||||||
// Should the dropship end up having inheritors, their activate may
|
// Should the dropship end up having inheritors, their activate may
|
||||||
// stomp these numbers, in which case you should make these ordinary members
|
// stomp these numbers, in which case you should make these ordinary members
|
||||||
// again.
|
// again.
|
||||||
static int m_poseBody_Accel, m_poseBody_Sway, m_poseCargo_Body_Accel, m_poseCargo_Body_Sway,
|
static int m_poseBody_Accel, m_poseBody_Sway, m_poseCargo_Body_Accel, m_poseCargo_Body_Sway;
|
||||||
m_poseWeapon_Pitch, m_poseWeapon_Yaw;
|
|
||||||
static bool m_sbStaticPoseParamsLoaded;
|
static bool m_sbStaticPoseParamsLoaded;
|
||||||
virtual void PopulatePoseParameters( void );
|
virtual void PopulatePoseParameters( void );
|
||||||
};
|
};
|
||||||
@ -375,13 +376,11 @@ int CNPC_CombineDropship::m_poseBody_Accel = 0;
|
|||||||
int CNPC_CombineDropship::m_poseBody_Sway = 0;
|
int CNPC_CombineDropship::m_poseBody_Sway = 0;
|
||||||
int CNPC_CombineDropship::m_poseCargo_Body_Accel = 0;
|
int CNPC_CombineDropship::m_poseCargo_Body_Accel = 0;
|
||||||
int CNPC_CombineDropship::m_poseCargo_Body_Sway = 0;
|
int CNPC_CombineDropship::m_poseCargo_Body_Sway = 0;
|
||||||
int CNPC_CombineDropship::m_poseWeapon_Pitch = 0;
|
|
||||||
int CNPC_CombineDropship::m_poseWeapon_Yaw = 0;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Cache whatever pose parameters we intend to use
|
// Purpose: Cache whatever pose parameters we intend to use
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CNPC_CombineDropship::PopulatePoseParameters( void )
|
void CNPC_CombineDropship::PopulatePoseParameters( void )
|
||||||
{
|
{
|
||||||
if (!m_sbStaticPoseParamsLoaded)
|
if (!m_sbStaticPoseParamsLoaded)
|
||||||
{
|
{
|
||||||
@ -389,12 +388,16 @@ void CNPC_CombineDropship::PopulatePoseParameters( void )
|
|||||||
m_poseBody_Sway = LookupPoseParameter( "body_sway" );
|
m_poseBody_Sway = LookupPoseParameter( "body_sway" );
|
||||||
m_poseCargo_Body_Accel = LookupPoseParameter( "cargo_body_accel" );
|
m_poseCargo_Body_Accel = LookupPoseParameter( "cargo_body_accel" );
|
||||||
m_poseCargo_Body_Sway = LookupPoseParameter( "cargo_body_sway" );
|
m_poseCargo_Body_Sway = LookupPoseParameter( "cargo_body_sway" );
|
||||||
m_poseWeapon_Pitch = LookupPoseParameter( "weapon_pitch" );
|
|
||||||
m_poseWeapon_Yaw = LookupPoseParameter( "weapon_yaw" );
|
|
||||||
|
|
||||||
m_sbStaticPoseParamsLoaded = true;
|
m_sbStaticPoseParamsLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_hContainer )
|
||||||
|
{
|
||||||
|
m_poseWeapon_Pitch = m_hContainer->LookupPoseParameter( "weapon_pitch" );
|
||||||
|
m_poseWeapon_Yaw = m_hContainer->LookupPoseParameter( "weapon_yaw" );
|
||||||
|
}
|
||||||
|
|
||||||
BaseClass::PopulatePoseParameters();
|
BaseClass::PopulatePoseParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -861,6 +864,8 @@ void CNPC_CombineDropship::Spawn( void )
|
|||||||
m_iMachineGunRefAttachment = -1;
|
m_iMachineGunRefAttachment = -1;
|
||||||
m_iAttachmentTroopDeploy = -1;
|
m_iAttachmentTroopDeploy = -1;
|
||||||
m_iAttachmentDeployStart = -1;
|
m_iAttachmentDeployStart = -1;
|
||||||
|
m_poseWeapon_Pitch = -1;
|
||||||
|
m_poseWeapon_Yaw = -1;
|
||||||
|
|
||||||
// create the correct bin for the ship to carry
|
// create the correct bin for the ship to carry
|
||||||
switch ( m_iCrateType )
|
switch ( m_iCrateType )
|
||||||
@ -896,6 +901,9 @@ void CNPC_CombineDropship::Spawn( void )
|
|||||||
m_iMachineGunBaseAttachment = m_hContainer->LookupAttachment( "gun_base" );
|
m_iMachineGunBaseAttachment = m_hContainer->LookupAttachment( "gun_base" );
|
||||||
// NOTE: gun_ref must have the same position as gun_base, but rotates with the gun
|
// NOTE: gun_ref must have the same position as gun_base, but rotates with the gun
|
||||||
m_iMachineGunRefAttachment = m_hContainer->LookupAttachment( "gun_ref" );
|
m_iMachineGunRefAttachment = m_hContainer->LookupAttachment( "gun_ref" );
|
||||||
|
|
||||||
|
m_poseWeapon_Pitch = m_hContainer->LookupPoseParameter( "weapon_pitch" );
|
||||||
|
m_poseWeapon_Yaw = m_hContainer->LookupPoseParameter( "weapon_yaw" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@ void CNPC_Houndeye::DeathSound ( void )
|
|||||||
//=========================================================
|
//=========================================================
|
||||||
// PainSound
|
// PainSound
|
||||||
//=========================================================
|
//=========================================================
|
||||||
void CNPC_Houndeye::PainSound ( void )
|
void CNPC_Houndeye::PainSound ( const CTakeDamageInfo &info )
|
||||||
{
|
{
|
||||||
EmitSound( "NPC_Houndeye.Pain" );
|
EmitSound( "NPC_Houndeye.Pain" );
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
|
|
||||||
float GetFireRate( void ) { return 0.075f; } // 13.3hz
|
float GetFireRate( void ) { return 0.075f; } // 13.3hz
|
||||||
int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; }
|
int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; }
|
||||||
int WeaponRangeAttack2Condition( float flDot, float flDist );
|
int WeaponRangeAttack2Condition(/* float flDot, float flDist */);
|
||||||
Activity GetPrimaryAttackActivity( void );
|
Activity GetPrimaryAttackActivity( void );
|
||||||
|
|
||||||
virtual const Vector& GetBulletSpread( void )
|
virtual const Vector& GetBulletSpread( void )
|
||||||
@ -228,32 +228,50 @@ void CWeaponSMG1::Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatChar
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*//FIXME: Re-enable
|
case EVENT_WEAPON_AR2_ALTFIRE:
|
||||||
case EVENT_WEAPON_AR2_GRENADE:
|
|
||||||
{
|
{
|
||||||
CAI_BaseNPC *npc = pOperator->MyNPCPointer();
|
CAI_BaseNPC *npc = pOperator->MyNPCPointer();
|
||||||
|
|
||||||
Vector vecShootOrigin, vecShootDir;
|
Vector vecShootOrigin, vecShootDir;
|
||||||
vecShootOrigin = pOperator->Weapon_ShootPosition();
|
vecShootOrigin = pOperator->Weapon_ShootPosition();
|
||||||
vecShootDir = npc->GetShootEnemyDir( vecShootOrigin );
|
//vecShootDir = npc->GetShootEnemyDir( vecShootOrigin );
|
||||||
|
|
||||||
Vector vecThrow = m_vecTossVelocity;
|
//Checks if it can fire the grenade
|
||||||
|
WeaponRangeAttack2Condition();
|
||||||
|
|
||||||
CGrenadeAR2 *pGrenade = (CGrenadeAR2*)Create( "grenade_ar2", vecShootOrigin, vec3_angle, npc );
|
Vector vecThrow = m_vecTossVelocity;
|
||||||
pGrenade->SetAbsVelocity( vecThrow );
|
|
||||||
pGrenade->SetLocalAngularVelocity( QAngle( 0, 400, 0 ) );
|
|
||||||
pGrenade->SetMoveType( MOVETYPE_FLYGRAVITY );
|
|
||||||
pGrenade->m_hOwner = npc;
|
|
||||||
pGrenade->m_pMyWeaponAR2 = this;
|
|
||||||
pGrenade->SetDamage(sk_npc_dmg_ar2_grenade.GetFloat());
|
|
||||||
|
|
||||||
// FIXME: arrgg ,this is hard coded into the weapon???
|
//If on the rare case the vector is 0 0 0, cancel for avoid launching the grenade without speed
|
||||||
m_flNextGrenadeCheck = gpGlobals->curtime + 6;// wait six seconds before even looking again to see if a grenade can be thrown.
|
//This should be on WeaponRangeAttack2Condition(), but for some unknown reason return CASE_NONE
|
||||||
|
//doesn't stop the launch
|
||||||
|
if( vecThrow == Vector(0, 0, 0) )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
m_iClip2--;
|
CGrenadeAR2 *pGrenade = (CGrenadeAR2*)Create("grenade_ar2", vecShootOrigin, vec3_angle, npc);
|
||||||
|
pGrenade->SetAbsVelocity( vecThrow );
|
||||||
|
pGrenade->SetLocalAngularVelocity(RandomAngle(-400, 400)); //tumble in air
|
||||||
|
pGrenade->SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_BOUNCE );
|
||||||
|
|
||||||
|
pGrenade->SetThrower(GetOwner());
|
||||||
|
|
||||||
|
pGrenade->SetGravity(0.5); // lower gravity since grenade is aerodynamic and engine doesn't know it.
|
||||||
|
|
||||||
|
pGrenade->SetDamage( sk_plr_dmg_smg1_grenade.GetFloat() );
|
||||||
|
|
||||||
|
if( g_pGameRules->IsSkillLevel( SKILL_HARD ) )
|
||||||
|
{
|
||||||
|
m_flNextGrenadeCheck = gpGlobals->curtime + RandomFloat(2, 3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_flNextGrenadeCheck = gpGlobals->curtime + 6;// wait six seconds before even looking again to see if a grenade can be thrown.
|
||||||
|
}
|
||||||
|
|
||||||
|
m_iClip2--;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
*/
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BaseClass::Operator_HandleAnimEvent( pEvent, pOperator );
|
BaseClass::Operator_HandleAnimEvent( pEvent, pOperator );
|
||||||
@ -272,7 +290,7 @@ Activity CWeaponSMG1::GetPrimaryAttackActivity( void )
|
|||||||
|
|
||||||
if ( m_nShotsFired < 3 )
|
if ( m_nShotsFired < 3 )
|
||||||
return ACT_VM_RECOIL1;
|
return ACT_VM_RECOIL1;
|
||||||
|
|
||||||
if ( m_nShotsFired < 4 )
|
if ( m_nShotsFired < 4 )
|
||||||
return ACT_VM_RECOIL2;
|
return ACT_VM_RECOIL2;
|
||||||
|
|
||||||
@ -394,11 +412,11 @@ void CWeaponSMG1::SecondaryAttack( void )
|
|||||||
// flDist -
|
// flDist -
|
||||||
// Output : int
|
// Output : int
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int CWeaponSMG1::WeaponRangeAttack2Condition( float flDot, float flDist )
|
int CWeaponSMG1::WeaponRangeAttack2Condition(/* float flDot, float flDist */)
|
||||||
{
|
{
|
||||||
CAI_BaseNPC *npcOwner = GetOwner()->MyNPCPointer();
|
CAI_BaseNPC *npcOwner = GetOwner()->MyNPCPointer();
|
||||||
|
|
||||||
return COND_NONE;
|
// return COND_NONE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
|
@ -4191,8 +4191,7 @@ void CGameMovement::FinishUnDuckJump( trace_t &trace )
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CGameMovement::FinishDuck( void )
|
void CGameMovement::FinishDuck( void )
|
||||||
{
|
{
|
||||||
if ( player->GetFlags() & FL_DUCKING )
|
// if ( player->GetFlags() & FL_DUCKING ) return;
|
||||||
return;
|
|
||||||
|
|
||||||
player->AddFlag( FL_DUCKING );
|
player->AddFlag( FL_DUCKING );
|
||||||
player->m_Local.m_bDucked = true;
|
player->m_Local.m_bDucked = true;
|
||||||
|
@ -206,7 +206,7 @@ bool CHalfLife2::Damage_IsTimeBased( int iDmgType )
|
|||||||
// Damage types that are time-based.
|
// Damage types that are time-based.
|
||||||
#ifdef HL2_EPISODIC
|
#ifdef HL2_EPISODIC
|
||||||
// This makes me think EP2 should have its own rules, but they are #ifdef all over in here.
|
// This makes me think EP2 should have its own rules, but they are #ifdef all over in here.
|
||||||
return ( ( iDmgType & ( DMG_PARALYZE | DMG_NERVEGAS | DMG_POISON | DMG_RADIATION | DMG_DROWNRECOVER | DMG_SLOWBURN ) ) != 0 );
|
return ( ( iDmgType & ( DMG_PARALYZE | DMG_NERVEGAS | DMG_POISON | DMG_RADIATION | DMG_DROWNRECOVER | DMG_ACID | DMG_SLOWBURN ) ) != 0 );
|
||||||
#else
|
#else
|
||||||
return BaseClass::Damage_IsTimeBased( iDmgType );
|
return BaseClass::Damage_IsTimeBased( iDmgType );
|
||||||
#endif
|
#endif
|
||||||
|
@ -140,9 +140,9 @@ void CWeapon357::PrimaryAttack( void )
|
|||||||
angles.y += random->RandomInt( -1, 1 );
|
angles.y += random->RandomInt( -1, 1 );
|
||||||
angles.z = 0;
|
angles.z = 0;
|
||||||
|
|
||||||
#ifndef CLIENT_DLL
|
//#ifndef CLIENT_DLL
|
||||||
pPlayer->SnapEyeAngles( angles );
|
// pPlayer->SnapEyeAngles( angles );
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
pPlayer->ViewPunch( QAngle( -8, random->RandomFloat( -2, 2 ), 0 ) );
|
pPlayer->ViewPunch( QAngle( -8, random->RandomFloat( -2, 2 ), 0 ) );
|
||||||
|
|
||||||
|
@ -261,14 +261,41 @@ void CWeaponHL2MPBase::FallInit( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetPickupTouch();
|
SetPickupTouch();
|
||||||
|
|
||||||
SetThink( &CBaseCombatWeapon::FallThink );
|
SetThink( &CWeaponHL2MPBase::FallThink );
|
||||||
|
|
||||||
SetNextThink( gpGlobals->curtime + 0.1f );
|
SetNextThink( gpGlobals->curtime + 0.1f );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GAME_DLL
|
||||||
|
void CWeaponHL2MPBase::FallThink( void )
|
||||||
|
{
|
||||||
|
// Prevent the common HL2DM weapon respawn bug from happening
|
||||||
|
// When a weapon is spawned, the following chain of events occurs:
|
||||||
|
// - Spawn() is called (duh), which then calls FallInit()
|
||||||
|
// - FallInit() is called, and prepares the weapon's 'Think' function (CBaseCombatWeapon::FallThink())
|
||||||
|
// - FallThink() is called, and performs several checks before deciding whether the weapon should Materialize()
|
||||||
|
// - Materialize() is called (the HL2DM version above), which sets the weapon's respawn location.
|
||||||
|
// The problem occurs when a weapon isn't placed properly by a level designer.
|
||||||
|
// If the weapon is unable to move from its location (e.g. if its bounding box is halfway inside a wall), Materialize() never gets called.
|
||||||
|
// Since Materialize() never gets called, the weapon's respawn location is never set, so if a person picks it up, it respawns forever at
|
||||||
|
// 0 0 0 on the map (infinite loop of fall, wait, respawn, not nice at all for performance and bandwidth!)
|
||||||
|
|
||||||
|
if( HasSpawnFlags( SF_NORESPAWN ) == false )
|
||||||
|
{
|
||||||
|
if( GetOriginalSpawnOrigin() == vec3_origin )
|
||||||
|
{
|
||||||
|
m_vOriginalSpawnOrigin = GetAbsOrigin();
|
||||||
|
m_vOriginalSpawnAngles = GetAbsAngles();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return BaseClass::FallThink();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const CHL2MPSWeaponInfo &CWeaponHL2MPBase::GetHL2MPWpnData() const
|
const CHL2MPSWeaponInfo &CWeaponHL2MPBase::GetHL2MPWpnData() const
|
||||||
{
|
{
|
||||||
const FileWeaponInfo_t *pWeaponInfo = &GetWpnData();
|
const FileWeaponInfo_t *pWeaponInfo = &GetWpnData();
|
||||||
|
@ -40,11 +40,12 @@ public:
|
|||||||
|
|
||||||
#ifdef GAME_DLL
|
#ifdef GAME_DLL
|
||||||
DECLARE_DATADESC();
|
DECLARE_DATADESC();
|
||||||
|
|
||||||
void SendReloadSoundEvent( void );
|
void SendReloadSoundEvent( void );
|
||||||
|
|
||||||
void Materialize( void );
|
void Materialize( void );
|
||||||
virtual int ObjectCaps( void );
|
virtual int ObjectCaps( void );
|
||||||
|
virtual void FallThink( void );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// All predicted weapons need to implement and return true
|
// All predicted weapons need to implement and return true
|
||||||
|
@ -1248,7 +1248,7 @@ void CAPCMissile::ComputeActualDotPosition( CLaserDot *pLaserDot, Vector *pActua
|
|||||||
|
|
||||||
#define RPG_BEAM_SPRITE "effects/laser1.vmt"
|
#define RPG_BEAM_SPRITE "effects/laser1.vmt"
|
||||||
#define RPG_BEAM_SPRITE_NOZ "effects/laser1_noz.vmt"
|
#define RPG_BEAM_SPRITE_NOZ "effects/laser1_noz.vmt"
|
||||||
#define RPG_LASER_SPRITE "sprites/redglow1"
|
#define RPG_LASER_SPRITE "sprites/redglow1.vmt"
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// RPG
|
// RPG
|
||||||
|
@ -232,7 +232,7 @@ enum CastVote
|
|||||||
|
|
||||||
#define MAX_PLACE_NAME_LENGTH 18
|
#define MAX_PLACE_NAME_LENGTH 18
|
||||||
|
|
||||||
#define MAX_FOV 90
|
#define MAX_FOV 110
|
||||||
|
|
||||||
//===================================================================================================================
|
//===================================================================================================================
|
||||||
// Team Defines
|
// Team Defines
|
||||||
|
@ -448,6 +448,12 @@ public:
|
|||||||
{
|
{
|
||||||
pFOV->SetVisible( false );
|
pFOV->SetVisible( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pFOV = FindChildByName( "FovValueLabel" );
|
||||||
|
if ( pFOV )
|
||||||
|
{
|
||||||
|
pFOV->SetVisible( false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkDefaultSettingsAsRecommended();
|
MarkDefaultSettingsAsRecommended();
|
||||||
|
@ -5943,6 +5943,8 @@ const char *Studio_GetDefaultSurfaceProps( CStudioHdr *pstudiohdr )
|
|||||||
|
|
||||||
float Studio_GetMass( CStudioHdr *pstudiohdr )
|
float Studio_GetMass( CStudioHdr *pstudiohdr )
|
||||||
{
|
{
|
||||||
|
if( pstudiohdr == NULL ) return 0.f;
|
||||||
|
|
||||||
return pstudiohdr->mass();
|
return pstudiohdr->mass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user