PDA

View Full Version : Deathbug discussion?


FireCat
05/07/2012, 12:06 AM
Well I've had the curse following my servers all the time, yet I haven't find a proper way to technically fix it.
I thought, like...
The death bug, is that, you kill someone, you see him lying down, so does everyone, except the player that got killed, he still can run around, but his health is setted to 100 (I think, not sure, sometimes it does, and sometimes it doesnt)
I only found a solution (my self), getting (client side) the player's anim, and comparing it to a server side one, possibly?
Or, like when he dies, it still sends a death message (if enabled) so we could set a var to 1, to check if the player died, that means we could check if the variable is 1 and retrieve the player's velocity, probably?

[DOG]irinel1996
05/07/2012, 12:13 AM
Yes, that's right, I could say that it's confirmed.
I saw both parts of the bug, I mean I got killed (the death message was sent) and I could walk around, and I killed and the player which died got bugged. Good idea about the fix solution.

Chris1337
05/07/2012, 12:16 AM
Just Do This :



SetPlayerHealth(playerid, 1.0);
ClearAnimations(playerid);


on onplayerdeath

and for my server its fixed

Y_Less
05/07/2012, 12:26 AM
I don't know if it helps entirley because it doesn't set the health, but fixes.inc clears animations on death for other reasons - have you tried with that enabled?

MP2
05/07/2012, 12:27 AM
Has anyone experienced the bug where you die and respawn INSTANTLY? I think this may be a bug with y_classes and ForceClassSelection (yay another bug :().

In fact, Y_Less, I know I told you about a few bugs with y_classes like that^ and the 'double-spawn' bug - I think they're all because ForceClassSelection is always 'on'. Is there a reason for this apart from to hide the F4 message? I think bugs like that take more priority over a message that'll really never be seen. Could be worth while looking in to that as it'd fix at least 3 bugs.

Y_Less
05/07/2012, 12:36 AM
You're probably right, I'll see what I can do when I have some spare minutes...

CyNiC
05/07/2012, 02:22 AM
Just Do This :



SetPlayerHealth(playerid, 1.0);
ClearAnimations(playerid);


on onplayerdeath

and for my server its fixed

The solution for this problem isn't the question here(its easy to solve), we are wondering to know why this happens and how to detect problematic players.

Y_Less
05/07/2012, 02:29 AM
The solution for this problem isn't the question here

Yes it is...

Well I've had the curse following my servers all the time, yet I haven't find a proper way to technically fix it.

MP2
05/07/2012, 02:30 AM
The solution for this problem isn't the question here(its easy to solve), we are wondering to know why this happens and how to detect problematic players.
This is a discussion topic in a discussion forum, to discuss the bug and hopefully find a solution.

[KHK]Khalid
05/07/2012, 03:12 AM
Read the last reply (http://forum.sa-mp.com/showthread.php?p=1947154#post1947154) in this (http://forum.sa-mp.com/showthread.php?t=354222) topic. Not sure if it will work but I'm sure it will fail if GetPlayerPos returns the position that the BUGGED player is at (which he sees on his screen), it worth a try though.

Amit_B
05/07/2012, 08:38 AM
@FireCat: You've suggested some ways to detect if the bug occurs, but it doesn't help to fix it because it's just detecting.

I'm running a big DM server and that bug happens to my players a lot; I've found that when a player is in this bug, you need to damage him in some way. By damaging I don't mean to set his health with SetPlayerHealth because this won't help, also, spawning the player or setting his position will just not affect at this status.

Anyway, when a player in that bug status get shotted (by player who actually won't see him - the bugged one just gets in shooting between other players) the bug is solved. Also, if we exploding the position of the player, it's damaging him and fixes the bug. Also if the player jumps from a high position to the ground, so the falling will damage him, the bug is fixed too.

I had an idea of setting the player velocity to negative Z value when he's on the ground so he will be damaged and the bug will be fixed, but I think that SetPlayerVelocity will not affect him just as the most of other functions will not.

FireCat
05/07/2012, 09:57 AM
@FireCat: You've suggested some ways to detect if the bug occurs, but it doesn't help to fix it because it's just detecting.

I'm running a big DM server and that bug happens to my players a lot; I've found that when a player is in this bug, you need to damage him in some way. By damaging I don't mean to set his health with SetPlayerHealth because this won't help, also, spawning the player or setting his position will just not affect at this status.

Anyway, when a player in that bug status get shotted (by player who actually won't see him - the bugged one just gets in shooting between other players) the bug is solved. Also, if we exploding the position of the player, it's damaging him and fixes the bug. Also if the player jumps from a high position to the ground, so the falling will damage him, the bug is fixed too.

I had an idea of setting the player velocity to negative Z value when he's on the ground so he will be damaged and the bug will be fixed, but I think that SetPlayerVelocity will not affect him just as the most of other functions will not.

Well when I see this happening with my players, I normaly just /slap them, then it works...

Amit_B
05/07/2012, 10:01 AM
Then your slap uses SetPlayerPos or SetPlayerVelocity?

ReneG
05/07/2012, 10:02 AM
public OnPlayerDeath(playerid, killerid, reason)
{
FixPlayer(playerid);
return 1;
}

stock FixPlayer(playerid)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]+10.0);
return 1;
}

What's wrong with that?

FireCat
05/07/2012, 10:18 AM
public OnPlayerDeath(playerid, killerid, reason)
{
FixPlayer(playerid);
return 1;
}

stock FixPlayer(playerid)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]+10.0);
return 1;
}

