Attack Boon Changes
This commit is contained in:
@@ -77,6 +77,7 @@ namespace ProjectM.Server
|
||||
bool isCharger = haveTick && netTime.ServerTick.IsValid && SystemAPI.HasComponent<LungeState>(entity);
|
||||
uint negatedForThisEntity = 0u;
|
||||
float total = 0f;
|
||||
int killerNetId = -1; // Phase 1.7: last player-sourced (non-negated) hit this tick → on-kill boon credit
|
||||
for (int i = 0; i < dmg.Length; i++)
|
||||
{
|
||||
uint src = dmg[i].SourceTick;
|
||||
@@ -96,6 +97,7 @@ namespace ProjectM.Server
|
||||
}
|
||||
}
|
||||
total += dmg[i].Amount;
|
||||
if (dmg[i].SourceNetworkId >= 0) killerNetId = dmg[i].SourceNetworkId; // Phase 1.7 kill credit
|
||||
|
||||
// MC-1 punish scoring: a player-sourced hit (SourceNetworkId >= 0) landing inside a Charger's
|
||||
// whiff-stagger window counts ONCE — zeroing StaggerUntilTick keeps punishes:windows <= 1.
|
||||
@@ -149,6 +151,8 @@ namespace ProjectM.Server
|
||||
ecb.AddComponent(entity, new Dying
|
||||
{
|
||||
UntilTick = TickUtil.NonZero(netTime.ServerTick.TickIndexForValidTick + Tuning.EnemyDeathWindowTicks),
|
||||
KillerNetId = killerNetId, // Phase 1.7: KillRewardSystem reads this for Siphon/Frenzy
|
||||
Rewarded = 0,
|
||||
});
|
||||
if (SystemAPI.HasComponent<AttackWindup>(entity)) SystemAPI.SetComponent(entity, default(AttackWindup));
|
||||
if (SystemAPI.HasComponent<KnockbackState>(entity)) SystemAPI.SetComponent(entity, default(KnockbackState));
|
||||
|
||||
Reference in New Issue
Block a user