mirror of
https://github.com/lhofhansl/rangedweapons.git
synced 2024-11-19 22:03:57 +01:00
Make ricochet configurable.
This commit is contained in:
parent
7d2844ae12
commit
aaf861e497
8
ammo.lua
8
ammo.lua
@ -176,6 +176,7 @@ end
|
||||
|
||||
|
||||
if minetest.get_item_group(minetest.get_node(moveresult.collisions[1].node_pos).name, "level") > 1 then
|
||||
if minetest.settings:get_bool("rangedweapons_bullet_ricochet", true) then
|
||||
self.object:set_velocity(moveresult.collisions[1].old_velocity)
|
||||
|
||||
if sparks > 0 then
|
||||
@ -199,8 +200,11 @@ end
|
||||
if moveresult.collisions[1].axis == "y" then
|
||||
self.object:set_rotation({x=0,y=objRot.y+3,z=objRot.z+3})
|
||||
self.object:set_velocity({x=objVel.x,y=objVel.y*-1,z=objVel.z})
|
||||
end end
|
||||
|
||||
end
|
||||
end
|
||||
else
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
|
@ -37,9 +37,12 @@ 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)
|
||||
# Animate Empty Shells as Entities (disabling can improve server lag)
|
||||
rangedweapons_animate_empty_shells (Animate Empty Shells) bool true
|
||||
|
||||
# Bullet ricochet (disabling can improve server lag)
|
||||
rangedweapons_bullet_ricochet (Bullets Ricocet) bool true
|
||||
|
||||
rangedweapons_shurikens (Enable Shurikens) bool true
|
||||
|
||||
rangedweapons_handguns (Enable Handgus) bool true
|
||||
|
Loading…
Reference in New Issue
Block a user