EVENT FAKEDOMOVETHINGS

From EDukeWiki
Revision as of 14:46, 9 September 2018 by StrikerTheHedgefox (talk | contribs) (Created page with "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 p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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. Could be used to predict movement for jump pads, or low gravity sectors, for example.

THISACTOR is the current player.

Relevant gamevars:

   myx - Current predicted x position
   myy - Current predicted y position
   myz - Current predicted z position
   omyx - Last predicted x position
   omyy - Last predicted y position
   omyz - Last 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
   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.