mt-mods / homedecor_modpack

home decor
Other
2 stars 9 forks source link

Player not properly sitting inside of some `homedecor_seating` chairs #31

Closed Lazerbeak12345 closed 4 days ago

Lazerbeak12345 commented 2 years ago

When you sit on certain chairs, the player is standing, not sitting.

One such example is lrfurn:sofa:

image

Closes https://github.com/minetest-whynot/whynot-game/issues/84 Originally reported here: https://content.minetest.net/threads/2461/

S-S-X commented 2 years ago

Maybe also link to #29

wsor4035 commented 2 years ago

this isnt a bug, this is a feature request

wsor4035 commented 2 years ago

with https://github.com/mt-mods/homedecor_modpack/pull/28 probably the only way to do this is add per game/mod support for sitting, since thats handled by whatever player mod (such as player_api) the game is using

wsor4035 commented 2 years ago

additionally this will be non trival, due to multiple seating options, since currently homedecor is just moving any players that right click to the nodes actual pos, no attaching or anything. so you would need to figure out which part of the couch is being pointed at, check if a player is attached there already, etc.

Lazerbeak12345 commented 2 years ago

I'm honestly unsure how you see this as a feature request.

This also has nothing to do with making the mod game agnostic. That's a separate issue.

As for triviality, the player is already in the correct position, clearly (see photo above). So I don't see how that's related.

To keep us on topic, I'm just saying the animation needs to be the "sit" animation.

A simple way to do it would to just set their animation to the "sit" animation, and keep them in control of their rotation with camera controls. If that's too hard, then since the chair itself knows what way is forward, you can have it point there.


EDIT: I can see his perspective now - and share it. This is a feature request. The feature: put the player in "sit" and handle chair-undigging.

Lazerbeak12345 commented 2 years ago

Re-reading, I see that you are saying that you would have to add code to check if someone is already in the chair.

Does that mean that you aren't checking for that currently, and that is a problem anyway - my bug besides?

Lazerbeak12345 commented 2 years ago

Updated OP to include link to contetdb post that started this chain of events

Lazerbeak12345 commented 2 years ago

Dug a bit deeper.

Honestly I'm unsure how this ever got published without anyone noticing, since - as @S-S-X referenced - in #29 it was found that you can't even sit on some chairs.

One could argue that this is a feature request, as it requires more code to be written, but I think that it's still a bug. Chairs are made to be sat on. How one would publish a mod in any sort of "released" state without making sure that it meets the MVP at all is beyond me.

wsor4035 commented 2 years ago

Given how old homedecor is, it may not have been possible to have animations at the time it was written

wsor4035 commented 2 years ago

Re trivialities, players are always put In the root node positions, for sofas this will get complicated checking which seat they are pointed at, tracking which seat position they are in, etc. Single chairs are relatively easy

wsor4035 commented 2 years ago

Also, re this being a bug, I would define it as something being broken, causing changes or unintended regression, etc. At the end of the day it's semantics what its labeled as, this is something that should be addressed.

wsor4035 commented 2 years ago

Update: I have a solution for handling sofas, just now need to handle sitting animations if player api is present

wsor4035 commented 2 years ago

i pushed my sofa code https://github.com/mt-mods/homedecor_modpack/pull/28/commits/fdb7b55a819dfefd9db50549654e0fe5c9f3068b going to need to take into account what happens when the sofa is dug from under the people in it, storing and restoring physics overrides, handling attachments, what happens if a player leaves, etc

Lazerbeak12345 commented 2 years ago

That's a great solution. Love it so far.

wsor4035 commented 2 years ago

fyi, thats probably as far as ill go in that pr, as i want to get it finished up today hopefully. will revisit this issue afterwords

Lazerbeak12345 commented 2 years ago

Another example of a chair where the player is standing inside it instead of sitting is lrfurn:armchair

wsor4035 commented 6 days ago

with #28 probably the only way to do this is add per game/mod support for sitting, since thats handled by whatever player mod (such as player_api) the game is using

once https://github.com/mt-mods/xcompat/pull/41 is merged, should make game agnostic "sitting" trivial for this