Big changes, prototype charge weapon
@ -1,9 +1,9 @@
|
||||
time_speed = 4
|
||||
#time_speed = 4
|
||||
dedicated_server_step = 0.03
|
||||
mapgen_limit = 256
|
||||
item_entity_ttl = 1
|
||||
active_object_send_range_blocks = 32
|
||||
active_block_range = 8
|
||||
active_block_range = 32
|
||||
ask_reconnect_on_crash = true
|
||||
player_transfer_distance = 0
|
||||
max_objects_per_block = 512
|
||||
@ -11,7 +11,6 @@ csm_restriction_flags = 0
|
||||
enable_mod_channels = true
|
||||
max_packets_per_iteration = 2048
|
||||
|
||||
|
||||
movement_acceleration_default = 4.45
|
||||
movement_acceleration_air = 1.55
|
||||
movement_speed_walk = 5.25
|
||||
|
@ -6,7 +6,14 @@
|
||||
particulate = {}
|
||||
particulate.known_particles = {}
|
||||
|
||||
function particulate.register_cubic_particle(name, definition, physics, factor, sound_name, sound_def)
|
||||
function particulate.register_cubic_particle(name, definition, physics, factor, sound_name, sound_def, register)
|
||||
local reg_ent
|
||||
if register == nil then
|
||||
reg_end = false
|
||||
else
|
||||
reg_end = register
|
||||
end
|
||||
|
||||
local def = table.copy(definition)
|
||||
def.visual = "mesh"
|
||||
def.mesh = "particulate_cubic.obj"
|
||||
@ -172,12 +179,12 @@ function particulate.prefab_bouncing_particle(factor)
|
||||
self.object:set_velocity(velocity)
|
||||
end
|
||||
|
||||
local norm = self.object:get_velocity()
|
||||
norm.x = norm.x * 0.66
|
||||
norm.y = norm.y * 0.66
|
||||
norm.z = norm.z * 0.66
|
||||
rot.z = rot.z + ((norm.x + norm.z) / 3)
|
||||
self.object:set_rotation(rot)
|
||||
-- local norm = self.object:get_velocity()
|
||||
-- norm.x = norm.x * 0.66
|
||||
-- norm.y = norm.y * 0.66
|
||||
-- norm.z = norm.z * 0.66
|
||||
-- rot.z = rot.z + ((norm.x + norm.z) / 3)
|
||||
--self.object:set_rotation(rot)
|
||||
|
||||
if self._timer > self._ttl then
|
||||
if math.random(1, 10) == 1 then
|
||||
@ -245,28 +252,28 @@ function particulate.prefab_bouncing_alt_particle(factor)
|
||||
self.object:set_velocity(velocity)
|
||||
end
|
||||
|
||||
local norm = self.object:get_velocity()
|
||||
norm.x = norm.x * 0.66
|
||||
norm.y = norm.y * 0.66
|
||||
norm.z = norm.z * 0.66
|
||||
rot.z = rot.z + ((norm.x + norm.z) / 3)
|
||||
self.object:set_rotation(rot)
|
||||
-- local norm = self.object:get_velocity()
|
||||
-- norm.x = norm.x * 0.66
|
||||
-- norm.y = norm.y * 0.66
|
||||
-- norm.z = norm.z * 0.66
|
||||
-- rot.z = rot.z + ((norm.x + norm.z) / 3)
|
||||
--self.object:set_rotation(rot)
|
||||
|
||||
if self._timer > self._effect_timer then
|
||||
local props = self.object:get_properties()
|
||||
if props == nil then
|
||||
return
|
||||
elseif props.visual_size == nil then
|
||||
return
|
||||
end
|
||||
-- if self._timer > self._effect_timer then
|
||||
-- local props = self.object:get_properties()
|
||||
-- if props == nil then
|
||||
-- return
|
||||
-- elseif props.visual_size == nil then
|
||||
-- return
|
||||
-- end
|
||||
|
||||
props.visual_size.x = props.visual_size.x * 0.985
|
||||
props.visual_size.y = props.visual_size.y * 0.985
|
||||
props.visual_size.z = props.visual_size.z * 0.985
|
||||
-- props.visual_size.x = props.visual_size.x * 0.985
|
||||
-- props.visual_size.y = props.visual_size.y * 0.985
|
||||
-- props.visual_size.z = props.visual_size.z * 0.985
|
||||
|
||||
props.collisionbox = particulate.calc_collisionbox_size(props.visual_size.x)
|
||||
self.object:set_properties(props)
|
||||
end
|
||||
-- props.collisionbox = particulate.calc_collisionbox_size(props.visual_size.x)
|
||||
-- --self.object:set_properties(props)
|
||||
-- end
|
||||
|
||||
if self._timer > self._ttl then
|
||||
if math.random(1, 10) == 1 then
|
||||
@ -285,25 +292,25 @@ end
|
||||
|
||||
function particulate.prefab_smoke_particle(factor)
|
||||
local function onstep(self, dtime, moveresult)
|
||||
local rot = self.object:get_rotation()
|
||||
local norm = self.object:get_velocity()
|
||||
norm.x = norm.x * 0.66
|
||||
norm.y = norm.y * 0.66
|
||||
norm.z = norm.z * 0.66
|
||||
rot.z = rot.z + ((norm.x + norm.z + norm.y) / 15)
|
||||
self.object:set_rotation(rot)
|
||||
--local rot = self.object:get_rotation()
|
||||
--local norm = self.object:get_velocity()
|
||||
--norm.x = norm.x * 0.66
|
||||
--norm.y = norm.y * 0.66
|
||||
--norm.z = norm.z * 0.66
|
||||
--rot.z = rot.z + ((norm.x + norm.z + norm.y) / 15)
|
||||
--self.object:set_rotation(rot)
|
||||
|
||||
local props = self.object:get_properties()
|
||||
if props == nil then
|
||||
return
|
||||
elseif props.visual_size == nil then
|
||||
return
|
||||
end
|
||||
--local props = self.object:get_properties()
|
||||
--if props == nil then
|
||||
-- return
|
||||
--elseif props.visual_size == nil then
|
||||
-- return
|
||||
--end
|
||||
|
||||
props.visual_size.x = props.visual_size.x * 1.007
|
||||
props.visual_size.y = props.visual_size.y * 1.007
|
||||
props.visual_size.z = props.visual_size.z * 1.007
|
||||
self.object:set_properties(props)
|
||||
-- props.visual_size.x = props.visual_size.x * 1.007
|
||||
-- props.visual_size.y = props.visual_size.y * 1.007
|
||||
-- props.visual_size.z = props.visual_size.z * 1.007
|
||||
--self.object:set_properties(props)
|
||||
|
||||
if self._timer > self._ttl then
|
||||
if math.random(1, 10) == 1 then
|
||||
|
@ -19,16 +19,37 @@ solarsail.controls.focus = {}
|
||||
Gets the player:get_player_control() result for [player_name]
|
||||
]]--
|
||||
solarsail.controls.player = {}
|
||||
solarsail.controls.player_last = {}
|
||||
solarsail.controls.template = {
|
||||
up = false,
|
||||
down = false,
|
||||
left = false,
|
||||
right = false,
|
||||
jump = false,
|
||||
aux1 = false,
|
||||
sneak = false,
|
||||
dig = false,
|
||||
place = false,
|
||||
LMB = false,
|
||||
RMB = false,
|
||||
zoom = false
|
||||
}
|
||||
|
||||
local function update_controls()
|
||||
minetest.register_globalstep(function(dtime)
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
solarsail.controls.player[player:get_player_name()] = player:get_player_control()
|
||||
local pname = player:get_player_name()
|
||||
-- This runs the risk of walking into a boolean key
|
||||
-- but since strings are not booleans this should
|
||||
-- be fine under "normal" circumstances.
|
||||
if solarsail.controls.player[pname] == nil then
|
||||
solarsail.controls.player_last[pname] = table.copy(solarsail.controls.template)
|
||||
else
|
||||
solarsail.controls.player_last[pname] = table.copy(solarsail.controls.player[pname])
|
||||
end
|
||||
solarsail.controls.player[pname] = player:get_player_control()
|
||||
end
|
||||
minetest.after(0.03, update_controls)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
solarsail.controls.focus[player:get_player_name()] = "world"
|
||||
end)
|
||||
|
||||
minetest.after(0.03, update_controls)
|
||||
end)
|
@ -112,23 +112,36 @@ minetest.register_globalstep(function(dtime)
|
||||
elseif weapon._name == nil then
|
||||
elseif weapon._rpm == nil then
|
||||
elseif player_timers[pname].fire > (60 / weapon._rpm) / rpm_modifier then
|
||||
if solarsail.controls.player[pname].LMB then
|
||||
player_timers[pname].fire = 0
|
||||
if solarsail.controls.player[pname].LMB or weapon._uses_mouse_up then
|
||||
local can_fire = false
|
||||
-- Semi auto checks here
|
||||
if weapon._fire_mode == "semi" and not solarsail.controls.player_last[pname].LMB then
|
||||
can_fire = true
|
||||
player_timers[pname].fire = 0
|
||||
elseif weapon._fire_mode == "auto" then
|
||||
can_fire = true
|
||||
player_timers[pname].fire = 0
|
||||
elseif weapon._fire_mode == nil then
|
||||
can_fire = true
|
||||
player_timers[pname].fire = 0
|
||||
end
|
||||
if weapon._type == "gun" then
|
||||
local ammo = weapon._ammo_type
|
||||
if weapons.player_list[pname][ammo] >= 0 then
|
||||
if not weapons.is_reloading[pname][wield] then
|
||||
if not weapons.is_reloading[pname][wield] and can_fire then
|
||||
weapon.on_fire(player, weapon)
|
||||
end
|
||||
end
|
||||
elseif weapon._type == "block" then
|
||||
-- TODO: Move to custom on_place function
|
||||
if weapons.player_list[player:get_player_name()].blocks > 0 then
|
||||
weapon.on_fire(player, weapon)
|
||||
weapons.player_list[player:get_player_name()].blocks =
|
||||
weapons.player_list[player:get_player_name()].blocks - 1
|
||||
if can_fire then
|
||||
weapon.on_fire(player, weapon)
|
||||
weapons.player_list[player:get_player_name()].blocks =
|
||||
weapons.player_list[player:get_player_name()].blocks - 1
|
||||
end
|
||||
end
|
||||
else
|
||||
elseif can_fire then
|
||||
weapon.on_fire(player, weapon)
|
||||
end
|
||||
end
|
||||
|
@ -56,6 +56,14 @@ function solarsail.util.functions.lerp(var_a, var_b, ratio)
|
||||
return (1-ratio)*var_a + (ratio*var_b)
|
||||
end
|
||||
|
||||
function solarsail.util.functions.lerp_vectors(vec_a, vec_b, ratio)
|
||||
return vector.new(
|
||||
(1-ratio)*vec_a.x + (ratio*vec_b.x),
|
||||
(1-ratio)*vec_a.y + (ratio*vec_b.y),
|
||||
(1-ratio)*vec_a.z + (ratio*vec_b.z)
|
||||
)
|
||||
end
|
||||
|
||||
--[[
|
||||
solarsail.util.functions.remap()
|
||||
|
||||
@ -182,6 +190,16 @@ function solarsail.util.functions.pos_to_dist(pos_1, pos_2)
|
||||
return math.sqrt(res.x*res.x + res.y*res.y + res.z*res.z)
|
||||
end
|
||||
|
||||
-- Converts yaw and pitch to a vector.new(x,y,z) provided by player:get_look_dir()
|
||||
-- must be radians
|
||||
function solarsail.util.functions.look_vector(yaw, pitch)
|
||||
return vector.new(
|
||||
-(math.sin(yaw) * math.cos(pitch)),
|
||||
-math.sin(pitch),
|
||||
math.cos(yaw) * math.cos(pitch)
|
||||
)
|
||||
end
|
||||
|
||||
function weapons.calc_block_damage(nodedef, weapon, target_pos, pointed)
|
||||
if nodedef == nil then
|
||||
return 0, "air", nil
|
||||
|
@ -15,7 +15,7 @@ weapons.player_list = {} -- Current game related data
|
||||
weapons.player_data = {} -- Save data and config
|
||||
weapons.is_reloading = {} -- This should be part of player_list
|
||||
weapons.default_eye_height = 1.57 -- Defaults
|
||||
weapons.default_first_person_eyes = vector.new(0, 0, 1.5)
|
||||
weapons.default_first_person_eyes = vector.new(0, 0, 1.2)
|
||||
weapons.default_modchannel = "battleforarkhos_" -- Defaults
|
||||
|
||||
-- Handle a one time file load at bootup to ensure data is properly loaded
|
||||
@ -187,7 +187,7 @@ function weapons.update_killfeed(player, dead_player, weapon, dist, headshot)
|
||||
" moderated ", " banhammered ", " 13373D ", " Flex Taped ",
|
||||
" cronched ", " destroyed ", " blown out ", " sawn ",
|
||||
" leeroy'd ", " inverted ", " forever boxed ", " fucky wucky'd ",
|
||||
" locked down ", " cringed ", " light theme'd", " I II II I_ ",
|
||||
" locked down ", " cringed ", " light theme'd ", " I II II I_ ",
|
||||
" vaccinated ", " VAC banned "
|
||||
}
|
||||
local special_verbs = { "'s Ankha killed " }
|
||||
@ -232,7 +232,7 @@ function weapons.handle_damage(weapon, player, target_player, dist, pointed)
|
||||
local pname = player:get_player_name()
|
||||
local tname = target_player:get_player_name()
|
||||
if weapons.player_list[tname].hp == nil then return end
|
||||
local new_hp = weapons.player_list[tname].hp
|
||||
local new_hp = (weapons.player_list[tname].hp + 0)
|
||||
local is_headshot = false
|
||||
|
||||
if pointed == nil then -- Exposions, bullet magnetism are ineligible for headshots
|
||||
@ -265,16 +265,15 @@ function weapons.handle_damage(weapon, player, target_player, dist, pointed)
|
||||
if weapon._heals == nil then
|
||||
elseif weapon._heals > 0 then
|
||||
if weapons.player_list[pname].team ==
|
||||
weapons.player_list[tname].team then
|
||||
if weapons.player_list[tname].hp <
|
||||
weapons.player_list[tname].hp_max * 1.25 then
|
||||
new_hp = weapons.player_list[tname].hp + weapon._heals
|
||||
else
|
||||
new_hp = weapons.player_list[tname].hp_max
|
||||
weapons.player_list[tname].team then
|
||||
|
||||
new_hp = weapons.player_list[tname].hp + weapon._heals
|
||||
if new_hp > weapons.player_list[tname].creator.hp * 1.25 then
|
||||
new_hp = weapons.player_list[tname].creator.hp * 1.25
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
print(new_hp)
|
||||
if weapons.player_list[pname].team ~=
|
||||
weapons.player_list[tname].team then
|
||||
if new_hp < 1 then
|
||||
@ -290,17 +289,22 @@ function weapons.handle_damage(weapon, player, target_player, dist, pointed)
|
||||
end
|
||||
minetest.sound_play("player_impact", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.85})
|
||||
elseif pname == tname then
|
||||
if new_hp < 1 then
|
||||
weapons.kill_player(player, player, weapon, dist, false)
|
||||
minetest.sound_play("player_impact", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.85})
|
||||
else
|
||||
weapons.player_list[tname].hp = new_hp
|
||||
end
|
||||
else
|
||||
if weapon._heals == nil then return
|
||||
elseif weapons.player_list[pname].team ==
|
||||
weapons.player_list[tname].team then
|
||||
if weapon._heals == nil then
|
||||
if pname == tname then
|
||||
if new_hp < 1 then
|
||||
weapons.kill_player(player, target_player, weapon, dist, false)
|
||||
minetest.sound_play("player_impact", {pos=target_player:get_pos(),
|
||||
max_hear_distance=6, gain=0.85})
|
||||
else
|
||||
weapons.player_list[tname].hp = new_hp
|
||||
end
|
||||
end
|
||||
else
|
||||
if new_hp < 1 then
|
||||
new_hp = 1
|
||||
end
|
||||
weapons.player_list[tname].hp = new_hp
|
||||
weapons.hud.render_hitmarker(player, true)
|
||||
minetest.sound_play("hitsound", {to_player=pname})
|
||||
@ -382,6 +386,7 @@ dofile(minetest.get_modpath("weapons").."/weapons/light_machine_gun.lua")
|
||||
-- Exotic (Treated as Primary Slot)
|
||||
dofile(minetest.get_modpath("weapons").."/weapons/rocketry.lua")
|
||||
dofile(minetest.get_modpath("weapons").."/weapons/minigun.lua")
|
||||
dofile(minetest.get_modpath("weapons").."/weapons/big_shot.lua")
|
||||
|
||||
-- Secondary
|
||||
dofile(minetest.get_modpath("weapons").."/weapons/boringpistol.lua")
|
||||
|
@ -383,6 +383,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
end
|
||||
weapons.creator.creator_to_class(player, pname)
|
||||
elseif fields.quit == "true" then
|
||||
-- Prevent escaping newly joined playerse
|
||||
if weapons.player_list[pname].texture == nil then
|
||||
minetest.after(0.06, weapons.creator.display_formspec, pname, player, fields)
|
||||
else
|
||||
@ -399,10 +400,8 @@ local function clear_inv(player)
|
||||
p_inv:set_list("main", {})
|
||||
p_inv:set_list("craft", {})
|
||||
end
|
||||
|
||||
weapons.clear_inv = clear_inv
|
||||
|
||||
|
||||
local function add_class_items(player, class_items)
|
||||
local items = class_items or base_class.items
|
||||
local p_inv = player:get_inventory()
|
||||
@ -458,7 +457,7 @@ local function set_ammo(player, class_items)
|
||||
weapons.player_list[pname][weapon._ammo_type .. "_max"] = weapon._mag
|
||||
weapons.player_list[pname][weapon._ammo_type .. "_energy"] = false
|
||||
elseif weapon._is_energy then
|
||||
weapons.player_list[pname][weapon._ammo_type] = 0
|
||||
weapons.player_list[pname][weapon._ammo_type] = 1
|
||||
weapons.player_list[pname][weapon._ammo_type .. "_max"] = 100
|
||||
weapons.player_list[pname][weapon._ammo_type .. "_energy"] = true
|
||||
else
|
||||
@ -475,7 +474,6 @@ local function set_ammo(player, class_items)
|
||||
weapons.player_list[pname].fatigue_max = 100
|
||||
end
|
||||
|
||||
|
||||
function weapons.get_tex_size(file) -- ported from a fork
|
||||
local file = io.open(file)
|
||||
if file then
|
||||
@ -541,8 +539,8 @@ weapons.set_ammo = set_ammo
|
||||
|
||||
local function set_health(player, class)
|
||||
local pname = player:get_player_name()
|
||||
weapons.player_list[pname].hp = base_class.stats.hp
|
||||
weapons.player_list[pname].hp_max = base_class.stats.hp
|
||||
weapons.player_list[pname].hp = weapons.player_list[pname].creator.hp
|
||||
weapons.player_list[pname].hp_max = weapons.player_list[pname].creator.hp
|
||||
weapons.hud.force_hp_refresh(player)
|
||||
end
|
||||
|
||||
@ -749,8 +747,8 @@ minetest.register_globalstep(function(dtime)
|
||||
local pname = player:get_player_name()
|
||||
local wield = player:get_wielded_item():get_name()
|
||||
local weapon = minetest.registered_nodes[wield]
|
||||
local ppitch = -math.deg(player:get_look_vertical())
|
||||
if true then -- Legs/Body, Head anim; foldable for your viewing pleasure
|
||||
local ppitch = -math.deg(player:get_look_vertical())
|
||||
local frame_offset = 0
|
||||
local anim_group
|
||||
if look_pitch[pname] ~= ppitch then
|
||||
@ -781,21 +779,37 @@ minetest.register_globalstep(function(dtime)
|
||||
look_pitch[pname] = ret_pitch+0
|
||||
end
|
||||
else
|
||||
-- Prevent arm rotations when the entity doesn't
|
||||
-- exist
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
-- Prevent arm rotations when the entity doesn't
|
||||
-- exist
|
||||
-- Prevent rotations when reloading
|
||||
if weapons.is_reloading[pname][wield] then
|
||||
else
|
||||
if ppitch > weapon._max_arm_angle then
|
||||
ppitch = weapon._max_arm_angle
|
||||
elseif ppitch < weapon._min_arm_angle then
|
||||
ppitch = weapon._min_arm_angle
|
||||
end
|
||||
-- if ppitch > weapon._max_arm_angle then
|
||||
-- ppitch = weapon._max_arm_angle
|
||||
-- elseif ppitch < weapon._min_arm_angle then
|
||||
-- ppitch = weapon._min_arm_angle
|
||||
-- end
|
||||
--Manually control arms bone here
|
||||
local bpos = arms_pos
|
||||
if weapon._arms.pos ~= nil then
|
||||
bpos = weapon._arms.pos
|
||||
end
|
||||
|
||||
-- Drumfill sounds
|
||||
if weapon._arms.ph ~= nil then
|
||||
local ph
|
||||
-- Blend between arm states
|
||||
if ppitch < 0 then
|
||||
local pf = solarsail.util.functions.remap(ppitch, -90, 0, 0, 1)
|
||||
ph = solarsail.util.functions.lerp_vectors(weapon._arms.ph.min, weapon._arms.ph.center, pf)
|
||||
else
|
||||
local pf = solarsail.util.functions.remap(ppitch, 0, 90, 0, 1)
|
||||
ph = solarsail.util.functions.lerp_vectors(weapon._arms.ph.center, weapon._arms.ph.max, pf)
|
||||
end
|
||||
|
||||
bpos = ph
|
||||
end
|
||||
weapons.player_arms[pname]:set_bone_position(
|
||||
"Armature_Root",
|
||||
bpos,
|
||||
@ -889,6 +903,16 @@ minetest.register_globalstep(function(dtime)
|
||||
if weapon == nil then
|
||||
else
|
||||
local ammo = weapon._ammo_type
|
||||
local anim_test = false
|
||||
local loop_anim = true
|
||||
if weapon._fire_mode == "semi" and not solarsail.controls.player_last[pname].LMB then
|
||||
anim_test = true
|
||||
loop_anim = false
|
||||
elseif weapon._fire_mode == "auto" then
|
||||
anim_test = true
|
||||
elseif weapon._fire_mode == nil then
|
||||
anim_test = true
|
||||
end
|
||||
if weapon._anim == nil then
|
||||
elseif arm_frame[pname] == -1 then
|
||||
if weapons.is_reloading[pname][wield] == nil then
|
||||
@ -905,38 +929,51 @@ minetest.register_globalstep(function(dtime)
|
||||
arm_type[pname] = "reload_alt"
|
||||
arm_after[pname] = minetest.after((weapon._reload*0.9), unlock_arms, pname, weapon)
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
|
||||
weapons.player_arms[pname]:set_animation(weapon._anim.reload_alt, 60, 0.15, true)
|
||||
end
|
||||
end
|
||||
elseif solarsail.controls.player[pname].RMB then -- Handle aiming
|
||||
if solarsail.controls.player[pname].LMB then
|
||||
if weapons.player_list[pname][ammo] > 0 or ammo == "blocks" then
|
||||
arm_frame[pname] = 0
|
||||
arm_type[pname] = "aim_fire"
|
||||
arm_after[pname] = minetest.after((60 / weapon._rpm), unlock_arms, pname, weapon)
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
weapons.player_arms[pname]:set_animation(weapon._anim.aim_fire, 60, 0.15, true)
|
||||
if solarsail.controls.player[pname].LMB and
|
||||
((weapon._fire_mode == "semi" and not solarsail.controls.player_last[pname].LMB) or
|
||||
(weapon._fire_mode == "auto" or weapon._fire_mode == nil)) then -- Handle firing
|
||||
if weapons.player_list[pname][ammo] > 0 then
|
||||
if anim_test then
|
||||
arm_frame[pname] = 0
|
||||
arm_type[pname] = "aim_fire"
|
||||
arm_after[pname] = minetest.after((60 / weapon._rpm), unlock_arms, pname, weapon)
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
local anim = weapon._anim.aim_fire
|
||||
weapons.player_arms[pname]:set_animation(anim, 60, 0.15, loop_anim)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
else -- Idle
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
weapons.player_arms[pname]:set_animation(weapon._anim.aim, 60, 0.15, true)
|
||||
local anim = weapon._anim.aim
|
||||
weapons.player_arms[pname]:set_animation(anim, 60, 0.15, true)
|
||||
end
|
||||
end
|
||||
else
|
||||
if solarsail.controls.player[pname].LMB then
|
||||
if weapons.player_list[pname][ammo] > 0 or ammo == "blocks" then
|
||||
arm_frame[pname] = 0
|
||||
arm_type[pname] = "idle_fire"
|
||||
arm_after[pname] = minetest.after((60 / weapon._rpm), unlock_arms, pname, weapon)
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
weapons.player_arms[pname]:set_animation(weapon._anim.idle_fire, 60, 0.15, true)
|
||||
else -- Idle
|
||||
if solarsail.controls.player[pname].LMB and
|
||||
((weapon._fire_mode == "semi" and not solarsail.controls.player_last[pname].LMB) or
|
||||
(weapon._fire_mode == "auto" or weapon._fire_mode == nil)) then -- Handle firing
|
||||
if weapons.player_list[pname][ammo] > 0 then
|
||||
if anim_test then
|
||||
arm_frame[pname] = 0
|
||||
arm_type[pname] = "idle_fire"
|
||||
arm_after[pname] = minetest.after((60 / weapon._rpm), unlock_arms, pname, weapon)
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
local anim = weapon._anim.idle_fire
|
||||
weapons.player_arms[pname]:set_animation(anim, 60, 0.15, loop_anim)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
else -- Idle
|
||||
arm_type[pname] = "idle"
|
||||
if weapons.player_arms[pname] ~= nil then
|
||||
weapons.player_arms[pname]:set_animation(weapon._anim.idle, 60, 0.15, true)
|
||||
local anim = weapon._anim.idle
|
||||
weapons.player_arms[pname]:set_animation(anim, 60, 0.15, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -6,8 +6,8 @@ local day_sky = "#c5b7ea"
|
||||
local day_horizon = "#f0ecff"
|
||||
local dawn_sky = "#bf9bb4"
|
||||
local dawn_horizon = "#dec6d7"
|
||||
local night_sky = "#5400ff"
|
||||
local night_horizon = "#4f2a9b"
|
||||
local night_sky = "#030015"
|
||||
local night_horizon = "#100033"
|
||||
local sun_tint = "#dbbae7"
|
||||
local moon_tint = "#d37dff"
|
||||
|
||||
|
BIN
mods/weapons/textures/crosshairs/crosshair001.png
Normal file
After Width: | Height: | Size: 232 B |
BIN
mods/weapons/textures/crosshairs/crosshair002.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
mods/weapons/textures/crosshairs/crosshair003.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
mods/weapons/textures/crosshairs/crosshair004.png
Normal file
After Width: | Height: | Size: 274 B |
BIN
mods/weapons/textures/crosshairs/crosshair005.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
mods/weapons/textures/crosshairs/crosshair006.png
Normal file
After Width: | Height: | Size: 241 B |
BIN
mods/weapons/textures/crosshairs/crosshair007.png
Normal file
After Width: | Height: | Size: 191 B |
BIN
mods/weapons/textures/crosshairs/crosshair008.png
Normal file
After Width: | Height: | Size: 291 B |
BIN
mods/weapons/textures/crosshairs/crosshair009.png
Normal file
After Width: | Height: | Size: 194 B |
BIN
mods/weapons/textures/crosshairs/crosshair010.png
Normal file
After Width: | Height: | Size: 300 B |
BIN
mods/weapons/textures/crosshairs/crosshair011.png
Normal file
After Width: | Height: | Size: 192 B |
BIN
mods/weapons/textures/crosshairs/crosshair012 2.png
Normal file
After Width: | Height: | Size: 192 B |
BIN
mods/weapons/textures/crosshairs/crosshair013.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
mods/weapons/textures/crosshairs/crosshair014.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
mods/weapons/textures/crosshairs/crosshair015.png
Normal file
After Width: | Height: | Size: 327 B |
BIN
mods/weapons/textures/crosshairs/crosshair016.png
Normal file
After Width: | Height: | Size: 319 B |
BIN
mods/weapons/textures/crosshairs/crosshair017.png
Normal file
After Width: | Height: | Size: 411 B |
BIN
mods/weapons/textures/crosshairs/crosshair018.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
mods/weapons/textures/crosshairs/crosshair019.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
mods/weapons/textures/crosshairs/crosshair020.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
mods/weapons/textures/crosshairs/crosshair021.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
mods/weapons/textures/crosshairs/crosshair022.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
mods/weapons/textures/crosshairs/crosshair023.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
mods/weapons/textures/crosshairs/crosshair024.png
Normal file
After Width: | Height: | Size: 300 B |
BIN
mods/weapons/textures/crosshairs/crosshair025.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
mods/weapons/textures/crosshairs/crosshair026.png
Normal file
After Width: | Height: | Size: 333 B |
BIN
mods/weapons/textures/crosshairs/crosshair027.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
mods/weapons/textures/crosshairs/crosshair028.png
Normal file
After Width: | Height: | Size: 415 B |
BIN
mods/weapons/textures/crosshairs/crosshair029.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
mods/weapons/textures/crosshairs/crosshair030.png
Normal file
After Width: | Height: | Size: 333 B |
BIN
mods/weapons/textures/crosshairs/crosshair031.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
mods/weapons/textures/crosshairs/crosshair032.png
Normal file
After Width: | Height: | Size: 423 B |
BIN
mods/weapons/textures/crosshairs/crosshair033.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
mods/weapons/textures/crosshairs/crosshair034.png
Normal file
After Width: | Height: | Size: 417 B |
BIN
mods/weapons/textures/crosshairs/crosshair035.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
mods/weapons/textures/crosshairs/crosshair036.png
Normal file
After Width: | Height: | Size: 663 B |
BIN
mods/weapons/textures/crosshairs/crosshair037.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
mods/weapons/textures/crosshairs/crosshair038.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
mods/weapons/textures/crosshairs/crosshair039.png
Normal file
After Width: | Height: | Size: 384 B |
BIN
mods/weapons/textures/crosshairs/crosshair040.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
mods/weapons/textures/crosshairs/crosshair041.png
Normal file
After Width: | Height: | Size: 394 B |
BIN
mods/weapons/textures/crosshairs/crosshair042.png
Normal file
After Width: | Height: | Size: 358 B |
BIN
mods/weapons/textures/crosshairs/crosshair043.png
Normal file
After Width: | Height: | Size: 501 B |
BIN
mods/weapons/textures/crosshairs/crosshair044.png
Normal file
After Width: | Height: | Size: 562 B |
BIN
mods/weapons/textures/crosshairs/crosshair045.png
Normal file
After Width: | Height: | Size: 576 B |
BIN
mods/weapons/textures/crosshairs/crosshair046.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
mods/weapons/textures/crosshairs/crosshair047.png
Normal file
After Width: | Height: | Size: 586 B |
BIN
mods/weapons/textures/crosshairs/crosshair048.png
Normal file
After Width: | Height: | Size: 530 B |
BIN
mods/weapons/textures/crosshairs/crosshair049.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair050.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair051.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
mods/weapons/textures/crosshairs/crosshair052.png
Normal file
After Width: | Height: | Size: 805 B |
BIN
mods/weapons/textures/crosshairs/crosshair053.png
Normal file
After Width: | Height: | Size: 816 B |
BIN
mods/weapons/textures/crosshairs/crosshair054.png
Normal file
After Width: | Height: | Size: 660 B |
BIN
mods/weapons/textures/crosshairs/crosshair055.png
Normal file
After Width: | Height: | Size: 540 B |
BIN
mods/weapons/textures/crosshairs/crosshair056.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
mods/weapons/textures/crosshairs/crosshair057.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
mods/weapons/textures/crosshairs/crosshair058.png
Normal file
After Width: | Height: | Size: 540 B |
BIN
mods/weapons/textures/crosshairs/crosshair059.png
Normal file
After Width: | Height: | Size: 370 B |
BIN
mods/weapons/textures/crosshairs/crosshair060.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
mods/weapons/textures/crosshairs/crosshair061.png
Normal file
After Width: | Height: | Size: 1012 B |
BIN
mods/weapons/textures/crosshairs/crosshair062.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair063.png
Normal file
After Width: | Height: | Size: 1001 B |
BIN
mods/weapons/textures/crosshairs/crosshair064.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair065.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair066.png
Normal file
After Width: | Height: | Size: 852 B |
BIN
mods/weapons/textures/crosshairs/crosshair067.png
Normal file
After Width: | Height: | Size: 976 B |
BIN
mods/weapons/textures/crosshairs/crosshair068.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair069.png
Normal file
After Width: | Height: | Size: 805 B |
BIN
mods/weapons/textures/crosshairs/crosshair070.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
mods/weapons/textures/crosshairs/crosshair071.png
Normal file
After Width: | Height: | Size: 200 B |
BIN
mods/weapons/textures/crosshairs/crosshair072.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
mods/weapons/textures/crosshairs/crosshair073.png
Normal file
After Width: | Height: | Size: 542 B |
BIN
mods/weapons/textures/crosshairs/crosshair074.png
Normal file
After Width: | Height: | Size: 551 B |
BIN
mods/weapons/textures/crosshairs/crosshair075.png
Normal file
After Width: | Height: | Size: 1010 B |
BIN
mods/weapons/textures/crosshairs/crosshair076.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair077.png
Normal file
After Width: | Height: | Size: 1008 B |
BIN
mods/weapons/textures/crosshairs/crosshair078.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair079.png
Normal file
After Width: | Height: | Size: 986 B |
BIN
mods/weapons/textures/crosshairs/crosshair080.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair081.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair082.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair083.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
mods/weapons/textures/crosshairs/crosshair084.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
mods/weapons/textures/crosshairs/crosshair085.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
mods/weapons/textures/crosshairs/crosshair086.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
mods/weapons/textures/crosshairs/crosshair087.png
Normal file
After Width: | Height: | Size: 458 B |
BIN
mods/weapons/textures/crosshairs/crosshair088.png
Normal file
After Width: | Height: | Size: 368 B |
BIN
mods/weapons/textures/crosshairs/crosshair089.png
Normal file
After Width: | Height: | Size: 988 B |
BIN
mods/weapons/textures/crosshairs/crosshair090.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/weapons/textures/crosshairs/crosshair091.png
Normal file
After Width: | Height: | Size: 1009 B |
BIN
mods/weapons/textures/crosshairs/crosshair092.png
Normal file
After Width: | Height: | Size: 1.2 KiB |