bullet improvements

master
D00Med 2016-11-28 15:21:06 +10:00
parent e78309e236
commit 9bb1039505
5 changed files with 9 additions and 1 deletions

View File

@ -195,12 +195,18 @@ minetest.register_entity("vehicles:water", {
})
minetest.register_entity("vehicles:bullet", {
visual = "sprite",
visual = "mesh",
mesh = "bullet.b3d",
textures = {"vehicles_bullet.png"},
velocity = 15,
acceleration = -5,
damage = 2,
collisionbox = {0, 0, 0, 0, 0, 0},
on_activate = function(self)
local pos = self.object:getpos()
minetest.sound_play("shot",
{gain = 0.2, max_hear_distance = 3, loop = false})
end,
on_step = function(self, obj, pos)
minetest.after(10, function()
self.object:remove()

View File

@ -29,6 +29,8 @@ geep.b3d, and vehicles_jeep.png - CC BY-SA 3.0 UNPORTED. Created by Kdog14
License for sounds:
CC BY-NC 3.0 oniwe https://freesound.org/people/oniwe/sounds/32316/
shot.ogg - by Kibblesbob http://soundbible.com/1804-M4A1-Single.html
--License of lib_mount:
-- Minetest mod: lib_mount
-- =======================

BIN
models/bullet.b3d Normal file

Binary file not shown.

BIN
sounds/shot.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 120 B