Skip to content

Commit

Permalink
fix shotgun damage recording
Browse files Browse the repository at this point in the history
  • Loading branch information
sauerbraten committed Dec 4, 2020
1 parent 6cadd92 commit af883ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion patches/scoreboard.patch
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ Index: src/fpsgame/weaponstats.cpp
+ if(!shouldcountdamage(attacker, target)) return;
+ int gun = attacker->gunselect;
+ // try to fix gun used to deal the damage
+ if(gun == GUN_RL || gun == GUN_GL || damage != guns[gun].damage * (attacker->quadmillis ? 4 : 1))
+ if((gun != GUN_SG && damage != guns[gun].damage * (attacker->quadmillis ? 4 : 1)) || (gun == GUN_SG && damage%(attacker->quadmillis ? 40 : 10) != 0))
+ {
+ gun = attacker->stats.lastprojectile;
+ }
Expand Down
2 changes: 1 addition & 1 deletion src/fpsgame/weaponstats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace game {
if(!shouldcountdamage(attacker, target)) return;
int gun = attacker->gunselect;
// try to fix gun used to deal the damage
if(gun == GUN_RL || gun == GUN_GL || damage != guns[gun].damage * (attacker->quadmillis ? 4 : 1))
if((gun != GUN_SG && damage != guns[gun].damage * (attacker->quadmillis ? 4 : 1)) || (gun == GUN_SG && damage%(attacker->quadmillis ? 40 : 10) != 0))
{
gun = attacker->stats.lastprojectile;
}
Expand Down

0 comments on commit af883ec

Please sign in to comment.