Improve shooter_rocket

This commit is contained in:
philipmi 2021-02-15 14:11:08 +01:00
parent 14159a953c
commit faf74cbcb0
4 changed files with 13 additions and 17 deletions

View file

@ -157,12 +157,12 @@ ctf_classes.register("sniper", {
ctf_classes.register("rocketeer", {
description = "Rocketeer",
pros = { ">Can craft/use rockets" },
cons = { "> -50% health points" },
cons = { "> -25% health points" },
color = "#fa0",
properties = {
-- Disallow rocketeers from capturing flags - they're intended to be support
can_capture = false,
max_hp = 10,
max_hp = 15,
initial_stuff = {
"shooter_rocket:rocket_gun_loaded",

View file

@ -77,7 +77,7 @@ function random_messages.read_messages()
"Change your class in your base by right clicking the home flag or typing /class.",
"Medics cause troops within 10 metres to regenerate health faster.",
"Hitting your enemy does more damage than not hitting them.",
"Press right mouse button or double-tap the screen to activate scope while wielding a sniper rifle.",
"Press right mouse button or double-tap the screen to activate scope while wielding a sniper rifle or a rocket gun.",
"The 'Updates' tab in your inventory will show some of the latest updates to CTF",
}
end

@ -1 +1 @@
Subproject commit 0bf4ba121997ba1553f221dbd2bc2ef179b512c9
Subproject commit 378c2c200ed5bd20675d6d6581d87510b45fd0d1

View file

@ -243,9 +243,7 @@ minetest.register_on_dieplayer(function(player)
end)
minetest.registered_entities["shooter_rocket:rocket_entity"].on_step = function(self, dtime)
self.timer = self.timer + dtime
if self.timer > 0.2 then
minetest.registered_entities["shooter_rocket:rocket_entity"].on_step = function(self)
local pos = self.object:get_pos()
local above = {x=pos.x, y=pos.y + 1, z=pos.z}
if minetest.get_node(pos).name ~= "air" then
@ -257,8 +255,6 @@ minetest.registered_entities["shooter_rocket:rocket_entity"].on_step = function(
end
self.object:remove()
end
self.timer = 0
end
end
minetest.registered_entities["shooter_grenade:grenade_entity"].on_step = function(self, dtime)