whostand reports: we have an invisible chicken m ... #6063
Labels
No Label
1. kind/balancing
1. kind/breaking
1. kind/bug
1. kind/construction
1. kind/documentation
1. kind/enhancement
1. kind/griefing
1. kind/invalid
1. kind/meme
1. kind/node limit
1. kind/other
1. kind/protocol
2. prio/controversial
2. prio/critical
2. prio/elevated
2. prio/good first issue
2. prio/interesting
2. prio/low
3. source/art
3. source/client
3. source/engine
3. source/ingame
3. source/integration
3. source/lag
3. source/license
3. source/mod upstream
3. source/unknown
3. source/website
4. step/approved
4. step/at work
4. step/blocked
4. step/discussion
4. step/help wanted
4. step/needs confirmation
4. step/partially fixed
4. step/question
4. step/ready to deploy
4. step/ready to QA test
4. step/want approval
5. result/cannot reproduce
5. result/duplicate
5. result/fixed
5. result/maybe
5. result/wontfix
ugh/petz
ugh/QA main
ugh/QA NOK
ugh/QA OK
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#6063
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
whostand reports a bug:
Player position:
Player look:
Player information:
Player meta:
Log identifier
Profiler save:
Status:
Teleport command:
Compass command:
Ecklair had chickens there, they all disappeared but still make sounds if you stand in the right place.
That exact position is haunted with a chicken ghost XD
I checked walls with noclip - didn't see any mobs inside.
At the moment the ghost chicken is gone from that exact position...
It might be still present (and debuggable) on the testserver
on the test server, there are no loaded mobs within 1000 meters of the reported position, but i do hear chicken sounds. and a lot of footsteps?
i can't even get the code to recognize that rheo is there though, so something is deeply broken. i'm too tired, poke me to look at this again tomorrow or later.
Found them inside a dirt block, but stuck under a microblock, directly above this spot.
at 6467 28 2629
Wonder why they glitch through?
I've been looking into collision boxes for petz. Some of them have center/origin (what
get_pos()
returns) outside of the collision box. To me it seems wrong, but I'm not sure if the engine actually cares about it...Possibly related to bug #5788
I have put 10 hamsters, 10 bunnies and 10 lambs in the room where chickens were kept.
After lots teleporting away and back:
I wonder why? Just the velocity they bunnies can get? Maybe they can serialize/deserialize and keep moving while mapblock in not loaded yet / already unloaded or something?
petz like to teleport through the ceiling if they get too close to it - perhaps the bunnies just jump more?
Maybe the engine doesn't... But from what I can see petz logic actually cares about it... They can jump/walk to some place (mt is fine, bc there is no problem with the collisionbox). Then they realise "whops, the entity pos is inside a node" and teleport the entity up...
(I would also assume the chickens did not teleport out bc. petz though they would be in air?)
The bubble is where the
get_pos()
is:They always teleport up when they jump in this box with quarter slab floor:
And with this box (raised by 0.25):
they don't escape anymore and can sit/jump in a tight space:
(had to move the model up in blender so they don't look like they sink)
Basically, I would consider any entity that has a collision box
{x1, y,1 z1, x2, y2, z2}
wherey2 <= 0
to be sus/broken.Old upstream issue: https://github.com/runsy/petz/issues/133
added this info there:
https://github.com/runsy/petz/issues/133#issuecomment-1909273101
oh, this is something i'm actually well aware of - spawnit has to make sure to deal with such weird collision boxes (which is necessary but not difficult). i was very careful to make sure that mobs didn't spawn inside solid nodes or several nodes above solid ground.
possibly petz itself doesn't deal with such boxes well on its own, though, that seems very plausible.
Function
petz.check_ground_suffocation(self, pos)
:4f1967edf0/petz/brains/helper_functions.lua (L111)
Just gets result of
get_pos()
passed to it:4f1967edf0/petz/brains/br_herbivore.lua (L10)
4f1967edf0/petz/brains/br_herbivore.lua (L39)
Hope Runsy fixes it by moving collision boxes and models... (models lose animations when I just import/export b3d in blender, not sure why).
Original petz blender models are here: https://github.com/runsy/petz_raw
so we can fix this ourselves
such things are not sus/broken - code that assumes that
object:get_pos()
is the important value, and doesn't account for the collision box, is what's broken.Hm. Should we redefine object:get_pos() to the center of the collision box?
mmm. i don't think so - futil already has code to get the center of the collision extent of an entity, and the underlying code is not complicated.
i've got more to say on this subject, poke me again tomorrow. i'm asleep.
Exactly, it breaks certain assumptions (and this bug is a good example): where the object is? Oh wait, it's not at
object:get_pos()
, maybe it's even in a different mapblock.And maybe mapblock, where the object's "position" is has loaded, but the mapblock with object's collision box has not loaded yet. Could this be why they phase through stuff constatntly?
Having "origin" outside of the object bounds makes little sense... Maybe only if you're using it as a pivot for animating some weird rotation.
Ideally it should be consistent for all objects - corner of the box or it's center, etc. Then you can make some assumptions about them and get some use out of it for doing stuff like collision or physics... or just loading mapblocks.
Won't work magically, because there's no consistency in how collision boxes are defined and how pos is used.
I'm just saying we should keep this in mind, since this is probably not the only problem caused by "position" being outside of the object itself.
Real game engines have a similar problem. They need to define a pivot point, they need a point that is considered "where the entity touches the ground" and so on.
Also, nodes like "embedded" glass panes are probably breaking mob pathfinding. You could stop whole army by exploiting stuff that breaks assumptions in similar ways.
minetest pathfinding is pitifully oversimplified and weird mob collision boxes isn't even in my top 5 issues - if you could pass the collisionbox to the pathfinder, ideally it should be able to handle things properly. but it can't even deal with grass or water or nodeboxes currently, nor with mobs that are more than one node wide.