Skip to content

Commit 367fc79

Browse files
committed
quiver: allow spies to fake a reload when disguised
1 parent 10004ef commit 367fc79

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

game/quiver/info_changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Added the following Source SDK Pull Requests:
4444
- #1473: Fix Diamondback getting revenge crits from earlier kills when switched onto
4545
- #1475: Add convar to allow taking damage in itemtest
4646
- #1476: Add convars for server owners to hide the freezepanel showing held item
47+
- #1480: Fixed Widowmaker not giving metal on friendly disguises
48+
- #1481: Workaround for CTFStatPanel not hiding on freezecam screenshot
4749

4850
Details:
4951
- Fixed a bug where the mini-crit damage effect doesn't show up when your shield breaks.
@@ -85,6 +87,7 @@ Details:
8587
- Made it so the Vita-Saw saves up to 20% ÜberCharge after death, instead of using the organ mechanic.
8688
- Added the Überrüstungsheiler, a new Medigun for the Medic that heals armor on top of health. Its ÜberCharge fully repairs armor and makes it unbreakable.
8789
- Added a 20% cloak duration penalty to the Conniver's Kunai.
90+
- Spies can now "fake" a reload by disguising and pressing the reload key with a full clip in their revolver.
8891

8992
Quiver Private Alpha 1.1.0:
9093
Whitelists:

game/quiver/info_highlights.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Class changes:
2222
- Armor has been added as an additional layer of damage resistance. How strong it is depends on the class. Armor can also be penetrated by backstabs, taunt kills, and headshots, and won't protect against bleed damage. Armor can be repaired by Dispensers, resupply cabinets, or by friendly Engineers hitting you with their wrench. Armor can also be picked up from Ammo crates.
2323
- If your Armor breaks, you'll be given mini-crits for 3 seconds to give you a chance to kill the responsible party. Medics with broken armor healing a teammate will share the mini crit bonus with their healing target. This bonus does NOT apply if your armor was broken through fall damage or self damage. When the bonus applies, you'll also be marked for death for 3.5 seconds. In addition, the game will slightly heal you 10 health per second over 3 seconds (up to 30 health), giving players a small health bonus for hiding in cover during the aftermath of their shield breaking, and rewarding enemies who choose to attack quickly with a faster time to kill. The healing effect doesn't transfer over to your heal patient.
2424
- Spies who are cloaked will not show the armor break effect when cloaked, but the sound will still play.
25+
- Spies can now "fake" a reload by disguising and pressing the reload key with a full clip.
2526

2627
Custom Weapons:
2728
- All Demoknight swords and shields have been truncated into the Charge Shield and the Sword.
626 Bytes
Binary file not shown.

src/game/shared/tf/tf_weaponbase.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,6 +2555,31 @@ void CTFWeaponBase::ItemPostFrame( void )
25552555

25562556
bool bNeedsReload = NeedsReloadForAmmo1( GetMaxClip1() ) || ( IsEnergyWeapon() && !Energy_FullyCharged() );
25572557

2558+
#if defined(QUIVER_DLL)
2559+
if (pOwner->m_Shared.InCond(TF_COND_DISGUISED) && !bNeedsReload && (pOwner->m_nButtons & IN_RELOAD))
2560+
{
2561+
//if we press the reload key, fake a reload in third person.
2562+
// Play the player's reload animation
2563+
pOwner->DoAnimationEvent(PLAYERANIMEVENT_RELOAD);
2564+
2565+
float flReloadTime;
2566+
// First, see if we have a reload animation
2567+
if (SendWeaponAnim(ACT_VM_RELOAD))
2568+
{
2569+
// We consider the reload finished 0.2 sec before the anim is, so that players don't keep accidentally aborting their reloads
2570+
flReloadTime = SequenceDuration() - 0.2;
2571+
}
2572+
else
2573+
{
2574+
// No reload animation. Use the script time.
2575+
flReloadTime = GetTFWpnData().m_WeaponData[TF_WEAPON_PRIMARY_MODE].m_flTimeReload;
2576+
}
2577+
2578+
SetReloadTimer(flReloadTime);
2579+
return;
2580+
}
2581+
#endif
2582+
25582583
// If we're not shooting, and we want to autoreload, press our reload key
25592584
if ( !AutoFiresFullClip() && pOwner->ShouldAutoReload() && UsesClipsForAmmo1() && !(pOwner->m_nButtons & (IN_ATTACK|IN_ATTACK2)) && bNeedsReload )
25602585
{

0 commit comments

Comments
 (0)