EVENT FAKEDOMOVETHINGS: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
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..."
 
No edit summary
 
(5 intermediate revisions by 2 users 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]].


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.
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.
THISACTOR is the current player.
Line 9: Line 11:
     [[myy]] - Current predicted y position
     [[myy]] - Current predicted y position
     [[myz]] - Current predicted z 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
     [[myxvel]] - Current predicted x velocity
     [[myyvel]] - Current predicted y velocity
     [[myyvel]] - Current predicted y velocity
Line 24: Line 23:
     [[myonground]] - Predicted "on ground" state
     [[myonground]] - Predicted "on ground" state
     [[myreturntocenter]] - Predicted "return to center" counter
     [[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
     [[omyang]] - Last predicted angle
     [[omyhoriz]] - Last predicted view pitch
     [[omyhoriz]] - Last predicted view pitch
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.