From 842d69d57c42ca17d8cea8616bd60268f0ab4361 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Thu, 11 Apr 2024 06:21:50 +0200 Subject: [PATCH] cleanup --- init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 58a2c01..bd22d0b 100644 --- a/init.lua +++ b/init.lua @@ -12,6 +12,7 @@ local math_sqrt = math.sqrt local vector_multiply = vector.multiply local vector_new = vector.new local vector_zero = vector.zero + -- global table for exposed functions glider = { version = 20240410.234315, @@ -239,7 +240,9 @@ local on_step = function(self, dtime, moveresult) driver:set_hp(1, { type = "set_hp", cause = "glider:flak" }) - driver:get_inventory():remove_item("main", ItemStack("glider:glider")) + driver:get_inventory():remove_item( + "main", ItemStack("glider:glider")) + shoot_flak_sound(pos) land = true end @@ -409,12 +412,10 @@ if use_rockets then end minetest.register_on_dieplayer(function(player) - --local name = player:get_player_name() hanggliding_players[name] = nil remove_physics_overrides(player) end) minetest.register_on_leaveplayer(function(player) - --local name = player:get_player_name() hanggliding_players[name] = nil hud_overlay_ids[name] = nil remove_physics_overrides(player) end)