Batfoxkid / Freak-Fortress-2-Rewrite

The gamemode that's now also a standalone boss maker.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
17 stars 7 forks source link

[Bug] "primary ammo from damage" bypasses ammo limit #165

Closed DanishSoup closed 5 months ago

DanishSoup commented 7 months ago

Description

When using "primary ammo from damage" doing damage will give you more ammo than what the weapon can hold normally. In the video provided, when damaging the boss the rocket jumper gains more ammo than what it can usually hold (I removed the bonus ammo gain so it should be 20).

Reproduce

Steps to reproduce the behavior:

  1. Use "primary ammo from damage" on any weapon (set value to "1" for convenience)
  2. Damage the boss
  3. See error

Media

If applicable, add screenshots, videos, logs, to help explain your problem. https://youtu.be/WYRLon7LLfI

Environment

Other Information

Add any other context about the problem here. Could also affect "secondary damage vs bosses" but I haven't tested it

M60TM commented 7 months ago

slot ammo from damage is different with our expectation. Those attributes and native attribute 203 (drop health pack on kill) use DamageGoal function. It only check given damage to enough to gain ammo. But it doesn't count critical damage calculation. So, If some weapon have slot ammo from damage with a figure of 300(rocket jumper has this value in default config), it never gain ammo from damage without market-gardening or high-dealing.

Batfoxkid commented 5 months ago

Intended feature to bypass max ammo.