= Mentlegen, for his original plugin that was used as a base. Even though he disappeared from Alliedmodders. :( =
= codename-G-, for their Fake Death plugin, created before the Dead Ringer was a thing, in which I took parts of the corpse creation code. =
= nosoop, for solving the death notice crisis before version 1.2.0 whilst I stood by the sidelines, not being much help. Thanks, and sorry for not crediting you sooner, I completely forgot about your aid. =
-= Description =-
An All-Class Dead Ringer for TF2. This was mainly an experiment, so expect bugs.
Upon activation, a fake corpse + ammo pack + weapon is dropped, and the scoreboard and top-of-screen reporter's status for it's user will report them as 'dead' for as long as the cloak is active.
-= Features =-
- Fake corpse + fake ammo pack + weapon drop as well as fake death sounds.
- 3 seconds speed boost + afterburn immunity. (toggleable and controllable)
- Fake 'final hit' hitsounds.
- Recharge and cloak timers.
- Right-mouse click to drop cloak.
-= To-do =-
- Actual energy system that can be replenished by ammo.
- Proper fix for sideways corpse spawn that occurs while disguised. For now, the spy may appear with Uber for a split second.
- [TODO BUG-FIX] Proper fix for Heavies to stop revving/shooting their minigun and Snipers to unscope from their sniper, once cloaked.
- [TODO BUG-FIX] Fix healing condition still staying on a healed patient that uses AC-DR. Will essentially give them regen and %150 of hp.
-= ConVars =-
sm_ac_dr_recharge_timelimit [0.0/ANY] = Set the time limit until the AC-DR fully recharges. sm_ac_dr_cloak_timelimit [0.0/ANY] = Set the time limit the AC-DR cloaks the user for. sm_ac_dr_speedboost [0.0/ANY] = Time of speed-boost upon AC-DR usage. 0.0 = disable. sm_ac_dr_weapon_time [0.0/ANY] = Time until weapons can be used again upon AC-DR uncloaking. 0.0 = disable. sm_ac_dr_afterburn_immune [0/ANY] = Time of afterburn-immunity upon AC-DR usage. 0.0 = disable. sm_ac_dr_friendlydis [0/1] = Makes Spies drop the corpse of the friendly disguise instead of themselves. sm_ac_dr_classrestrict_spy [0/1] = Restrict Spies from using the AC-DR. sm_ac_dr_extra_effects [0/7] = Recreate other effects that the normal DR couldn't. (BITFLAGS) 1 = Attacker benefits. | 2 = Ammopack gives ammo. | 4 = Engineer buildings fake explode and killfeed. sm_ac_dr_bots [0/3] = Toggle bot behavior with AC-DR. (BITFLAGS) 1 = Enable on spawn. | 2 = Enable when available after recharging. sm_ac_dr_damage_res_max [0/ANY] = Damage is multiplied by this value for cloaked AC-DR users with HIGH charge. Do <0.9 for lesser damage. sm_ac_dr_damage_res_min [0/ANY] = Damage is multiplied by this value for cloaked AC-DR users with LOW charge. Do <0.9 for lesser damage. sm_ac_dr_teams [0/15] = Choose AC-DR availability for teams. Mainly for MVM. (BITFLAGS) 1 = Team RED can use. | 2 = Team BLUE can use. | 4 = Set team restrict for MVM. | 8 = Set team restrict for all other gamemodes.
sm_fd = Toggle the All-Class Dead Ringer. sm_fd_ply = Toggle the All-Class Dead Ringer on a specified player. (Admin-only)
TF2_AC_DR.cfg will be generated into cfg/sourcemod for you to control these CVars.
-= Further Info =-
- This triggers the actual Dead Ringer's fake death mechanic, adding a bit more to feign death better. (Death state on top-of-screen reporter, unfinished fix for corpse spawning sideways if spy is disguised, etc.)
- The fix for the sideways fake corpse will result in the spy blinking into uber for a split-second before cloaking.
-= Releases =-
Spoiler
Code:
Version 1.2.8
- Converted sm_ac_dr_extra_effects to BITFLAG ConVar.
* 1 = Attacker benefits. | 2 = Ammopack gives ammo. | 4 = Carried buildings fake explode and killfeed.
- Fixed player_hurt damage numbers not showing up if sm_ac_dr_damage_res_max is 0.
- player_hurt damage numbers no longer show reduced damage, but the damage they will have taken normally without resistances.
- [Version 1.2.8b] Timer function fixes for entities.
- [Version 1.2.8c] Optimized some checks.
- [Version 1.2.8c] Fixed issue with Spy death sounds playing for distant players instead of the appropriate class death sounds.
- [Version 1.2.8d] Hotfix for latest TF2 update changing m_iDisguise variables to m_hDisguise.
Version 1.2.7
- Fixed Uber skin millisecond glitch when feigning with an enemy disguise or sm_ac_dr_friendlydis 0.
- Bots no longer toggle their AC-DR when sm_ac_dr_teams does not allow them.
- [Version 1.2.7b] Fixed additional player_hurt damage numbers (additional 5 damage) from showing up.
Version 1.2.6
- Added sm_ac_dr_teams, used to control which teams can use the AC-DR. Also controls if this restriction should be applied to MVM or non-MVM.
- You can now right-mouse click to drop cloak.
- Fixed issue with Spy class being shown on top-of-screen reporter instead of actual class.
- [Version 1.2.6b] Fixed issue with damage resistance instant-killing instead of reducing.
Version 1.2.5
- Added Big Earner, Golden Wrench, Golden Pan, and Saxxy effects for sm_ac_dr_extra_effects.
- Spies now disguise with Your Eternal Reward or the Wanga Prick if they backstab and trigger AC-DR and the victim does not die.
- Added sm_ac_dr_weapon_time, controls how long you cannot use any of your weapons after uncloaking.
- Replaced sm_ac_dr_botspawn_toggle with sm_ac_dr_bots, a bitflag ConVar.
* 1 - Enable on spawn.
* 2 - Enable when available after recharging.
- Hacky method used to test if damage is not negated by effects like Scout's Bonk!.
- Attempt to fix Heavy's revving minigun and Sniper's scope still used upon feigning.
- Fixed head gibs from decapitations not spawning on feign death.
Version 1.2.4
- Fixed death ragdoll disappearing when damage is enough to bypass AC-DR activation.
Version 1.2.3
- Fixed spy death screams when damage is enough to bypass AC-DR activation.
Version 1.2.2
- Health pack drop from candy cane no longer uses damage force for velocity which causes it to go flying.
Now simulates actual velocity behavior of actual kills from candy canes.
- Optimized a function for getting a weapon's type.
- Optimized CVars.
- sm_ac_dr_speedboost and sm_ac_dr_afterburn_immune now accept floats instead of bools. You can now control the time limit these boosts last for.
Version 1.2.1
- Fixed issue with disguise weapon being dropped on enemy disguises.
- Optimized char strings.
Version 1.2.0
- Now with 100% less signatures and extensions!
Version 1.1.2
- Fixed issue where changing classes whilst having the AC-DR active/recharging would still cause the AC-DR to be considered active/recharging.
Version 1.1.1
- Further fix of health-pack drop from Candy Cane.
Version 1.1.0
- No more unreliable, glitchy timers for all clients! Uses a think hook on seperate clients instead.
- Tweaked/added a few features to sm_ac_dr_extra_effects.
Version 1.0.8
- Fake ragdoll now takes up a slot of an actual player's death ragdoll.
- Added experimental code for adding the TF_DEATHFLAG_DEADRINGER bitflag to the fake player_death event.
Version 1.0.7
- Added sm_ac_dr_extra_effects, sm_ac_dr_botspawn_toggle and sm_ac_dr_damage_res. (CVARs are W.I.P!)
- Fixed ragdolls of friendly disguises using the spy's actual cosmetics instead of the disguise's own ones if sm_ac_dr_friendlydis is enabled.
- Plugin will now load or auto-generate a TF2_AC_DR.cfg file for cvars in cfg/sourcemod.
Version 1.0.4
- Fixed spy's cloak from watches not dropping for the Halloween cloak to properly take effect upon activation.
Version 1.0.3
- Will now play the final hitsound on the attacking player.
Version 1.0.2
- sm_fd_ply should now use the actual target names 100% of the time instead of reusing the argument string.
Version 1.0.1
- Feigning death while disguised as a friendly will now use the disguised target's name instead of the real spy, if sm_ac_dr_friendlydis is in effect.
Version 1.0.0
- Initial release.
Shadowysn
02-11-2020 05:22
Re: [TF2] All-Class Dead Ringer
The damn forum secretly switched the compiler to 1.1 while I had initially set it up to 1.8.
Shadowysn
07-02-2021 10:13
Re: [TF2] All-Class Dead Ringer
Updated to Version 1.2.0, new code has no more need for an extension and gamedata.