diff options
Diffstat (limited to 'game/client/experiments.cc')
| -rw-r--r-- | game/client/experiments.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/game/client/experiments.cc b/game/client/experiments.cc index 2b9fe89..b947012 100644 --- a/game/client/experiments.cc +++ b/game/client/experiments.cc @@ -22,7 +22,7 @@ static void on_glfw_mouse_button(const io::GlfwMouseButtonEvent& event)
{
if(!globals::gui_screen && session::is_ingame()) {
- if((event.action == GLFW_PRESS) && (world::player_target::voxel != NULL_VOXEL_ID)) {
+ if((event.action == GLFW_PRESS) && world::player_target::voxel) {
if(event.button == GLFW_MOUSE_BUTTON_LEFT) {
experiments::attack();
return;
@@ -68,13 +68,13 @@ void experiments::update_late(void) void experiments::attack(void)
{
- globals::dimension->set_voxel(NULL_VOXEL_ID, world::player_target::coord);
+ globals::dimension->set_voxel(nullptr, world::player_target::coord);
}
void experiments::interact(void)
{
if(auto info = world::item_registry::find(gui::hotbar::slots[gui::hotbar::active_slot])) {
- if(info->place_voxel != NULL_VOXEL_ID) {
+ if(info->place_voxel) {
globals::dimension->set_voxel(info->place_voxel, world::player_target::coord + world::player_target::normal);
}
}
|
