-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VFE Ability issues with (primarily) async time (#431)
The issues are the most problematic with async time enabled. However, it is possible that world time or time on specific maps can "desync" from the rest - in which case those issues would appear even when async time is disabled. Below is a more detailed list of changes. However, to simplify it - this should fix the bug where using a VFE ability would cause an incorrect cooldown to be applied, as well as cooldown changing when travelling between maps. Patching utilities: - Running SetupAsyncTime will also register extra fields needed to access async map comp and some of its fields - Previously it would only access MultiplayerGameComp to check if async was enabled or not - Async time section now includes TimeSnapshot struct - It is the same struct as in MP with slight modifications, as it was easier to operate on it without reflection - Added a timestamp fixer section - It uses a specific method and a type to register a delegate that MP will use to fix timestamps Vanilla Expanded Framework: - Fixed abilities getting incorrect cooldown duration when used - VFECore.Abilities.Ability:GetGizmo will use time snapshot to make gizmos use correct time in constructor, as this is where most gizmos determine if the gizmo is enabled/disabled - VFECore.Abilities.Command_Ability:GizmoOnGUIInt will use time snapshot to use correct time when drawing, as this is where the tooltip to display remaining cooldown duration is created - Added a timestamp fixer for every ability, fixing issues where cooldown would change when travelling between maps - It currently is not possible to register implicit timestamp fixers, so each non-abstract ability type needs to have it registered Vanilla Factions Expanded - Pirates: - VFEPirates.CommandAbilityToggle:GizmoOnGUIInt also receives the time snapshot patch - This is needed as this type is a subtype of Verse.Command_Toggle, and not VFECore.Abilities.Command_Ability
- Loading branch information
1 parent
6b591a1
commit c75b312
Showing
3 changed files
with
265 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters