mirror of
https://github.com/p2r3/bareiron.git
synced 2025-10-01 23:25:09 +02:00
prevent potential fall damage death from slow chunk loading
This commit is contained in:
@@ -227,6 +227,7 @@ void handlePacket (int client_fd, int length, int packet_id) {
|
|||||||
// Prevent players from leaving the world
|
// Prevent players from leaving the world
|
||||||
if (cy < 0) {
|
if (cy < 0) {
|
||||||
cy = 0;
|
cy = 0;
|
||||||
|
player->grounded_y = 0;
|
||||||
sc_synchronizePlayerPosition(client_fd, cx, 0, cz, player->yaw * 180 / 127, player->pitch * 90 / 127);
|
sc_synchronizePlayerPosition(client_fd, cx, 0, cz, player->yaw * 180 / 127, player->pitch * 90 / 127);
|
||||||
} else if (cy > 255) {
|
} else if (cy > 255) {
|
||||||
cy = 255;
|
cy = 255;
|
||||||
|
Reference in New Issue
Block a user