tf2-patches
tf2-patches copied to clipboard
[MVM] Vaccinator Bubble Bugs
The Vaccinator suffers from 2 notable bugs in MVM. The first is that reviving a player will sometimes cost 2 bubbles instead of the intended one bubble. This is is very inconsistent, and most likely a bug. The second one is that Ubercharge duration has 0 effect on the Vaccinator's bubble charges. Even holding down all 4 charges has no effect on the duration.
Checklist
- [x] None of the open or closed issues document this problem.
- [x] This is a bug, not a new idea.
- [x] This is objectively a bug, and not something that people commonly disagree on.
- [x] This bug is in the code of the game, not in the textures, sounds, or other resources.
- [x] This issue occurs on the latest vanilla TF2 update.
- [x] This issue is listed on the Source 1 official bugtracker.
- [ ] This issue occurs with DirectX level 100.
- [x] This issue occurs on the latest Team Comtress release, or the
masterbranch. - [x] This issue occurs when using no custom content.
- [x] This issue occurs when using
start_tf2.bat(orstart_server.bat) with no custom launch options. - [x] This issue occurs when using a listen server (using the
mapcommand ingame). - [x] This issue occurs when using a dedicated server.
- [ ] This bug is in the internal procedures or tooling (e.g. the build process).
Reproduction
1a. Buy max uber duration 2.a Attempt to use it 1b. Have allied player die 2b. Revive them with 2 bubbles
Had a look into the first bug you mentioned and I believe it's tied to line 1933 in the file "game\shared\tf\tf_weapon_medigun.cpp" as follows:
pReviveMarker->AddMarkerHealth( pReviveMarker->GetMaxHealth() * 0.9f );
The bug itself is caused by the vacinators charge restoring 90% of the reanimators health, which can result in the player using 2 ubercharges instead of 1 if the reanimator is under 10% health on ubercharge use and the player is still holding down the attack2 bind. As far as I'm aware there are 2 ways of potentially fixing this:
- change 0.9f to 1.0f - this would make the revive instant instead of restoring 90%, although this could be considered a balance change (barely noticable but becomes more noticable on repeated revives of the same player).
- include a check or interval - preventing a second ubercharge from being used on the reanimator from the same vaccinator could also solve this issue without causing an indirect balance change. (I'm not exactly sure how this could be done myself just throwing the idea out there)
As for the second bug, after some research I think that the vaccinator doesn't actually Ubercharge in the traditional sense, but rather removes 25% of the charge then applies the necessary conditions to the medic and patient. As such the duration of each charge on the vaccinator is a set value and isn't tied to the ubercharge code, and while ubercharge duration technically does apply successfully to the vaccinator itself it has no effect due to reasons explained above. I came to this conclusion based on my findings in "game\shared\tf\tf_weapon_medigun.cpp", specifically at line 1912 to 1915 as follows:
// Remove charge immediately and just give target and yourself the conditions
m_bChargeRelease = false;
#ifdef GAME_DLL
int iResistDuration = 3.0f;
I am unsure of any way of fixing this without creating an entirely new attribute and upgrade specifically to be used on the vaccinator in mvm. However another solution is to make the upgrade unobtainable to the client through modification of the "\game\shared\tf\tf_gamerules.cpp" file at lines 21182 to 21191 to exclude the vaccinator.