From 8053cc60ec4ff0ae1a6e7394308028f4ad2cb8ab Mon Sep 17 00:00:00 2001 From: githubawn <115191165+githubawn@users.noreply.github.com> Date: Mon, 13 Apr 2026 16:25:01 +0200 Subject: [PATCH 1/6] Decouple projectile logic position from visual render update --- .../GameEngine/Include/Common/GameEngine.h | 3 ++ .../GameEngine/Include/GameClient/Drawable.h | 4 ++ .../GameLogic/Module/DumbProjectileBehavior.h | 2 + .../GameLogic/Module/NeutronMissileUpdate.h | 2 + .../Include/GameLogic/Module/UpdateModule.h | 1 + .../GameEngine/Source/GameClient/Drawable.cpp | 38 +++++++++++++++++++ .../Behavior/DumbProjectileBehavior.cpp | 13 +++++++ .../Object/Update/NeutronMissileUpdate.cpp | 13 +++++++ 8 files changed, 76 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GameEngine.h b/GeneralsMD/Code/GameEngine/Include/Common/GameEngine.h index f86fd8d38e5..2e012b597f7 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GameEngine.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GameEngine.h @@ -101,6 +101,9 @@ class GameEngine : public SubsystemInterface Bool m_quitting; ///< true when we need to quit the game Bool m_isActive; ///< app has OS focus. + +public: + Real getLogicTimeAccumulator() const { return m_logicTimeAccumulator; } }; inline void GameEngine::setQuitting( Bool quitting ) { m_quitting = quitting; } diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h index e0e4707f93c..75e0e665c80 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h @@ -48,6 +48,7 @@ class DrawModule; class ClientUpdateModule; class View; class Locomotor; +class ProjectileUpdateInterface; class Anim2D; class Shadow; class ModuleInfo; @@ -652,6 +653,7 @@ class Drawable : public Thing, private: const Locomotor* getLocomotor() const; + void applySubFrameExtrapolation(ProjectileUpdateInterface* pui); // note, these are lazily allocated! TintEnvelope* m_selectionFlashEnvelope; ///< used for selection flash, works WITH m_colorTintEnvelope @@ -711,6 +713,7 @@ class Drawable : public Thing, Matrix3D m_instance; ///< The instance matrix that holds the initial/default position & orientation Real m_instanceScale; ///< the uniform scale factor applied to the instance matrix before it is sent to W3D. + Matrix3D m_visualExtrapolationMtx; ///< Decoupled visual glide matrix DrawableInfo m_drawableInfo; ///< structure pointed to by W3D render objects so they know which drawable they belong to. @@ -730,6 +733,7 @@ class Drawable : public Thing, Bool m_hiddenByStealth; ///< drawable is hidden due to stealth Bool m_instanceIsIdentity; ///< If true, instance matrix can be skipped Bool m_drawableFullyObscuredByShroud; ///