Skip to content

Commit c9b01bc

Browse files
committed
armor changes
1 parent adc2f02 commit c9b01bc

File tree

12 files changed

+122
-32
lines changed

12 files changed

+122
-32
lines changed

game/quiver/info_changelog.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ Details:
8282
- Added "random" bot difficulty to the Offline Practice menu.
8383
- Increased the Offline Practice menu's player cap from 31 to 100.
8484
- Added Team Deathmatch to the Offline Practice menu.
85-
- Fixed Gunslinger being able to pause melee hit combos when holstering the weapon.
8685
- Reduced the reload penalty on the Shortstop from 50% to 25%.
8786
- Added a 25 max health increase to the Shortstop to mirror its original set.
8887
- Reverted the shield removal on the Wrangler, as it made the weapon less fun to use.
8988
- The Sandman's ball now breaks armor.
9089
- Set the Sniper's ammo count back from 16 to 25.
9190
- The Family Business is now a multi-class shotgun.
91+
- Added a visible team-colored shield as an indicator for armor.
9292
- Added the following Source SDK Pull Requests:
9393
- #1437: MvM: Fix Explosive Headshot working on invulnerable target
9494
- #1440: Treat being in background map as not in-game
@@ -100,6 +100,7 @@ Details:
100100
- #1452: Fix Vaccinator resist icons persisting when a player changes (displayed) team (Vaccinator is not whitelisted but this was added to keep the base up to date)
101101
- #1448: Fix point_camera transmit state in multiplayer
102102
- #1455: Reimplement "panic_attack" attribute
103+
- #1463: Fix Engineer melee swing storage/double swing exploit
103104
- Updated the following Source SDK Pull Requests:
104105
- #1192: Make it so Vita-Saw attacks on MvM robots spawn a bolt instead of a spleen (outside of Wave 666)
105106
- #1380: all games: Add support for animated avatars

game/quiver/info_highlights.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ Unlockable weapon balance changes:
8787
- Fixed Gunslinger being able to pause melee hit combos when holstering the weapon.
8888
- Reduced the reload penalty on the Shortstop from 50% to 25%.
8989
- Added a 25 max health increase to the Shortstop to mirror its original set.
90+
- The Sandman's ball now breaks armor.
91+
- The Family Business is now a multi-class shotgun.
9092

9193
MvM Changes:
9294
- Added armor-related upgrades to MvM (max armor, pierces damage resistances, and armor resistance).

game/quiver/scripts/bot_names.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,4 +389,6 @@
389389
"name" "300 kromer"
390390
"name" "BIG SHOT"
391391
"name" "100,000 kromer"
392+
//QF exclusive
393+
"name" "BringBackQuickplay"
392394
}

src/game/client/tf/c_tf_player.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5356,7 +5356,14 @@ void C_TFPlayer::UpdatedMarkedForDeathEffect( bool bForceStop )
53565356
if ( IsLocalPlayer() )
53575357
return;
53585358

5359+
#if defined(QUIVER_DLL)
5360+
bool bShow = m_Shared.InCond(TF_COND_MARKEDFORDEATH) ||
5361+
m_Shared.InCond(TF_COND_MARKEDFORDEATH_SILENT) ||
5362+
m_Shared.InCond(QF_COND_ARMORJUSTBROKE) ||
5363+
m_Shared.InCond(TF_COND_PASSTIME_PENALTY_DEBUFF);
5364+
#else
53595365
bool bShow = m_Shared.InCond( TF_COND_MARKEDFORDEATH ) || m_Shared.InCond( TF_COND_MARKEDFORDEATH_SILENT ) || m_Shared.InCond( TF_COND_PASSTIME_PENALTY_DEBUFF );
5366+
#endif
53605367

53615368
// force stop
53625369
if ( bForceStop || m_Shared.IsStealthed() || m_Shared.InCond( TF_COND_DISGUISED ) )
@@ -10467,6 +10474,13 @@ void C_TFPlayer::UpdateSpyStateChange( void )
1046710474
m_pTempShield->m_nSkin = ( m_Shared.GetDisplayedTeam() == TF_TEAM_RED ) ? 0 : 1;
1046810475
}
1046910476

10477+
#if defined(QUIVER_DLL)
10478+
if (m_pTempShield && m_Shared.InCond(QF_COND_ARMOR))
10479+
{
10480+
m_pTempShield->m_nSkin = (m_Shared.GetDisplayedTeam() == TF_TEAM_RED) ? 0 : 1;
10481+
}
10482+
#endif
10483+
1047010484
UpdateRuneIcon( true );
1047110485

