use weapons fire_delay value for shooting loops | Remove unused weapon parameter consume_bullets
This commit is contained in:
parent
7796849b9d
commit
fa7f8cbebf
@ -28,8 +28,6 @@ block_league.register_weapon("block_league:grenade_launcher", {
|
||||
amount = 20,
|
||||
},
|
||||
|
||||
consume_bullets = false,
|
||||
|
||||
|
||||
bullet = {
|
||||
name = "grenade",
|
||||
|
@ -32,7 +32,6 @@ block_league.register_weapon("block_league:pixelgun", {
|
||||
amount = 20,
|
||||
},
|
||||
|
||||
consume_bullets = false,
|
||||
magazine = 4,
|
||||
reload_time = 4,
|
||||
|
||||
|
@ -28,8 +28,6 @@ block_league.register_weapon("block_league:rocket_launcher", {
|
||||
amount = 20,
|
||||
},
|
||||
|
||||
consume_bullets = false,
|
||||
|
||||
|
||||
bullet = {
|
||||
name = "rocket",
|
||||
|
@ -19,7 +19,6 @@ block_league.register_weapon("block_league:nomearma", {
|
||||
weapon_type = 1, --1) Hitscan 2) Entity based 3) Sword
|
||||
weapon_range = 100, --Range nel quale opera il raggio hitscan
|
||||
continuos_fire = false, --Se può sparare tenendo premuto il sinistro
|
||||
consume_bullets = true, --Se usa proiettili
|
||||
magazine = 0, --Dopo quanti colpi ricaricare
|
||||
reload_time = 5,
|
||||
bullet = "block_league:nomeproiettile", --Che proiettile/granata spara
|
||||
|
@ -14,6 +14,9 @@ block_league.register_weapon("block_league:smg", {
|
||||
crosshair = "bl_smg_crosshair.png",
|
||||
|
||||
weapon_type = 1,
|
||||
magazine = 30,
|
||||
reload_time = 2,
|
||||
sound_reload = "bl_smg_reload",
|
||||
|
||||
damage = dmg,
|
||||
knockback = 0,
|
||||
@ -29,10 +32,5 @@ block_league.register_weapon("block_league:smg", {
|
||||
bullet_trail = {
|
||||
image = "bl_smg_trail.png",
|
||||
amount = 5
|
||||
},
|
||||
|
||||
consume_bullets = false,
|
||||
magazine = 30,
|
||||
reload_time = 2
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -102,7 +102,6 @@ function block_league.register_weapon(name, def)
|
||||
sound_reload = def.sound_reload,
|
||||
bullet_trail = def.bullet_trail,
|
||||
|
||||
consume_bullets = def.consume_bullets,
|
||||
magazine = def.magazine,
|
||||
reload_time = def.reload_time,
|
||||
|
||||
@ -484,7 +483,7 @@ function shoot_loop(weapon, player, pointed_thing)
|
||||
shoot_end(player, weapon)
|
||||
|
||||
else
|
||||
minetest.after(0.1, function()
|
||||
minetest.after(weapon.fire_delay, function()
|
||||
if not arena_lib.is_player_in_arena(p_name, "block_league") then return end
|
||||
if player:get_player_control().LMB and player:get_meta():get_int("bl_is_shooting") == 1 then
|
||||
shoot_loop(weapon, player, pointed_thing)
|
||||
|
Loading…
x
Reference in New Issue
Block a user