mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-13 04:33:52 +00:00
Merge b10b897a28 into 09df8928ee
This commit is contained in:
commit
962d91ae6b
3 changed files with 31 additions and 5 deletions
|
|
@ -1279,6 +1279,12 @@ void LocalPlayer::handleMouseDown(int button, bool down)
|
|||
if (!down) missTime = 0;
|
||||
if (button == 0 && missTime > 0) return;
|
||||
|
||||
if (isBlocking())
|
||||
{
|
||||
minecraft->gameMode->stopDestroyBlock();
|
||||
return;
|
||||
}
|
||||
|
||||
if (down && minecraft->hitResult != nullptr && minecraft->hitResult->type == HitResult::TILE && button == 0)
|
||||
{
|
||||
int x = minecraft->hitResult->x;
|
||||
|
|
@ -1476,7 +1482,7 @@ bool LocalPlayer::handleMouseClick(int button)
|
|||
bool returnItemPlaced = false;
|
||||
|
||||
if (button == 0 && missTime > 0) return false;
|
||||
if (button == 0)
|
||||
if (button == 0 && !isBlocking())
|
||||
{
|
||||
//app.DebugPrintf("handleMouseClick - Player %d is swinging\n",GetXboxPad());
|
||||
swing();
|
||||
|
|
@ -1510,7 +1516,7 @@ bool LocalPlayer::handleMouseClick(int button)
|
|||
}
|
||||
else if (minecraft->hitResult->type == HitResult::ENTITY)
|
||||
{
|
||||
if (button == 0)
|
||||
if (button == 0 && !isBlocking())
|
||||
{
|
||||
minecraft->gameMode->attack(minecraft->localplayers[GetXboxPad()], minecraft->hitResult->entity);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue