Skip to content

Commit

Permalink
Created MidBurst property
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxDorob committed Dec 3, 2024
1 parent db11cc0 commit ea5b006
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/CombatExtended/CombatExtended/Verbs/VerbCIWS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public override bool TryFindCEShootLineFromTo(IntVec3 root, LocalTargetInfo targ
resultingLine = new ShootLine(Shooter.Position, new IntVec3((int)targetPos.x, (int)y, (int)targetPos.z));
return true;
}
var midBurst = numShotsFired > 0;
var midBurst = MidBurst;
var ticksToSkip = (Caster as Building_TurretGunCE)?.CurrentTarget.IsValid ?? CurrentTarget.IsValid ? this.BurstWarmupTicksLeft : VerbPropsCE.warmupTime.SecondsToTicks();
var instant = projectilePropsCE.isInstant;
if (instant)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ public virtual float GetTargetHeight(LocalTargetInfo target, Thing cover, bool r
}
return targetHeight;
}
protected virtual bool LockRotationAndAngle => numShotsFired > 0;
public bool MidBurst => numShotsFired > 0;
protected virtual bool LockRotationAndAngle => MidBurst;

public virtual void ShiftTarget(ShiftVecReport report, bool calculateMechanicalOnly = false, bool isInstant = false, bool midBurst = false)
{
ShiftTarget(report, report.target.Thing?.TrueCenter() ?? report.target.Cell.ToVector3Shifted(), calculateMechanicalOnly, isInstant);
Expand Down

0 comments on commit ea5b006

Please sign in to comment.