Few more flashbang updates

This commit is contained in:
LoneWolfHT 2018-11-22 18:30:24 -08:00
parent e67f8cc2f1
commit 7d0964950a

@ -41,8 +41,8 @@ if settings:get_bool("enable_flashbang_grenade") then
on_explode = function(pos, player, self)
for k, v in ipairs(minetest.get_objects_inside_radius(pos, 15)) do
if v:is_player() and v:get_hp() > 0 then
local playerdir = vector.floor(vector.normalize(v:get_look_dir()))
local grenadedir = vector.floor(vector.normalize(vector.direction(v:get_pos(), pos)))
local playerdir = vector.round(vector.normalize(v:get_look_dir()))
local grenadedir = vector.round(vector.normalize(vector.direction(v:get_pos(), pos)))
if playerdir.x == grenadedir.x and playerdir.z == grenadedir.z then
for i = 1, 3, 1 do