EVENT FAKEDOMOVETHINGS

From EDukeWiki
Jump to navigation Jump to search

NOTE: This event is currently unused in modern EDuke32, but still serves a purpose in EDuke32-OldMP.

EVENT_FAKEDOMOVETHINGS is called whenever the game tries to predict the player's movement and position during netplay. This event can be used to predict movement in your own mods. For example, it could be used to predict movement for jump pads, low gravity sectors, or custom conveyor belt sector types.

THISACTOR is the current player.

Relevant gamevars:

   myx - Current predicted x position
   myy - Current predicted y position
   myz - Current predicted z position
   myxvel - Current predicted x velocity
   myyvel - Current predicted y velocity
   myzvel - Current predicted z velocity
   myang - Current predicted angle
   mycursectnum - Predicted sector number
   myhardlanding - Predicted hard landing
   myhoriz - Current predicted view pitch
   myhorizoff - Current predicted slope-offset view pitch 
   myjumpingcounter - Predicted jumping counter
   myjumpingtoggle - Predicted jumping toggle
   myonground - Predicted "on ground" state
   myreturntocenter - Predicted "return to center" counter
   omyx - Last predicted x position
   omyy - Last predicted y position
   omyz - Last predicted z position
   omyang - Last predicted angle
   omyhoriz - Last predicted view pitch
   omyhorizoff - Last predicted slope-offset view pitch

Best practice is to replicate the exact conditions and behavior that would result in the player being moved, using these vars instead of the usual player structure members.