SA-MP Forums Archive
Lagcomp - Double kill, when player still shooting to body - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Lagcomp - Double kill, when player still shooting to body (/showthread.php?tid=535410)



Lagcomp - Double kill, when player still shooting to body - adik311 - 03.09.2014

Hello,
players from my server found a bug, which allows to double kill from minigun, when killer still shooting to a dead body with minigun. If dead player respawn close killer (we tested it only at minigun area, so maybe it can be also at whole world), then he still get bullets from minigun and he is killed again - can't protect it with god mode, because of lag player get killed before we set player health 99999. Lagcomp is "on" on this server. It's rare bug, sometimes he get's only few bullets, which can hurt to about 10% of health, but sometimes it also kill.

Watch video with this bug in HD and look at the dead window, then compare it with killer and killed player near me:
https://www.youtube.com/watch?v=oyzA...ature=*********

Greetings,
sorry for language.


Re: Lagcomp - Double kill, when player still shooting to body - Pottus - 04.09.2014

This can happen with any weapon actually and pretty easy to fix simply return 0; in OnPlayerWeaponShot() if the hit player has spawned in last second or two also set a variable to mark the player as dead when the die and set it to false when they spawn if they're dead return 0; in OnPlayerWeaponShot().

Overall lagcomp is junk the best way to set up a damage system with lagcomp on is to use OnPlayerGiveDamage() otherwise your going to get a significant failure rate even though the shots may hit the player.