You fix some, you brake some
This commit is contained in:
1 parent
d810ea00b6
commit
1a75cf8461
778 files changed
+203405
-86541
No files matched your search
@@ -43,26 +43,26 @@ namespace Code.OfficeGame.BattleMode.Snapshots
|
||||
|| !actionDataSnapshots.TryGetValue(entityId, out var battleActionData))
|
||||
continue;
|
||||
|
||||
bool actionChanged = false;
|
||||
|
||||
if (!actionDecisionResults.TryAdd(entityId, actionDecisionResult))
|
||||
{
|
||||
actionChanged = actionDecisionResult.ActionType
|
||||
!= actionDecisionResults[entityId].ActionType;
|
||||
|
||||
if (actionChanged)
|
||||
// bool actionChanged = false;
|
||||
//
|
||||
// if (!actionDecisionResults.TryAdd(entityId, actionDecisionResult))
|
||||
// {
|
||||
// actionChanged = actionDecisionResult.ActionType
|
||||
// != actionDecisionResults[entityId].ActionType;
|
||||
//
|
||||
// // if (actionChanged)
|
||||
actionDecisionResults[entityId] = actionDecisionResult.GetSnapshot();
|
||||
else
|
||||
actionDecisionResults[entityId]?.RestoreSnapshot(actionDecisionResult);
|
||||
}
|
||||
|
||||
if (!battleActionDatas.TryAdd(entityId, battleActionData))
|
||||
{
|
||||
if (actionChanged)
|
||||
// else
|
||||
// actionDecisionResults[entityId]?.RestoreSnapshot(actionDecisionResult);
|
||||
// }
|
||||
//
|
||||
// if (!battleActionDatas.TryAdd(entityId, battleActionData))
|
||||
// {
|
||||
// if (actionChanged)
|
||||
battleActionDatas[entityId] = battleActionData.GetSnapshot();
|
||||
else
|
||||
battleActionDatas[entityId]?.RestoreSnapshot(battleActionData);
|
||||
}
|
||||
// else
|
||||
// battleActionDatas[entityId]?.RestoreSnapshot(battleActionData);
|
||||
// }
|
||||
|
||||
entity.RestoreSnapshot(entitySnapshots[entityId]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user