-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
When using stu's classes mod, the game crashes in-world:
ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'classes' in callback environment_Step(): ...mods/late/effects.lua:563: attempt to index local 'table' (a number value)
ERROR[Main]: stack traceback:
ERROR[Main]: ...mods/late/effects.lua:563: in function 'set_physics_override'
ERROR[Main]: ...mods/classes/classes/classes.lua:49: in function 'update_player_visuals'
ERROR[Main]: ...mods/classes/classes/classes.lua:117: in function 'func'
ERROR[Main]: ...minetest.app/Contents/Resources/builtin/common/after.lua:18: in function <...minetest.app/Contents/Resources/builtin/common/after.lua:4>
ERROR[Main]: ...inetest.app/Contents/Resources/builtin/game/register.lua:419: in function <...inetest.app/Contents/Resources/builtin/game/register.lua:399>
ERROR[Main]: stack traceback:
I guess that "awful hack" isn't able to catch whatever classes is doing. 😉
Classes runs
minetest.after(1, function(player)
classes:update_player_visuals(player)
end, player)
on joining players, and update_player_visuals in itself does:
classes.update_player_visuals = function(self, player)
if not player then
return
end
local name = player:get_player_name()
local class = classes.class[name]
local properties = classes.properties[class]
local mesh = ""
local texture = properties.texture
mesh = mesh..properties.mesh
player:set_properties({
visual = "mesh",
mesh = mesh,
collisionbox = properties.collisionbox,
visual_size = {x=1, y=1},
})
if not has_skin_changer then
player:set_properties({textures={texture}})
end
local physics = properties.physics
player:set_physics_override(physics.speed, physics.jump, physics.gravity)
player:set_armor_groups(properties.armor_groups)
end
Seems to me that late and classes competes for player properties somehow. Can it be mitigated? Is classes the faulty mod in this case?
If they're really incompatible with each other I can just write my own class mod, but then how does LATE's core:physics work and how can I modify it?
Reactions are currently unavailable