Bug #1288

Weapon disappear after being revived

Added by Spyhawk 4 months ago. Updated 12 days ago.

Status:Feedback% Done:

90%

Priority:UrgentSpent time:-
Assignee:Aranud
Category:Mod generic
Target version:2.77
OS: Arch:

Description

Weapon seems to disappear after being revived. This doesn’t seem to happen all the time.
Check if picking up a weapon on the ground is related.

Not being able to swap weapon, but it was triggered after being revived like 2nd or 3rd time for me.
I witnessed the same 3 times now, but only when i was just revived. My weapon didn’t show and i couldnt shoot. I was able to reload and switch weapon (according to the ammo showing)

2019-05-13-202607-adlernest.dm_84 - https://www.youtube.com/watch?v=4cLGkMhB7KM (1.78 MB) kimi, 13.05.2019 21:36

Trace1.PNG (39.9 KB) Aranud, 04.09.2019 14:14

Trace2.PNG (5.92 KB) Aranud, 04.09.2019 15:17

Trace3.PNG (63.6 KB) Aranud, 04.09.2019 15:17

Trace4.PNG (27.6 KB) Aranud, 04.09.2019 16:13

1138
1139
1140
1141

Associated revisions

Revision 125ad60e
Added by Aranud 4 months ago

mod: fixed previous exploit fix introducing no weapon on revive issue #1288 + fixed riflenade disappearing for no reason (fast switch)

Revision 6655c17e
Added by Aranud 2 months ago

game: fix weapon disappear after revived while dropping weapon before dead

Revision d9f669ca
Added by Aranud 12 days ago

game: ensure weapon anim is reset after revive, refs #1288

History

#2 Updated by Aranud 4 months ago

  • Status changed from New to Feedback
  • Assignee set to Aranud
  • % Done changed from 0 to 90

#3 Updated by Spyhawk 3 months ago

  • Status changed from Feedback to Fixed
  • % Done changed from 90 to 100

#4 Updated by Spyhawk 2 months ago

  • Status changed from Fixed to In Progress
  • % Done changed from 100 to 90

This happened again on TM with latest test snapshot (reported by Bystry). Reopening.

#5 Updated by Aranud 2 months ago

  • Status changed from In Progress to Feedback

Applied in changeset 6655c17e8243da349ba3914d7115ab14f2e032b5

Need feedback to be sure

#6 Updated by artium 28 days ago

Aranud wrote:

Applied in changeset 6655c17e8243da349ba3914d7115ab14f2e032b5

Need feedback to be sure

I re-encountered this bug yesterday.

Was playing as cvops, if I recall correctly I got killed when being/reloading in scoped mode.

#7 Updated by Spyhawk 27 days ago

  • Status changed from Feedback to In Progress

#8 Updated by Aranud 12 days ago

Note 1:

This issue appear while the player is switching weapon and get killed while the drop time, which lastes 250ms.

The server set the weapon 0 (WP_NONE) and we can clearly see than the predicted player state code is ok. (See Trace1.png)

Why the weapon is set to 0 .... that’s the point to clarify.

Note 2:

Looking at the transition between wounded state to revive state it seems the problem occur while the server revive the player (see Trace2.png)

At this point, on revive player the server reset the player state and keep the old weapon before "respawn" (see Trace3.png)

Note 3:

Overwriting weapon to WP_NONE and weaponstate to old state in ReviveEntity doesn’t block player to switch ... something else prevent player to switch and that not linked to WP_NONE.

#9 Updated by Aranud 12 days ago

#10 Updated by Aranud 12 days ago

Found the problem. After revive, the weapAnim value isn’t not reset propely. (See Trace4.png)

We got a bad value that tell us player is currently "alt switch" ... obiviously that wrong.

We never got this problem in vanilla because this check was added in 2.75 to control weapon anim while switching...

That work as expected but that proof than reviveEntity function don’t clear properly player statement.

Let figure what we can do.

#11 Updated by Aranud 12 days ago

  • Status changed from In Progress to Feedback

Let try again, feeback is need !

Also available in: Atom PDF