Repository navigation
The last round of a clip deals its damage: the Marksman's sniper hits again - #36
Merged
Merged
Conversation
… again Emptying the clip sets primary_fire back to 0 (WeaponInput.c, Player.c), and the hit of that round, read after it, was refused as not_firing. The sniper holds one round, so every one of its shots was refused; the other guns lost the last round of every clip. A hit with an empty clip whose round is still in the gun's interval (the empty_clip check before it already tells them apart) now counts as fired. weapon_pellets still allows one hit a round.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A Marksman's sniper dealt no damage to players (reported on KotH, Villages_1024, but it happens in every mode where classes play).
Emptying the clip sets
primary_fireback to 0 (WeaponInput.c,Player.c). The hit of that same round is read after it, andallow_shotrefused it asnot_firing. The sniper holds one round (BattleSpades' table: clip 1, reserve 7), so every shot was a last round and all were refused. The other guns lost the last round of every clip.Fix
game_player_hitalready tells a last round still in the gun's interval apart from a real empty clip (theempty_clipcheck). Such a hit now counts as fired, inallow_shotand in_hit_refusal.weapon_pelletsstill allows one hit a round.Tested
client/tools/sptest/scripts/sniper_retail.txt(KotH,--classes, Creative_Flat,--bots-test): before,hit_refused why=not_firing; after,damage from=p1 amount=72(50 scaled by the bot class's 70 hp).shot_damage.txt+shot_damage.py(classic rifle, 60 shots): 18 on a player, 14 damaged, 4spawn_protect, 0 lost.make test: proto10 6331 checks passed, ext075 passed, configs OK.--bots-testbot spawns behind blocks and the friendly helicopter, so no shot reached it with either server.