Skip to content

Commit

Permalink
Make fire ball and dark ball a sprite. Fix a crash again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doloment authored and alek13 committed Jan 2, 2025
1 parent 113fd64 commit 6585f2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mods/lord/Core/projectiles/src/projectiles/entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ local function punch_target(projectile, target, damage_groups, remove_after_hit,
projectile.object:remove()
end

--- @param entity LuaEntity entity to check if it is a projectile
--- @param entity ObjectRef entity to check if it is a projectile
--- @return boolean true, if it is a projectile, or false
local function is_entity_projectile(entity)
if not entity then
if not entity or not entity:get_luaentity() then
return
end
local entity_name = entity:get_luaentity().name
Expand Down Expand Up @@ -110,7 +110,7 @@ end

-- Hit handling depending on target
--- @param projectile LuaEntity projectile entity
--- @param target LuaEntity target entity
--- @param target ObjectRef target entity
--- @param damage_groups table damage groups table (see Minetest API)
--- @param velocity vector projectile velocity
local function hit_handling(projectile, target, damage_groups, velocity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ return {
},
entity_reg = {
initial_properties = {
visual = "item",
wield_item = "lord_projectiles:fire_ball",
visual = "sprite",
textures = { "mobs_fireball.png" },
visual_size = vector.new(1, 1, 1),
},
max_speed = 40,
Expand Down Expand Up @@ -316,8 +316,8 @@ return {
},
entity_reg = {
initial_properties = {
visual = "item",
wield_item = "lord_projectiles:dark_ball",
visual = "sprite",
textures = { "lottmobs_darkball.png" },
visual_size = vector.new(1, 1, 1),
},
max_speed = 20,
Expand Down

0 comments on commit 6585f2c

Please sign in to comment.