mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
safeguard pose/world data generation loops
This commit is contained in:
parent
59bbfcff27
commit
aeb582d61e
1 changed files with 103 additions and 89 deletions
|
|
@ -370,6 +370,8 @@ public class CharaDataGposeTogetherManager : DisposableMediatorSubscriberBase
|
|||
if (!_dalamudUtil.IsInGpose) continue;
|
||||
if (_usersInLobby.Count == 0) continue;
|
||||
|
||||
try
|
||||
{
|
||||
var chara = await _dalamudUtil.GetPlayerCharacterAsync().ConfigureAwait(false);
|
||||
if (_dalamudUtil.IsInGpose)
|
||||
{
|
||||
|
|
@ -399,6 +401,11 @@ public class CharaDataGposeTogetherManager : DisposableMediatorSubscriberBase
|
|||
if (poseData.IsDelta)
|
||||
_lastDeltaPoseData = poseData;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogWarning(ex, "Error during Pose Data Generation");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task GposeWorldPositionBackgroundTask(CancellationToken ct)
|
||||
|
|
@ -410,6 +417,8 @@ public class CharaDataGposeTogetherManager : DisposableMediatorSubscriberBase
|
|||
// if there are no players in lobby, don't do anything
|
||||
if (_usersInLobby.Count == 0) continue;
|
||||
|
||||
try
|
||||
{
|
||||
// get own player data
|
||||
var player = (Dalamud.Game.ClientState.Objects.Types.ICharacter?)(await _dalamudUtil.GetPlayerCharacterAsync().ConfigureAwait(false));
|
||||
if (player == null) continue;
|
||||
|
|
@ -484,6 +493,11 @@ public class CharaDataGposeTogetherManager : DisposableMediatorSubscriberBase
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogWarning(ex, "Error during World Data Generation");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCutsceneFrameworkUpdate()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue