Skip to content

[TF2] Make it so the Vita-Saw attacks on MVM robots spawn a bolt instead of a spleen #1192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 11 additions & 1 deletion src/game/server/tf/tf_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2774,6 +2774,8 @@ void CTFPlayer::PrecacheMvM()
PrecacheModel( "models/items/currencypack_large.mdl" );

PrecacheModel( "models/bots/tw2/boss_bot/twcarrier_addon.mdl" );

PrecacheModel( "models/player/gibs/gibs_bolt.mdl" );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation should be changed to tabs to match rest of file


PrecacheParticleSystem( "bot_impact_light" );
PrecacheParticleSystem( "bot_impact_heavy" );
Expand Down Expand Up @@ -9112,7 +9114,15 @@ int CTFPlayer::OnTakeDamage( const CTakeDamageInfo &inputInfo )
pRandomInternalOrgan->KeyValue( "origin", buf );
Q_snprintf( buf, sizeof( buf ), "%.10f %.10f %.10f", GetAbsAngles().x, GetAbsAngles().y, GetAbsAngles().z );
pRandomInternalOrgan->KeyValue( "angles", buf );
pRandomInternalOrgan->KeyValue( "model", "models/player/gibs/random_organ.mdl" );
if (TFGameRules()->IsMannVsMachineMode() && GetTeamNumber() == TF_TEAM_PVE_INVADERS && BloodColor() == DONT_BLEED)
{
//robots don't have spleens....
pRandomInternalOrgan->KeyValue( "model", "models/player/gibs/gibs_bolt.mdl" );
}
else
{
pRandomInternalOrgan->KeyValue( "model", "models/player/gibs/random_organ.mdl" );
}
pRandomInternalOrgan->KeyValue( "fademindist", "-1" );
pRandomInternalOrgan->KeyValue( "fademaxdist", "0" );
pRandomInternalOrgan->KeyValue( "fadescale", "1" );
Expand Down