Optional disable empty shell animation.

This commit is contained in:
Lars 2022-05-01 16:08:50 -07:00
parent d10646f0e5
commit a93bb59536
2 changed files with 6 additions and 2 deletions

@ -670,7 +670,7 @@ rangedweapons_launch_projectile = function(player,projNum,projDmg,projEnt,visual
minetest.sound_play(shoot_sound, {pos = pos, max_hear_distance = 500})
pos.y = pos.y + 1.45
if has_shell > 0 then
if has_shell > 0 and minetest.settings:get_bool("rangedweapons_animate_empty_shells", true) then
local shl = minetest.add_entity(pos, shellEnt)
shl:set_velocity({x=dir.x * -10, y=dir.y * -10, z=dir.z * -10})
shl:set_acceleration({x=dir.x * -5, y= -10, z=dir.z * -5})
@ -679,6 +679,7 @@ shl:set_properties({
textures = {shellTexture},
visual = shellVisual,})
end
if smokeSize > 0 then
minetest.add_particle({
pos = pos,

@ -37,6 +37,9 @@ rangedweapons_min_gun_efficiency (Minimum Gun Skill) int 40
# Use particles on bullet impact (disabling can improve server lag)
rangedweapons_impact_particles (Particles on impact) bool true
# Animate Empty Shells ascEntities (disabling can improve server lag)
rangedweapons_animate_empty_shells (Animate Empty Shells) bool true
rangedweapons_shurikens (Enable Shurikens) bool true
rangedweapons_handguns (Enable Handgus) bool true