gun bug
- Xavious
- Posts: 2250
- https://www.facebook.com/warszawa.kuchnie.na.wymiar/
- Joined: Sun Jul 13, 2003 7:01 pm
- }TCP{Wolf
- Site Admin
- Posts: 4663
- Joined: Thu Dec 19, 2002 7:30 pm
- Location: https://signal.me/#eu/4zInut2kHeg_ry0GD ... pdqka17o2F
- Contact:
UTF-10 from alpha 4 build and upwards will have this bug fixed - but it's only possible to fix it for UTeamWeapons, not any custom guns mod-crazy admins may include in their servers. Nice catch though, Cheiz will be mentioned for finding it...
-=]I AM GETTING TOO OLD FOR SUBTLETY[=-
mail: chaos.worx[at]gmx.net
IRC Quakenet +OTR: }TCP{Wolf @#oldunreal @#tcp.clan
Jabber/XMPP +OTR: Wolfy359@jabber.org
Threema: CR6Y9YSS
Signal: see profile
ICQ: dead since russian takeover disables OTR
mail: chaos.worx[at]gmx.net
IRC Quakenet +OTR: }TCP{Wolf @#oldunreal @#tcp.clan
Jabber/XMPP +OTR: Wolfy359@jabber.org
Threema: CR6Y9YSS
Signal: see profile
ICQ: dead since russian takeover disables OTR
-
}TCP{Cheiz
- Posts: 18
- Joined: Sun Aug 17, 2003 11:18 am
Cool! By the way, i made a little mistake:
After the fix, is it still possible to throw away (and pick up) 0 ammo guns?
Dead-body-asmds also arent useful becaue you get 0 ammo from them also.}TCP{Cheiz wrote:That can be very mean when you throw it to someone which doesnt have asmd yet; he will get an asmd with 0 bullets and can not pickup a new one but only dead-body-asmds and ammo.
After the fix, is it still possible to throw away (and pick up) 0 ammo guns?
- }TCP{Wolf
- Site Admin
- Posts: 4663
- Joined: Thu Dec 19, 2002 7:30 pm
- Location: https://signal.me/#eu/4zInut2kHeg_ry0GD ... pdqka17o2F
- Contact:
The original unfixed code works like this:
If you pick up a dropped gun, and you do not yet have this gun already, you get the gun you pick up and any ammo it has (which can be 0 if the player dropping dies right after firing his last shot or tosses the gun that moment).
If you pick up a dropped gun but you already HAVE the gun in your inventory, you get the default pickup amount of ammo added for that weapon class (which would be 20 ammo for asmds). That's what the code says in Weapon.uc::handlepickupquery(inventory Item). I even tested this on a FULL FLAK and I only got 10 ammo when picking it up, not 50 as it should have been.
The fix will always give you the correct amount of ammo on dropped guns now, but only if it is a UTeamWeapon (any standard Unreal Weapon). It is still possible to accidently or intentionally dropping guns with 0 ammo. This is after all not a bug, but a "feature". Remember my primary goal with UTF is patching and adding (mostly administrative) features, not changing original game-play behaviour. I might think of something optional some day...
If you pick up a dropped gun, and you do not yet have this gun already, you get the gun you pick up and any ammo it has (which can be 0 if the player dropping dies right after firing his last shot or tosses the gun that moment).
If you pick up a dropped gun but you already HAVE the gun in your inventory, you get the default pickup amount of ammo added for that weapon class (which would be 20 ammo for asmds). That's what the code says in Weapon.uc::handlepickupquery(inventory Item). I even tested this on a FULL FLAK and I only got 10 ammo when picking it up, not 50 as it should have been.
The fix will always give you the correct amount of ammo on dropped guns now, but only if it is a UTeamWeapon (any standard Unreal Weapon). It is still possible to accidently or intentionally dropping guns with 0 ammo. This is after all not a bug, but a "feature". Remember my primary goal with UTF is patching and adding (mostly administrative) features, not changing original game-play behaviour. I might think of something optional some day...
-=]I AM GETTING TOO OLD FOR SUBTLETY[=-
mail: chaos.worx[at]gmx.net
IRC Quakenet +OTR: }TCP{Wolf @#oldunreal @#tcp.clan
Jabber/XMPP +OTR: Wolfy359@jabber.org
Threema: CR6Y9YSS
Signal: see profile
ICQ: dead since russian takeover disables OTR
mail: chaos.worx[at]gmx.net
IRC Quakenet +OTR: }TCP{Wolf @#oldunreal @#tcp.clan
Jabber/XMPP +OTR: Wolfy359@jabber.org
Threema: CR6Y9YSS
Signal: see profile
ICQ: dead since russian takeover disables OTR
-
}TCP{Cheiz
- Posts: 18
- Joined: Sun Aug 17, 2003 11:18 am
This is not 100% true. You only get that "default pickup amount" if you first got a weapon at the place the weapon is placed in a map. Try this: Drop 2 asmd guns one with 5 one with 12 bullets. If you have no ASMD and then first get the 5 bullet you have 5 ammo, then get the 12 bullet and you'll have 10 ammo, not 17 and not 25.}TCP{Wolf wrote:If you pick up a dropped gun but you already HAVE the gun in your inventory, you get the default pickup amount of ammo added for that weapon class (which would be 20 ammo for asmds). That's what the code says in Weapon.uc::handlepickupquery(inventory Item). I even tested this on a FULL FLAK and I only got 10 ammo when picking it up, not 50 as it should have been.
The general rule is:
When you get a gun you already have, it adds the same amount of ammo as the amount of ammo in the gun you picked up first.
(not necessary first after you respawned, but when you didnt have the gun)
BTW with a dead-body-gun i mean a gun which remains on the ground when someone died, and also a gun which is thrown away.
Last edited by }TCP{Cheiz on Mon Oct 25, 2004 9:12 pm, edited 1 time in total.
- }TCP{Wolf
- Site Admin
- Posts: 4663
- Joined: Thu Dec 19, 2002 7:30 pm
- Location: https://signal.me/#eu/4zInut2kHeg_ry0GD ... pdqka17o2F
- Contact:
Yea especially since that's not what the code says. There may be version differences or even differences between visible source and compiled. Just like the shieldbelt where the textbuffers are wrong too lol...
Anyway I'm still working this one out and in the end it will just give you the correct amount of ammo no matter what
Anyway I'm still working this one out and in the end it will just give you the correct amount of ammo no matter what
-=]I AM GETTING TOO OLD FOR SUBTLETY[=-
mail: chaos.worx[at]gmx.net
IRC Quakenet +OTR: }TCP{Wolf @#oldunreal @#tcp.clan
Jabber/XMPP +OTR: Wolfy359@jabber.org
Threema: CR6Y9YSS
Signal: see profile
ICQ: dead since russian takeover disables OTR
mail: chaos.worx[at]gmx.net
IRC Quakenet +OTR: }TCP{Wolf @#oldunreal @#tcp.clan
Jabber/XMPP +OTR: Wolfy359@jabber.org
Threema: CR6Y9YSS
Signal: see profile
ICQ: dead since russian takeover disables OTR