fix 2
1. MaxTargets 现在严格生效(包含玩家候选) - 玩家先被加入候选后,会计入 selectedCount,达到上限后不再继续查敌人桶。 2. UseSimulationMovement/UseJobSimulation 战斗中不生效 - 在 SimulationWorld 的 setter 中增加 Battle 状态保护:战斗中调用会被忽略并打 warning。 - 在 ProcedureGame 暴露当前状态类型,供 SimulationWorld 判断。 3. AOE 结算不再依赖结算时刻的 Weapon.IsAttacking - 在 AOE query 入队时快照 source 活跃状态(武器用 IsAttacking)。 - Query 数据结构增加 SourceWasActiveAtQueryTime。 - 结算时使用该快照判定,并通过 AIUtility.PerformCollision(..., ignoreRuntimeState: true) 避免被实时状态误伤。
This commit is contained in:
@@ -159,6 +159,11 @@ namespace CustomUtility
|
||||
}
|
||||
|
||||
public static void PerformCollision(TargetableObject entity, EntityBase other)
|
||||
{
|
||||
PerformCollision(entity, other, false);
|
||||
}
|
||||
|
||||
public static void PerformCollision(TargetableObject entity, EntityBase other, bool ignoreRuntimeState)
|
||||
{
|
||||
if (entity == null || other == null)
|
||||
{
|
||||
@@ -204,7 +209,7 @@ namespace CustomUtility
|
||||
EnemyProjectile enemyProjectile = other as EnemyProjectile;
|
||||
if (enemyProjectile != null)
|
||||
{
|
||||
if (!enemyProjectile.IsActive) return;
|
||||
if (!ignoreRuntimeState && !enemyProjectile.IsActive) return;
|
||||
|
||||
ImpactData entityImpactData = entity.GetImpactData();
|
||||
ImpactData projectileImpactData = enemyProjectile.GetImpactData();
|
||||
@@ -224,7 +229,7 @@ namespace CustomUtility
|
||||
WeaponBase weapon = other as WeaponBase;
|
||||
if (weapon != null)
|
||||
{
|
||||
if (!weapon.IsAttacking) return;
|
||||
if (!ignoreRuntimeState && !weapon.IsAttacking) return;
|
||||
ImpactData entityImpactData = entity.GetImpactData();
|
||||
ImpactData weaponImpactData = weapon.GetImpactData();
|
||||
if (GetRelation(entityImpactData.Camp, weaponImpactData.Camp) == RelationType.Friendly)
|
||||
|
||||
Reference in New Issue
Block a user