Read observed target contacts only from daemon
This commit is contained in:
parent
be3cb4e41a
commit
ff4916df26
2 changed files with 7 additions and 8 deletions
|
|
@ -7829,7 +7829,10 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"foreach (var entity in DockedEntity.Children)",
|
||||
"CurrentEntity != null && CurrentEntity.Parent == null",
|
||||
"CurrentEntity !=null && CurrentEntity.Parent==null",
|
||||
"CurrentEntity == null || CurrentEntity.Parent != null"
|
||||
"CurrentEntity == null || CurrentEntity.Parent != null",
|
||||
"return observer?.Target.Value;",
|
||||
"observer.EntityInfoGathered.TryGetValue(target, out var infoGathered)",
|
||||
"return target != null && target.IsHostileTo(observer);"
|
||||
};
|
||||
|
||||
var forbiddenGameplayHits = forbiddenGameplaySymbols
|
||||
|
|
|
|||
|
|
@ -3236,7 +3236,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
return targetEntity;
|
||||
}
|
||||
|
||||
return observer?.Target.Value;
|
||||
return null;
|
||||
}
|
||||
|
||||
private float GetObservedInfoGathered(Entity observer, Entity target)
|
||||
|
|
@ -3244,11 +3244,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
if (TryQueryDaemonEntityContact(observer, target, out var contact))
|
||||
return (float)contact.InfoGathered;
|
||||
|
||||
return observer != null &&
|
||||
target != null &&
|
||||
observer.EntityInfoGathered.TryGetValue(target, out var infoGathered)
|
||||
? infoGathered
|
||||
: 0f;
|
||||
return 0f;
|
||||
}
|
||||
|
||||
private bool IsObservedHostileContact(Entity observer, Entity target)
|
||||
|
|
@ -3256,7 +3252,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
if (TryQueryDaemonEntityContact(observer, target, out var contact))
|
||||
return contact.Hostile;
|
||||
|
||||
return target != null && target.IsHostileTo(observer);
|
||||
return false;
|
||||
}
|
||||
|
||||
private void ReconcileVisibleTargetIndicators()
|
||||
|
|
|
|||
Loading…
Reference in a new issue