OutlawByteStudios / Persistent-Kingdoms

Persistent Worlds Overhaul Mod for Mount and Blade Warband
Other
7 stars 7 forks source link

Ta 597 - Chair Sitting Bug Fix #598

Closed Saptortacus closed 5 years ago

Saptortacus commented 5 years ago

Still need to fix the scene prop in use system, the one that stops two people sitting in the same chair. Currently, it does not reset it when they move.

A reset after the agent's movement is not necessary. slot_scene_prop_sitting_agent is set when an agent uses the chair. When another attempts to use it, it is checked whether the agent in slot_scene_prop_sitting_agent is still animating sitting and on the chair positionally. This code can be seen in the function "def spr_chairs" in module_scene_props.py

Thomas-Smyth commented 5 years ago

I've cleaned up the function a little and checked over the things I was worried about.

Once this is tested on a server I'm happy for it to be merged.

Thomas-Smyth commented 5 years ago

From testing, it seems that as the client moves the agent they TP into the position. When the server moved them the clients don't know it is a TP and therefore animates them to that position as if they are walking, which makes the animation smoother.