AsYetUntitled / Framework

Altis Life RPG mission framework for Arma 3 originally made by @TAWTonic.
Other
245 stars 308 forks source link

Weapons Dupe on Player Killed #115

Closed TMschar closed 7 years ago

TMschar commented 8 years ago

Expected behaviour

When you die, weapon disappears instantly and no one can pick it up.

Actual behaviour

When you die, sometimes the weapon disappears after 5 seconds, and sometimes it doesn't disappear at all.

Steps to reproduce the behaviour

  1. Kill a player that has a Primary gun in his hands..
  2. Wait for it to either disappear after 5 seconds or not disappear.
  3. Pick up the weapon
  4. Revive player and he will get the weapon back

    [RPT]

No errors shown


Mission version: 4.4r3 with recent updates

Launcher version: Game version: Both on Arma 1.62 and 1.64 Branch: master

allstar-uk commented 8 years ago

On occasion it does happen where the weapon doesn't get deleted. It also doesn't get deleted fast enough and can be picked up within a few seconds.

TMschar commented 8 years ago

Exactly. @DarkSilencerZA

tkcjesse commented 8 years ago

Can potentially make it so take item and inventory open dont work on ground holders near dead bodies. Idk. I'll look at it some more. It's currently set to be basically as quick as possible.

TMschar commented 8 years ago

I tried doing this but it didn't work.

On death dead_weapon = weapon player;

on Revive player addWeapon = dead_weapon;

That didn't work tho.

tkcjesse commented 8 years ago

I mean it's already being stored in life_save_gear. Its the deleting of the groundweaponholder that is the issue.

TMschar commented 8 years ago

Why not just not put it in a groupWeaponHolder or whatever then? And just store it in a variable and then retrieve it?

tkcjesse commented 8 years ago

At TOD your gear is saved to an array and the weaponholder is deleted. Then when revived your gear is taken from that array. Not sure how what you're saying is really any different?

TMschar commented 8 years ago

I think what I'm saying is the same as you. nvm.

One thing though, maybe we can call the stripdown function and then add all the gear back?

tkcjesse commented 8 years ago

@SimZor .....

https://github.com/AsYetUntitled/Framework/blob/master/Altis_Life.Altis/core/functions/fn_loadDeadGear.sqf#L29-L40

TMschar commented 8 years ago

Ok, so that is done already :D

Then something is slowing the script down so it doesn't do it quickly enough and sometimes just doesn't call the script at all...

harmdhast commented 8 years ago

Maybe we can use the damageHandler and when the player took enougth damage to die delete the weapons and return the damage.

TMschar commented 8 years ago

It still needs to load loadDeadGear and store The weapon in a variable

harmdhast commented 8 years ago

You can still save the gear before deleting the weapon

TMschar commented 8 years ago

Anyone have any clues on this? I think this is quite a serious bug.

harmdhast commented 8 years ago

It has always been there. So Idk

TMschar commented 7 years ago

I think this is a major bug, people can abuse this and dupe weapons.

harmdhast commented 7 years ago

I think we understood the impact of the problem. We still need to wait for admins to tag it as a bug and wait for more feedback

BoGuu commented 7 years ago

Fixed in #140

tkcjesse commented 7 years ago

Better leave proper documentation on why it was changed.

TMschar commented 7 years ago

Because weapons were not disappearing or not disappearing fast enough... @tkcjesse

tkcjesse commented 7 years ago

................................................................. Wow. Just wow. It was sarcasm.

TMschar commented 7 years ago

@tkcjesse lol