Drop weapon glitch for ammo

These bugs do plan to be resolved, when they can be.

Moderator: GZDoom Developers

Re: Drop weapon glitch for ammo

Postby Deathlike2 » Fri Feb 19, 2010 11:52 am

Spleen wrote:
Graf Zahl wrote:
Spleen wrote:
It seems simpler to flag a player, whether they picked up a certain kind of weapon at some point, or even started with it. For example, Bob can only get ammo from shotguns once, even if he drops a shotgun and tries to pick up another one.




And that would whack the balance of how many existing multiplayer WADs?

Not many I would think, since the amount of ammo players get would be exactly the same as playing with weapon stay right now, without abusing the drop glitch. With weapon stay off, Bob would still be able to get ammo from every shotgun. This is just for weapon stay on.


I think you are missing the point.

You are changing the exploit in a different manner. If you have a friend (or willing participant) that wants to pick up your dropped weapon, that person can then proceed to drop that weapon back to you. With your proposed suggestion, the drop weapon-ammo deal is abused differently, and it is simply not a solution.
Deathlike2
Lone Strife Nut
 
Joined: 03 Nov 2004

Re: Drop weapon glitch for ammo

Postby Spleen » Fri Feb 19, 2010 11:59 am

Deathlike2 wrote:You are changing the exploit in a different manner. If you have a friend (or willing participant) that wants to pick up your dropped weapon, that person can then proceed to drop that weapon back to you. With your proposed suggestion, the drop weapon-ammo deal is abused differently, and it is simply not a solution.

Yeah, I am missing the point. Neither I nor my friend will receive more ammo since dropped weapons already don't give ammo. The exploit involves picking up a weapon that stays, not a dropped weapon. I understand Graf's concern, but I don't see how it would be exploitable.
User avatar
Spleen
I'm drunnk1 hehahohee111!!!one
 
Joined: 29 Nov 2008

Re: Drop weapon glitch for ammo

Postby Deathlike2 » Fri Feb 19, 2010 12:44 pm

I think I understand what Graf is saying (and rereading the thread helped).

When you make the checks, you want it to rely on the item, and not the player. If the checks are made on the player, a player in a hacked state can abuse said proposed behavior (the hacked player would have the never-picked up weapon state for all weapons, allowing for the preplaced weapons to be picked up infinitely, you could probably hack in something that a player has the weapon/ammo/equipped). If the checks are made on the item, the item pays attention to all players, as to whether it has been picked up while that player is alive and adjust its properties accordingly.
Deathlike2
Lone Strife Nut
 
Joined: 03 Nov 2004

Re: Drop weapon glitch for ammo

Postby NeuralStunner » Fri Feb 19, 2010 1:58 pm

I wouldn't keep a player from ever getting ammo from the same weapon - it's an important way to get ammo from certain enemies.

Is it not possible at one point to set the ammo value for dropped weapons to zero? Similar to how a map-placed shotgun is worth 8 shells, while a sergeant's dropped shotgun is worth 4.

(And BTW, since weapons and inventory can be dropped, I tried dropping some ammo. "Drop Shell" will drop one shotgun shell, but "Drop Shell 50" will still only drop one. Maybe Drop could be extended to allow amounts for items?)
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

Re: Drop weapon glitch for ammo

Postby Spleen » Fri Feb 19, 2010 2:03 pm

NeuralStunner wrote:I wouldn't keep a player from ever getting ammo from the same weapon - it's an important way to get ammo from certain enemies.
I could put in a check so it still gives ammo from weapons dropped by monsters. Basically, only weapons that stay after being picked up will be affected by the new limit. But it appears that the check should be done weapon-side and not player-side.. hmm. I guess I'll have to do it that way.

NeuralStunner wrote:Is it not possible at one point to set the ammo value for dropped weapons to zero? Similar to how a map-placed shotgun is worth 8 shells, while a sergeant's dropped shotgun is worth 4.
Weapons manually dropped by players already have an ammo value of zero.

NeuralStunner wrote:(And BTW, since weapons and inventory can be dropped, I tried dropping some ammo. "Drop Shell" will drop one shotgun shell, but "Drop Shell 50" will still only drop one. Maybe Drop could be extended to allow amounts for items?)
Yeah, that would be pretty useful.
User avatar
Spleen
I'm drunnk1 hehahohee111!!!one
 
Joined: 29 Nov 2008

Re: Drop weapon glitch for ammo