1047210486
// Remove Speed lines if Stealthed

src/game/client/tf/tf_hud_playerstatus.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,9 @@ void CTFHudPlayerHealth::OnThink()
11721172
SetPlayerHealthImagePanelVisibility( pPlayer, TF_COND_MAD_MILK, m_pMilkImage, nXOffset, Color( color_fade, color_fade, color_fade, 255 ) );
11731173
SetPlayerHealthImagePanelVisibility( pPlayer, TF_COND_MARKEDFORDEATH, m_pMarkedForDeathImage, nXOffset, Color( 255 - color_fade, 245 - color_fade, 245 - color_fade, 255 ) );
11741174
SetPlayerHealthImagePanelVisibility( pPlayer, TF_COND_MARKEDFORDEATH_SILENT, m_pMarkedForDeathImageSilent, nXOffset, Color( 125 - color_fade, 255 - color_fade, 255 - color_fade, 255 ) );
1175+
#if defined(QUIVER_DLL)
1176+
SetPlayerHealthImagePanelVisibility( pPlayer, QF_COND_ARMORJUSTBROKE, m_pMarkedForDeathImage, nXOffset, Color(125 - color_fade, 255 - color_fade, 255 - color_fade, 255));
1177+
#endif
11751178
SetPlayerHealthImagePanelVisibility( pPlayer, TF_COND_PASSTIME_PENALTY_DEBUFF, m_pMarkedForDeathImageSilent, nXOffset, Color( 125 - color_fade, 255 - color_fade, 255 - color_fade, 255 ) );
11761179
SetPlayerHealthImagePanelVisibility( pPlayer, TF_COND_STUNNED, m_pSlowedImage, nXOffset, Color( color_fade, color_fade, 0, 255 ) );
11771180
SetPlayerHealthImagePanelVisibility( pPlayer, TF_COND_GAS, m_pGasImage, nXOffset, Color( color_fade, color_fade, color_fade, 255 ) );

src/game/server/tf/tf_player.cpp

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4071,6 +4071,8 @@ void CTFPlayer::Spawn()
40714071
SetRespawnOverride( -1.f, NULL_STRING );
40724072

40734073
#if defined(QUIVER_DLL)
4074+
SetMaxArmor();
4075+
40744076
if (TFGameRules() && ((TFGameRules()->IsInTDMMode() && qf_tdm_spawnprotection.GetBool()) || TFGameRules()->IsPowerupMode()))
40754077
{
40764078
m_Shared.AddCond(TF_COND_INVULNERABLE_USER_BUFF, (TFGameRules()->IsInTDMMode() ? qf_tdm_spawnprotection_length.GetFloat() : 8.f));
@@ -4329,6 +4331,9 @@ void CTFPlayer::Regenerate( bool bRefillHealthAndAmmo /*= true*/ )
43294331
m_bRegenerating.Set( true );
43304332
// This recomputes MaxHealth
43314333
InitClass();
4334+
#ifdef QUIVER_DLL
4335+
SetMaxArmor();
4336+
#endif
43324337
m_bRegenerating.Set( false );
43334338

43344339
if ( bBoosted )
@@ -4471,10 +4476,6 @@ void CTFPlayer::InitClass( void )
44714476
SetMaxHealth( GetMaxHealth() );
44724477
SetHealth( GetMaxHealth() );
44734478

4474-
#ifdef QUIVER_DLL
4475-
SetMaxArmor();
4476-
#endif
4477-
44784479
TeamFortress_SetSpeed();
44794480

44804481
}
@@ -9482,15 +9483,11 @@ void CTFPlayer::BreakArmor(const CTakeDamageInfo& info, CTFPlayer* pTFAttacker,
94829483

94839484
if (!(bitsDamage & (DMG_FALL)))
94849485
{
9485-
//someone damaged our armor? minicrit boost us for a few seconds so we have a chance to take down the asshole.
9486-
m_Shared.AddCond(TF_COND_MINICRITBOOSTED, 3.0f);
9487-
//mark us for death too...
9488-
m_Shared.AddCond(TF_COND_MARKEDFORDEATH_SILENT, 3.5f);
9489-
//heal 30 health over 3 seconds. doesn't transfer over to heal patient.
9490-
m_Shared.AddCond(QF_COND_ARMORJUSTBROKE, 3.0f);
9491-
m_Shared.AddCond(QF_COND_ARMORBROKEN, -1);
9492-
//note: we should use the mvm skins instead maybe?
9493-
m_Shared.OnRemoveMedEffectUberBulletResist();
9486+
float duration = 3.0f;
9487+
//marks us for death, mini crit boost, and heal 30 health over 3 seconds. doesn't transfer over to heal patient.
9488+
//heal patient gets the base conds.
9489+
m_Shared.AddCond(QF_COND_ARMORJUSTBROKE, duration);
9490+
m_Shared.RemoveCond(QF_COND_ARMOR);
94949491

94959492
//give our patient our mini-crit boost to help us.
94969493
if (IsPlayerClass(TF_CLASS_MEDIC))
@@ -9501,8 +9498,8 @@ void CTFPlayer::BreakArmor(const CTakeDamageInfo& info, CTFPlayer* pTFAttacker,
95019498
CTFPlayer* pPatient = ToTFPlayer(pHealTarget);
95029499
if (pPatient)
95039500
{
9504-
pPatient->m_Shared.AddCond(TF_COND_MINICRITBOOSTED, 3.0f);
9505-
pPatient->m_Shared.AddCond(TF_COND_MARKEDFORDEATH_SILENT, 3.5f);
9501+
pPatient->m_Shared.AddCond(TF_COND_MINICRITBOOSTED, duration);
9502+
pPatient->m_Shared.AddCond(TF_COND_MARKEDFORDEATH_SILENT, duration);
95069503
}
95079504
}
95089505
}
@@ -9657,10 +9654,8 @@ void CTFPlayer::IncrementArmorValue(int nCount, int nMaxValue)
96579654

96589655
if (ArmorValue() > oldArmor)
96599656
{
9660-
m_Shared.RemoveCond(QF_COND_ARMORBROKEN);
9657+
m_Shared.AddCond(QF_COND_ARMOR, -1);
96619658
m_Shared.RemoveCond(QF_COND_ARMORJUSTBROKE);
9662-
//note: we should use the mvm skins instead maybe?
9663-
m_Shared.OnAddMedEffectUberBulletResist();
96649659
}
96659660
}
96669661

