Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(recover) unconscious bug #1522

Closed
S-fly opened this issue Aug 12, 2014 · 7 comments
Closed

(recover) unconscious bug #1522

S-fly opened this issue Aug 12, 2014 · 7 comments

Comments

@S-fly
Copy link

S-fly commented Aug 12, 2014

There is a bug related to the loss of consciousness. Often (always?) if you faint and change your position afterwards, you will spawn at the position where you fainted after a relog. Also if you don’t relog, the AI of missions will try to attack you at the position where you fainted and not at your new position. You can solve this by entering and leaving a vehicle. Can someone confirm?

@icomrade
Copy link
Collaborator

This has happened to me in the past, but very rarely. It probably happens if the player is not updated properly when aborting or if the server restarts without the player aborting/saving first.

@nkukard
Copy link

nkukard commented Aug 23, 2014

I have a player that can reproduce this by getting shot by AI and rendered unconscious. When he wakes up he is invisible to the AI, he can walk up to them and they do nothing at all. Entering a vehicle and exiting it fixes the issue.

@seb3sec
Copy link
Contributor

seb3sec commented Feb 21, 2015

I did some testing to get rid of this bug and figured out that the >> player playActionNow "Die"; << seems to cause this bug. After this command has been executed the server only updates the position with setPos... once. As nkukard mentioned entering a vehicle also fixes this.

I'll see which move/action can be used to replace this.

EDIT: Looks more like a general problem. If I use the "rSwitchMove" with the RE lib the same happens. If I only do it clientside ("switchMove") everything works fine.

EDIT 2: Now even the switchMove only doesn't work anymore...

@SplenectomY
Copy link
Contributor

It seems very likely that the issue starts in this file somewhere /compile/server_playerSync.sqf. Check your log for any of the debug errors referenced in this file. A likely cause is the player playActionNow "Die"; animation causing the player to be a null object, but try to comment out the animation all together and see if the issue persists.

@seb3sec
Copy link
Contributor

seb3sec commented Feb 22, 2015

No, the playerSync works fine. The bug we're talking about only stops updating the position, gear content and everything else is tracked correctly. There are no errors regarding this in the RPT.

I've written a little test suite for this and one part of it is that you can use a smoke action which requests a smoke grenade drop on your position known by the server. So this basically puts a smoke shell where you're standing (or at least where the server thinks you're standing). If you get knocked out and move away and use this action again, the smoke will be placed where you've been unconscious. I've also added a animationState display which shows what animation is the server seeing on you and after knockout it's permanently AdthPercMstpSrasWrflDnon_1 (Death, Standing, Step speed, raised Weapon, Rifle in Hand).

@seb3sec
Copy link
Contributor

seb3sec commented Feb 22, 2015

I've tried a lot of dying, lying and sleeping animations now and they all seem to get stuck at one point. After 2 hours of coding a workaround I just discovered that the DayZ Mod uses a very similiar variant which uses the prone animation.

Anyone knows if its allowed to port over the code from 1.8.4 to Epoch?
(Not sure how to understand that "licensed to" here: https://github.com/DayZMod/DayZ/blob/Development/SQF/dayz_code/system/scheduler/sched_medical.sqf#L1 - is it allowed to modify under DML or is this licensed?)

@ebayShopper
Copy link
Collaborator

ebayShopper commented Apr 12, 2016

DayZMod/DayZ@c109928

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants