Prevent player from falling when block breaking is denied
This commit is contained in:
parent
bcbfd3348d
commit
6e269de274
@ -1033,6 +1033,7 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
|
|||||||
{
|
{
|
||||||
// A plugin doesn't agree with the action, replace the block on the client and quit:
|
// A plugin doesn't agree with the action, replace the block on the client and quit:
|
||||||
m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
|
m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
|
||||||
|
SendPlayerPosition(); // Prevents the player from falling through the block that was temporarily broken client side.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1229,6 +1230,7 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo
|
|||||||
{
|
{
|
||||||
// A plugin doesn't agree with the breaking. Bail out. Send the block back to the client, so that it knows:
|
// A plugin doesn't agree with the breaking. Bail out. Send the block back to the client, so that it knows:
|
||||||
m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
|
m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
|
||||||
|
SendPlayerPosition(); // Prevents the player from falling through the block that was temporarily broken client side.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user