-
Notifications
You must be signed in to change notification settings - Fork 81
Open
ValveSoftware/source-sdk-2013
#1713Labels
Description
While hud_medichealtargetmarker is set to 1, the game uses a separate particle system for the medibeam that adds an indicator over your current patient's head to make it more clear who you're currently healing. But the game only does this check when you aren't using an Ubercharge, instead defaulting to the standard Ubercharge particle system for your respective team.
This is the entire check done in tf_weapon_medigun.cpp (with added comments)
if ( IsAttachedToBuilding() ) //if healing a building
{
pszEffectName = "medicgun_beam_machinery"; //use machinery particle system (this never happens)
}
else if ( pFiringPlayer->GetTeamNumber() == TF_TEAM_RED ) //if not healing a building, then if the player is on the red team
{
if ( m_bChargeRelease ) //if using ubercharge
{
pszEffectName = "medicgun_beam_red_invun"; //use red uber particle system
}
else //if not using ubercharge
{
if ( bHealTargetMarker && pFiringPlayer == pLocalPlayer ) //if player has target marker setting enabled and is the local player
{
pszEffectName = "medicgun_beam_red_targeted"; //use red particle system with marker
}
else //if not
{
pszEffectName = "medicgun_beam_red"; //use ordinary red particle system
}
}
}
else //if player is not on the red team
{
if ( m_bChargeRelease ) //all the same checks as above, but for the blue particle systems instead
{
pszEffectName = "medicgun_beam_blue_invun";
}
else
{
if ( bHealTargetMarker && pFiringPlayer == pLocalPlayer )
{
pszEffectName = "medicgun_beam_blue_targeted";
}
else
{
pszEffectName = "medicgun_beam_blue";
}
}
}This results in the marker disappearing when an Ubercharge is deployed:
The fix for this would be to add those same checks to the if(m_bChargeRelease) branches and create new particle systems in medicgun_beam.pcf (and medicgun_beam_dx80.pcf) that include the target marker particle.

if ( IsAttachedToBuilding() )
{
pszEffectName = "medicgun_beam_machinery";
}
else if ( pFiringPlayer->GetTeamNumber() == TF_TEAM_RED )
{
if ( m_bChargeRelease )
{
if ( bHealTargetMarker && pFiringPlayer == pLocalPlayer )
{
pszEffectName = "medicgun_beam_red_invun_targeted";
}
else
{
pszEffectName = "medicgun_beam_red_invun";
}
}
else
{
if ( bHealTargetMarker && pFiringPlayer == pLocalPlayer )
{
pszEffectName = "medicgun_beam_red_targeted";
}
else
{
pszEffectName = "medicgun_beam_red";
}
}
}
else
{
if ( m_bChargeRelease )
{
if ( bHealTargetMarker && pFiringPlayer == pLocalPlayer )
{
pszEffectName = "medicgun_beam_blue_invun_targeted";
}
else
{
pszEffectName = "medicgun_beam_blue_invun";
}
}
else
{
if ( bHealTargetMarker && pFiringPlayer == pLocalPlayer )
{
pszEffectName = "medicgun_beam_blue_targeted";
}
else
{
pszEffectName = "medicgun_beam_blue";
}
}
}gaelcoral, Churkinator, AJMickey, RiverHornet3209, horiuchii and 1 more