mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge branch 'main' into block_materials
This commit is contained in:
commit
ec10c77707
6 changed files with 32 additions and 11 deletions
|
|
@ -299,12 +299,10 @@ void PlayerController::updateInteraction(){
|
|||
}
|
||||
if (rclick && !input.shift) {
|
||||
bool preventDefault = false;
|
||||
|
||||
if (item->rt.funcsset.on_use) {
|
||||
preventDefault |= scripting::on_item_use(player.get(), item);
|
||||
}
|
||||
if (item->rt.funcsset.on_use_on_block) {
|
||||
preventDefault |= scripting::on_item_use_on_block(player.get(), item, x, y, z);
|
||||
preventDefault = scripting::on_item_use_on_block(player.get(), item, x, y, z);
|
||||
} else if (item->rt.funcsset.on_use) {
|
||||
preventDefault = scripting::on_item_use(player.get(), item);
|
||||
}
|
||||
if (preventDefault) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue