mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-10 07:49:57 -04:00
Report next intended position instead of current position to server
Fixes rare issues like where you can land on a block then jump off it again without the server noticing
This commit is contained in:
parent
e66649b285
commit
dfdf1e150d
@ -737,9 +737,12 @@ static void Classic_Reset(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void Classic_Tick(void) {
|
static void Classic_Tick(void) {
|
||||||
struct Entity* p = &LocalPlayer_Instance.Base;
|
struct LocalPlayer* p = &LocalPlayer_Instance;
|
||||||
|
struct Entity* e = &LocalPlayer_Instance.Base;
|
||||||
if (!classic_receivedFirstPos) return;
|
if (!classic_receivedFirstPos) return;
|
||||||
Classic_WritePosition(p->Position, p->Yaw, p->Pitch);
|
/* Report end position of each physics tick, rather than current position */
|
||||||
|
/* (otherwise can miss landing on a block then jumping off of it again) */
|
||||||
|
Classic_WritePosition(p->Interp.Next.Pos, e->Yaw, e->Pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user