Moving physics from Tick to HandlePhysics
#14
T-sigerw, can you paste the code inside shcode=cpp instead of raw code tags? The scrolling is bad.

(btw, I'd appreciate if you didn't maul my name)

The HandlePhysics function needs to be structured into logical blocks, something like this:
1. Check if the coords are inside world (Y within 0 .. 255); if not, only call the superclass' handling so that the minecart falls / takes void damage
2. Check if the block is rails. If not, only call the superclass' handling
3. (On a rail) Apply rail physics.

It might even be beneficial to split the "Apply rail physics" into a separate function, for clarity.
Reply
Thanks given by:


Messages In This Thread
RE: Moving physics from Tick to HandlePhysics - by xoft - 08-31-2013, 08:43 PM



Users browsing this thread: 1 Guest(s)