LVPlayground / playground

The Las Venturas Playground gamemode
Other
33 stars 23 forks source link

When leaving deathmatch lagshot is not always removed. #745

Closed OttoRocket-LVP closed 4 years ago

OttoRocket-LVP commented 4 years ago

Sometimes when a player uses /deathmatch leave his lag shot setting is not set back to lagcomp.

Might have something to do with lag/desync?

RussellLVP commented 4 years ago

I found (and fixed in 620b502e) a case that might've caused this:

if (!teleportStatus.isApproved()) {
    // kill
} else if (player.syncedData.lagCompensationMode !== 2) {
    // reset lag comp & respawn
} else {
    // respawn
}

This means that if a player types /deathmatch leave immediately after taking damage in a lag shot mode, we do not reset the lag compensation mode back to skin hit.

As mentioned, now fixed. I'm not sure if there are other fixes in #743?