@@ -9670,13 +9665,10 @@ void CTFPlayer::SetArmorValue(int value)
96709665

96719666
if (ArmorValue() > 0)
96729667
{
9673-
m_Shared.RemoveCond(QF_COND_ARMORBROKEN);
9668+
m_Shared.AddCond(QF_COND_ARMOR, -1);
96749669
m_Shared.RemoveCond(QF_COND_ARMORJUSTBROKE);
9675-
//note: we should use the mvm skins instead maybe?
9676-
m_Shared.OnAddMedEffectUberBulletResist();
96779670
}
96789671
}
9679-
96809672
#endif
96819673

96829674
//-----------------------------------------------------------------------------
@@ -11697,7 +11689,11 @@ int CTFPlayer::OnTakeDamage_Alive( const CTakeDamageInfo &info )
1169711689
}
1169811690

1169911691
m_flLastDamageTime = gpGlobals->curtime; // not networked
11692+
#if defined(QUIVER_DLL)
11693+
if ( ArmorValue() > 0 || TFGameRules()->IsMannVsMachineMode() )
11694+
#else
1170011695
if ( TFGameRules()->IsMannVsMachineMode() )
11696+
#endif
1170111697
{
1170211698
// We only need damage time networked while in MvM
1170311699
m_flMvMLastDamageTime = gpGlobals->curtime;

src/game/server/vscript_server.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,6 +3248,10 @@ DECLARE_SCRIPT_CONST( ETFCond, TF_COND_HALLOWEEN_HELL_HEAL )
32483248
DECLARE_SCRIPT_CONST( ETFCond, TF_COND_POWERUPMODE_DOMINANT )
32493249
DECLARE_SCRIPT_CONST( ETFCond, TF_COND_IMMUNE_TO_PUSHBACK )
32503250
DECLARE_SCRIPT_CONST( ETFCond, TF_COND_MINICRITBOOSTED )
3251+
#if defined(QUIVER_DLL)
3252+
DECLARE_SCRIPT_CONST(ETFCond, QF_COND_ARMORJUSTBROKE)
3253+
DECLARE_SCRIPT_CONST(ETFCond, QF_COND_ARMOR)
3254+
#endif
32513255
REGISTER_SCRIPT_CONST_TABLE( ETFCond )
32523256

32533257
DECLARE_SCRIPT_CONST_TABLE( ECritType )

src/game/shared/tf/tf_gamerules.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6305,13 +6305,20 @@ bool CTFGameRules::ApplyOnDamageModifyRules( CTakeDamageInfo &info, CBaseEntity
63056305
if ( pVictim && ( pVictim->m_Shared.InCond( TF_COND_URINE ) ||
63066306
pVictim->m_Shared.InCond( TF_COND_MARKEDFORDEATH ) ||
63076307
pVictim->m_Shared.InCond( TF_COND_MARKEDFORDEATH_SILENT ) ||
6308+
#if defined(QUIVER_DLL)
6309+
pVictim->m_Shared.InCond(QF_COND_ARMORJUSTBROKE) ||
6310+
#endif
63086311
pVictim->m_Shared.InCond( TF_COND_PASSTIME_PENALTY_DEBUFF ) ) )
63096312
{
63106313
bAllSeeCrit = true;
63116314
info.SetCritType( CTakeDamageInfo::CRIT_MINI );
63126315
eBonusEffect = kBonusEffect_MiniCrit;
63136316

6317+
#if defined(QUIVER_DLL)
6318+
if ( !pVictim->m_Shared.InCond( QF_COND_ARMORJUSTBROKE ) && !pVictim->m_Shared.InCond( TF_COND_MARKEDFORDEATH_SILENT ) )
6319+
#else
63146320
if ( !pVictim->m_Shared.InCond( TF_COND_MARKEDFORDEATH_SILENT ) )
6321+
#endif
63156322
{
63166323
eDamageBonusCond = pVictim->m_Shared.InCond( TF_COND_URINE ) ? TF_COND_URINE : TF_COND_MARKEDFORDEATH;
63176324
}
@@ -6323,6 +6330,14 @@ bool CTFGameRules::ApplyOnDamageModifyRules( CTakeDamageInfo &info, CBaseEntity
63236330
eBonusEffect = kBonusEffect_MiniCrit;
63246331
eDamageBonusCond = TF_COND_MINICRITBOOSTED;
63256332
}
6333+
#if defined(QUIVER_DLL)
6334+
else if (pTFAttacker && (pTFAttacker->m_Shared.InCond(QF_COND_ARMORJUSTBROKE)))
6335+
{
6336+
info.SetCritType(CTakeDamageInfo::CRIT_MINI);
6337+
eBonusEffect = kBonusEffect_MiniCrit;
6338+
eDamageBonusCond = QF_COND_ARMORJUSTBROKE;
6339+
}
6340+
#endif
63266341
#endif
63276342
else if ( pTFAttacker && ( pTFAttacker->m_Shared.InCond( TF_COND_OFFENSEBUFF ) || pTFAttacker->m_Shared.InCond( TF_COND_NOHEALINGDAMAGEBUFF ) ) )
63286343
{

src/game/shared/tf/tf_player_shared.cpp

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,6 +1927,19 @@ void CTFPlayerShared::OnConditionAdded( ETFCond eCond )
19271927
OnAddHalloweenHellHeal();
19281928
break;
19291929

1930+
#if defined(QUIVER_DLL)
1931+
case QF_COND_ARMOR:
1932+
OnAddArmor();
1933+
break;
1934+
1935+
// this one is wierd because it does 3 things at once. 2 of the functions go here.
1936+
case QF_COND_ARMORJUSTBROKE:
1937+
{
1938+
OnAddCritBoost();
1939+
OnAddMarkedForDeathSilent();
1940+
break;
1941+
}
1942+
#endif
19301943

19311944
default:
19321945
break;
@@ -2274,6 +2287,19 @@ void CTFPlayerShared::OnConditionRemoved( ETFCond eCond )
22742287
OnRemoveHalloweenHellHeal();
22752288
break;
22762289

2290+
#if defined(QUIVER_DLL)
2291+
case QF_COND_ARMOR:
2292+
OnRemoveArmor();
2293+
break;
2294+
2295+
// this one is wierd because it does 3 things at once. 2 of the functions go here.
2296+
case QF_COND_ARMORJUSTBROKE:
2297+
{
2298+
OnRemoveCritBoost();
2299+
OnRemoveMarkedForDeathSilent();
2300+
break;
2301+
}
2302+
#endif
22772303

22782304
default:
22792305
break;
@@ -4993,7 +5019,11 @@ static int GetResistShieldSkinForResistType( ETFCond eCond )
49935019
//-----------------------------------------------------------------------------
49945020
static void AddResistShield( C_LocalTempEntity** pShield, CTFPlayer* pPlayer, ETFCond eCond )
49955021
{
5022+
#if defined(QUIVER_DLL)
5023+
if (eCond != QF_COND_ARMOR && CBasePlayer::GetLocalPlayer() == pPlayer)
5024+
#else
49965025
if( CBasePlayer::GetLocalPlayer() == pPlayer )
5026+
#endif
49975027
return;
49985028

49995029
// do not add if stealthed
@@ -5241,14 +5271,20 @@ void CTFPlayerShared::OnRemoveRuneResist( void )
52415271
}
52425272

52435273
#if defined(QUIVER_DLL)
5274+
//-----------------------------------------------------------------------------
5275+
// Purpose:
5276+
//-----------------------------------------------------------------------------
52445277
void CTFPlayerShared::OnAddArmor(void)
52455278
{
52465279
#ifdef CLIENT_DLL
52475280
// Do use the condition bit here, it's passed along and is expected to be a cond.
5248-
AddResistShield(&m_pOuter->m_pTempShield, m_pOuter, TF_COND_INVALID);
5281+
AddResistShield(&m_pOuter->m_pTempShield, m_pOuter, QF_COND_ARMOR);
52495282
#endif
52505283
}
52515284

5285+
//-----------------------------------------------------------------------------
5286+
// Purpose:
5287+
//-----------------------------------------------------------------------------
52525288
void CTFPlayerShared::OnRemoveArmor(void)
52535289
{
52545290
#ifdef CLIENT_DLL
@@ -7193,6 +7229,13 @@ void CTFPlayerShared::OnAddStealthed( void )
71937229
{
71947230
RemoveResistShield( &m_pOuter->m_pTempShield, m_pOuter );
71957231
}
7232+
7233+
#if defined(QUIVER_DLL)
7234+
if (m_pOuter->m_pTempShield && InCond(QF_COND_ARMOR))
7235+
{
7236+
OnRemoveArmor();
7237+
}
7238+
#endif
71967239
#endif
71977240

71987241
bool bSetInvisChangeTime = true;
@@ -7302,6 +7345,13 @@ void CTFPlayerShared::OnRemoveStealthed( void )
73027345
{
73037346
AddResistShield( &m_pOuter->m_pTempShield, m_pOuter, TF_COND_RUNE_RESIST );
73047347
}
7348+
7349+
#if defined(QUIVER_DLL)
7350+
if (!m_pOuter->m_pTempShield && InCond(QF_COND_ARMOR))
7351+
{
7352+
OnAddArmor();
7353+
}
7354+
#endif
73057355
#else
73067356
if ( m_flCloakStartTime > 0 )
73077357
{
@@ -7724,6 +7774,9 @@ void CTFPlayerShared::UpdateCritBoostEffect( ECritBoostUpdateType eUpdateType )
77247774
//|| IsHypeBuffed()
77257775
#ifdef BDSBASE
77267776
|| InCond(TF_COND_SNIPERCHARGE_RAGE_BUFF)
7777+
#if defined(QUIVER_DLL)
7778+
|| InCond(QF_COND_ARMORJUSTBROKE)
7779+
#endif
77277780
|| InCond(TF_COND_MINICRITBOOSTED);
77287781
#else
77297782
|| InCond(TF_COND_SNIPERCHARGE_RAGE_BUFF);

src/game/shared/tf/tf_player_shared.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,6 @@ class CTFPlayerShared : public CGameEventListener
336336

337337
bool ShouldSuppressPrediction( void );
338338

339-
#if defined(QUIVER_DLL)
340-
void OnAddArmor(void);
341-
void OnRemoveArmor(void);
342-
#endif
343-
344339
void SetCarryingRuneType( RuneTypes_t rt );
345340
RuneTypes_t GetCarryingRuneType( void ) const;
346341
bool IsCarryingRune( void ) const { return GetCarryingRuneType() != RUNE_NONE; }
@@ -923,6 +918,11 @@ class CTFPlayerShared : public CGameEventListener
923918
void OnAddHalloweenHellHeal( void );
924919
void OnRemoveHalloweenHellHeal( void );
925920

921+
#if defined(QUIVER_DLL)
922+
void OnAddArmor(void);
923+
void OnRemoveArmor(void);
924+
#endif
925+
926926
float GetCritMult( void );
927927

928928
#ifdef GAME_DLL

0 commit comments

Comments
 (0)