Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sp/src/game/server/baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,9 @@ class CBaseEntity : public IServerEntity

// Computes the tracer start position
void ComputeTracerStartPosition( const Vector &vecShotSrc, Vector *pVecTracerStart );
#ifdef EZ2
virtual void OverrideTracerStartPosition( const Vector &vecShotSrc, Vector *pVecTracerStart ) {}
#endif

// Computes the tracer start position
void CreateBubbleTrailTracer( const Vector &vecShotSrc, const Vector &vecShotEnd, const Vector &vecShotDir );
Expand Down
14 changes: 14 additions & 0 deletions sp/src/game/server/ez2/ez2_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1993,6 +1993,20 @@ void CEZ2_Player::Weapon_HandleEquip( CBaseCombatWeapon *pWeapon )
}
}

//-----------------------------------------------------------------------------
// Purpose: Overrides bullet tracers
//-----------------------------------------------------------------------------
void CEZ2_Player::OverrideTracerStartPosition( const Vector &vecShotSrc, Vector *pVecTracerStart )
{
// TODO: Identify when doing dual wield secondary attack
/*if ()
{
Vector right;
EyeVectors( NULL, &right, NULL );
*pVecTracerStart -= right * 4;
}*/
}

//-----------------------------------------------------------------------------
// Purpose: Event fired upon picking up a new weapon
//-----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions sp/src/game/server/ez2/ez2_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class CEZ2_Player : public CAI_ExpresserHost<CHL2_Player>, public CGameEventList
bool HandleRemoveFromPlayerSquad( CAI_BaseNPC *pNPC );

void Weapon_HandleEquip( CBaseCombatWeapon *pWeapon );
void OverrideTracerStartPosition( const Vector &vecShotSrc, Vector *pVecTracerStart );

void Event_FirstDrawWeapon( CBaseCombatWeapon *pWeapon );
void Event_ThrewGrenade( CBaseCombatWeapon *pWeapon );
Expand Down
5 changes: 5 additions & 0 deletions sp/src/game/shared/baseentity_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,11 @@ void CBaseEntity::ComputeTracerStartPosition( const Vector &vecShotSrc, Vector *
}
}
}

#if defined(EZ2) && defined(GAME_DLL)
// For dual wielded weapons
OverrideTracerStartPosition( vecShotSrc, pVecTracerStart );
#endif
}


Expand Down
Loading