TheSil / base_enhanced

sil's base_enhanced server mod
3 stars 4 forks source link

Bug with tech giving ammo #76

Closed deathsythe47 closed 8 years ago

deathsythe47 commented 9 years ago

If you completely run out of ammo for a weapon (down to zero) and a tech gives you ammo, you won't get ammo for that weapon.

Example: Playing defense HW on Hoth I have 10 rockets and 300 bowcaster. I shoot 10 rockets and 100 bowcaster. I now have 0 rockets and 200 bowcaster. Tech gives me ammo by +using me(touching me with hand animation) for some time I now have 0 rockets and 300 bowcaster.

Definitely a bug, because ammo dispensers and ammo canisters can give you ammo if you are at 0. For some reason tech +use cannot.

entdark commented 9 years ago

It has to work with dispensers and canisters ammo only so rockets don't count. It was so since JK2 where you could charge your ammo with yellow-orange ammo stands, and it never worked for rockets. So it works as intended. Not a bug.

deathsythe47 commented 9 years ago
  1. The rockets were simply an example, it wasn't about rockets specifically. All weapons have this bug. I picked a class that has exactly two weapons, both with finite ammo, to use as a clear example.
  2. (At least in siege mode) dispensers and canisters DO give rocket ammo.
entdark commented 9 years ago

Oh, I see, I meant energy cells only give you ammo like the ammo stands from JK2. That's what I meant.

TheSil commented 9 years ago

This seems to just add ammo that is for the weapon that targeted player has selected, so if he runs out of ammo, it should not give him any because he simply cannot have that weapon selected. Or am i missing something?

deathsythe47 commented 9 years ago

Yes it just gives ammo for selected weapon. I think it can be fixed by either making it give ammo for all weapons (like ammo dispenser/canister) or by setting ammo for empty weapon to 1 ammo.

Honestly, I think best solution is make it give ammo for all weapons, like dispenser/canister...

But in any case, it doesn't make sense that you can't get ammo if you have 0 ammo, when dispenser/canister can do it.

TheSil commented 9 years ago

But why should this be same asdispenser? Isn't this more like tech giving you ammo for weapon you hold? While dispenser is more of a giving all machine.

It definitely can be updated to give ammo to all weapons you have, but then it is more like enhancement, current behaviour does not seem bugged. Especially when looking at code where it is clear that current behaviour was explicitly intented for only selected weapon.

deathsythe47 commented 9 years ago

detpacks2 If not give ammo to all weapons, then at least give 1 ammo to 0-ammo-weapons so we can get ammo for it

TheSil commented 9 years ago

That would not make sense, i think better enhancement is to give ammo to all owned weapons. The point was that current behaviour is not a bug. To make your depiction more accurate you should have det pack in hands in first case and empty hands in second one ;)

deathsythe47 commented 9 years ago

Pic would still make no sense with hands instead of backpack

TheSil commented 9 years ago

Maybe it wouldnt, but still that is what devs intented.

entdark commented 9 years ago

LoL, Sil, implement what he wants just for those amazing drawings. It made my day.