What's wrong with that?

So each time the player dies, he will be forced to change position?
What if he's under... lets say a small bridge?
Some noobs will report him for hacking...

Y_Less
05/07/2012, 10:27 AM
I believe that ramping gravity up massively kills people instantly. Obviously that doesn't help if you can't set it per-player, but would that fix the bug if it were possible?

ReneG
05/07/2012, 10:35 AM
So each time the player dies, he will be forced to change position?
What if he's under... lets say a small bridge?
Some noobs will report him for hacking...
That's the only flaw, thank goodness there is a range parameter in CreateExplosion.

FireCat
05/07/2012, 10:50 AM
I believe that ramping gravity up massively kills people instantly. Obviously that doesn't help if you can't set it per-player, but would that fix the bug if it were possible?

Well, with the death bug, you don't see the player moving, he's just lying down on the floor...
But him self, sees him running around and can shoot, and when you shoot the person on the floor their like "I'm not there!" because they don't move... So what I use to "fix" it, is just /slap him
So probably that would fix it...

ReneG
05/07/2012, 10:52 AM
Try creating a small explosion at the player small as in (0.001) so other players aren't wrongly injured.

FireCat
05/07/2012, 10:55 AM
Try creating a small explosion at the player small as in (0.001) so other players aren't wrongly injured.

Why not just set the player's health to 0 instead?
No that won't work, he has to be injured, but not server sided, thats why /slap works...
It's client sided... Object colision

Y_Less
05/07/2012, 10:56 AM
Well, with the death bug, you don't see the player moving, he's just lying down on the floor...
But him self, sees him running around and can shoot, and when you shoot the person on the floor their like "I'm not there!" because they don't move... So what I use to "fix" it, is just /slap him
So probably that would fix it...

I'm talking about essentially re-killing the player. It doesn't really matter what other people see, you need them to die on their screen.

FireCat
05/07/2012, 11:03 AM
I'm talking about essentially re-killing the player. It doesn't really matter what other people see, you need them to die on their screen.

Hmm probably changing their gravity radicaly would fix it (like you said)

CyNiC
06/07/2012, 02:25 AM
Yes it is...

Ok, change the player health for 1.0 and he will die.

ReneG
06/07/2012, 03:42 AM
Ok, change the player health for 1.0 and he will die.
Nein.

Tee
06/07/2012, 06:14 AM
I set their health to a value above 0.0 and it works. Under my OnPlayerDeath callback I have SetPlayerHealth(playerid, 100.0);.

Chris1337
06/07/2012, 06:51 AM
i will add another solution
when the wasted anim is applied you set a variable to the player (set it to 1) , onplayerspawn you set it to 0 then you can just set a timer to check if the variable is 1 and in that case you can print the player is bugged and set his health to 1