item on_use double call fix

This commit is contained in:
MihailRis 2024-06-01 12:57:10 +03:00
parent 731d43ff63
commit 3a6fa57630

View File

@ -444,13 +444,13 @@ void PlayerController::updateInteraction(){
selectedBlockId = -1; selectedBlockId = -1;
selectedBlockRotation = 0; selectedBlockRotation = 0;
player->selectedVoxel.id = BLOCK_VOID; player->selectedVoxel.id = BLOCK_VOID;
}
if (rclick) { if (rclick) {
if (item->rt.funcsset.on_use) { if (item->rt.funcsset.on_use) {
scripting::on_item_use(player.get(), item); scripting::on_item_use(player.get(), item);
} }
} }
} }
}
Player* PlayerController::getPlayer() { Player* PlayerController::getPlayer() {
return player.get(); return player.get();