schnoodly
Recruit
I am looking at making effects based on the details of a Blow / Attack WITHOUT using Harmony, as I hear about compatibility issues. The only exposed virtual methods I've been able to find are
I have NO idea what
OnRegisterBlow
, OnAgentHit
, OnScoreHit
, and OnMissileHit
; all of these are missing one or two vital parts to be any extra use:OnRegisterBlow
has everything I need, BUT the method that passes to it,RegisterBlow
, isn't reliably called it appears
C#:
internal void MeleeHitCallback(ref AttackCollisionData collisionData, Agent attacker, Agent victim, GameEntity realHitEntity, float momentumRemainingToComputeDamage, ref float inOutMomentumRemaining, ref MeleeCollisionReaction colReaction, CrushThroughState cts, Vec3 blowDir, Vec3 swingDir, ref HitParticleResultData hprd, bool crushedThroughWithoutAgentCollision)
{
// [...]
if (!crushedThroughWithoutAgentCollision)
{
Blow blow = this.CreateBlow(attacker, victim, ref collisionData, cts, blowDir, swingDir, flag2);
if (!flag && ((victim != null && victim.IsActive()) || realHitEntity != null))
{
this.RegisterBlow(attacker, victim, realHitEntity, blow, ref collisionData);
}
// [...]
}
colReaction = MeleeCollisionReaction.ContinueChecking;
}
}
if (!crushedThroughWithoutAgentCollision)
means, but it doesn't seem to be what passes validation on every hit.OnAgentHit
,OnScoreHit
, andOnMissileHit
don't have anyBlow
struct passed into them, so I really can't use those for gettingBlow.VictimBodyPart
,Blow.DamageType
,Blow.SwingDirection
, orBlow.DamagePercentage