Posts: 91
Threads: 6
Joined: Dec 2012
Thanks: 1
Given 4 thank(s) in 3 post(s)
I finished the head yaw a couple of days ago. Now, I am working on getting the physics corrected at least for mobs. I am seeing that the MCServer and the client are out of sync when the mob is moving, so the mob jumps almost a full block forward when the server sends the teleport packet to force a sync.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
That might be because the velocity is sent in wrong units?
Posts: 91
Threads: 6
Joined: Dec 2012
Thanks: 1
Given 4 thank(s) in 3 post(s)
Could be, but I am not seeing jumps when the Relative Move is sent. Mmmm, I'm going to disable the velocity to see how the relative move is doing.
Posts: 91
Threads: 6
Joined: Dec 2012
Thanks: 1
Given 4 thank(s) in 3 post(s)
04-10-2013, 03:52 PM
(This post was last modified: 04-10-2013, 03:52 PM by keyboard.)
So, I am working on the physics function, and I am thinking of having the gravity constant as a value in the cWorld class that can be tweaked in the world.ini. This way we can have worlds with different gravity values. What do you guys think?
Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
Ooh sounds interesting. I'd say yesm as long as it doesn't bean re-reading the value every time gravity is calculated.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Adding the parameter will actually take some time, maybe a week, so if that timeframe is still okay with you, I'll go ahead.
It's not only about adding the parameter, it also involves moving the tick call to within the chunks, and hence the individual chunks will own the entities, unlike now, when they are owned by the cWorld. I'm not even sure if cWorld will have a list of all entities. So the change is quite profound. Still, it would be wise to do it before you touch any actual physics code too much - as you said, access to the cChunk will be quite beneficial there.