Postby NeuralStunner » Fri Feb 19, 2010 2:25 pm

:? I don't see what more really needs to be done, then... Seems to work almost perfectly now to me. The only problem I've seen is with items being dropped "inside" walls, because their default Radius (20) is larger than the player's (16). They, as well as Inventory items, should probably check for sufficient space before dropping. As it is, dropping a weapon while too close to a wall makes it get stuck, and it can't be picked back up.

Spleen wrote:
NeuralStunner wrote:I wouldn't keep a player from ever getting ammo from the same weapon - it's an important way to get ammo from certain enemies.
I could put in a check so it still gives ammo from weapons dropped by monsters.

I forgot to add, it's a nice thing for map-placed ones too. The only place this is not done is a co-op game, which has the (understandably needed) equivalent of a permanent Weapons Stay flag. (But, flagging each instance of a weapon for each player, so it could be picked up only once but another instance could be picked up after, sounds like a pain in the arse.)
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

Re: Drop weapon glitch for ammo

Postby Spleen » Fri Feb 19, 2010 2:28 pm

NeuralStunner wrote::? I don't see what more really needs to be done, then...

The original problem is an exploitable glitch which let players get infinite ammo by repeatedly dropping a weapon and picking up the original one - since it has weapon stay, you can pick it up as much as you want and keep getting ammo.
User avatar
Spleen
I'm drunnk1 hehahohee111!!!one
 
Joined: 29 Nov 2008

Re: Drop weapon glitch for ammo

Postby NeuralStunner » Fri Feb 19, 2010 3:10 pm

Spleen wrote:The original problem is an exploitable glitch which let players get infinite ammo by repeatedly dropping a weapon and picking up the original one - since it has weapon stay, you can pick it up as much as you want and keep getting ammo.

Duh. I forgot that part. :oops:

Yeah, and you also end up with "actor spam": A lot of duplicate copies of the weapon, that have 0 ammo value and thus can't be collected.

Probably wouldn't want to turn off weapon dropping altogether. (Might want to toss a weapon to a teammate who just respawned, etc.) But that's the only option I see for the players, to negate the possible exploit.

Off the top of my head, and maybe impossible: A new internal field, similar to WeaponHolder, which tracks what weapons you've picked up? When attempting to pick up a weapon, first it checks for the +DROPPED flag. If that's on the dropped weapon, it can proceed like normal. Otherwise, if Weapons Stay is active, it checks whether the weapon is already in that field. If not, give the weapon and its ammo then add it to the field. The field should also be discarded whenever entering a new hub/cluster (+INVENTORY.INTERHUBSTRIB). Since Inventory is reset per map in DM, it would work fine there too.
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

Re: Drop weapon glitch for ammo

Postby kevans91 » Tue Dec 02, 2014 10:59 pm

I think I've got this one figured out: https://github.com/rheit/zdoom/pull/179

I added a pickedUp flag to AInventory that is set in AInventory::TryPickup after clone->AttachToOwner(). AWeapon::AttachToOwner was changed to check the pickedUp bool of the weapon, and either add the ammo to the existing stock or just find the proper ammo types in inventory, dependent on whether it's been picked up previously or not. This shouldn't have any negative side effects, but I might be missing something.
kevans91
 
Joined: 16 Sep 2014

Re: Drop weapon glitch for ammo

Postby Graf Zahl » Wed Dec 03, 2014 2:06 am

Well, you at least forgot one thing: This stuff is not stored in a savegame so a save/reload will reset it all.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Drop weapon glitch for ammo

Postby kevans91 » Wed Dec 03, 2014 2:36 am

Graf Zahl wrote:Well, you at least forgot one thing: This stuff is not stored in a savegame so a save/reload will reset it all.


I've amended it to bump up SAVEVER and save pickedUp. I'll continue to test it out a little bit-- this one has me a little more skeptical than others, because it took me a little bit to follow what exactly was going on with the different scenarios for picking up weapons.
kevans91
 
Joined: 16 Sep 2014

Re: Drop weapon glitch for ammo

Postby kevans91 » Thu Dec 11, 2014 10:09 pm

Apologies for the double post, but I renamed pickedUp to "allowDispense," because that seems to better reflect what it's doing and what it's intention is. Furthermore, its value is only changed when an item ShouldStay().
kevans91
 
Joined: 16 Sep 2014

Previous

Return to On Hold Bugs

Who is online

Users browsing this forum: No registered users and 1 guest