Skip to content

Commit

Permalink
Fixed error in new Ammo drop (#1717)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXonte authored Jan 15, 2025
1 parent bf24f2f commit 616de84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
- Fixed the mute button in the scoreboard not working (by @TW1STaL1CKY)
- Fixed a few errors in shop error messages (by @Histalek)
- Fixed `markerVision`'s registry table being able to contain duplicate obsolete entries, thus fixing potential syncing issues with markers (by @TW1STaL1CKY)
- Fixed issue in new Ammo dropping that could cause an error when dropping for modified weapon bases. (by @MrXonte)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion gamemodes/terrortown/gamemode/server/sv_player_ext.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ function plymeta:DropAmmo(wep, useClip, amt)
if useClip then
amt = wep:Clip1()
else
amt = math.min(wep.AmmoEnt.AmmoAmount, self:GetAmmoCount(wep.Primary.Ammo))
amt = math.min(box.AmmoAmount, self:GetAmmoCount(wep.Primary.Ammo))
end
end
local hook_data = { amt }
Expand Down

0 comments on commit 616de84

Please sign in to comment.