EVENT FAKEDOMOVETHINGS: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
NOTE: This event is currently unused in modern EDuke32, but still serves a purpose in EDuke32-OldMP.
NOTE: This event is currently unused by modern EDuke32, but still serves a purpose with [[NetDuke32]].
 
Edit 03. August 2021: In NetDuke32, this event is once again unused and hence deprecated.


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.
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.
Line 29: Line 31:


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.
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.
[[Category:Events]]

Latest revision as of 19:41, 14 June 2022

NOTE: This event is currently unused by modern EDuke32, but still serves a purpose with NetDuke32.

Edit 03. August 2021: In NetDuke32, this event is once again unused and hence deprecated.

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.