Skip to content

Commit

Permalink
improve CE AI to reduce stunlock
Browse files Browse the repository at this point in the history
  • Loading branch information
HamaIndustries committed Nov 27, 2024
1 parent 33825e6 commit 45abbb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ org.gradle.configuration-cache=true
mod.id=armistice
mod.name=Armistice
mod.license=Mozilla Public License 2.0
mod.version=1.0.0-SNAPSHOT20
mod.version=1.0.0-SNAPSHOT22
mod.group=symbolics.division.armistice
mod.authors=hama, CallMeEcho, WorldWidePixel, Nulb, Trudle, VirtuaLilith, DivineInversion, lgmrszd, Superkat32
mod.description=Machines from tomorrow, bringing peace to today
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ protected void crueltyEngineTick() {
if (alertCollide && collisionCooldown <= 0) {
// stop if we hit a wall
core().setPathingTarget(position().toVector3f());
collisionCooldown = 20 * 10;
collisionCooldown = 20;
} else if (modeTicks > 20 * 120) {
modeTicks = 0;
core().setPathingTarget(new Vector3f((float) getRandomX(1000), (float) getY() + 50, (float) getRandomZ(1000)));
Expand All @@ -225,7 +225,9 @@ protected void crueltyEngineTick() {
crueltyMode = CrueltyMode.SPY;
fixation = player.getUUID();
modeTicks = 0;
core().setPathingTarget(position().toVector3f());
if (ticksSincePlayerSeen >= 20 * 20) {
core().setPathingTarget(position().toVector3f());
}
playSound(ArmisticeSoundEventRegistrar.ENTITY$MECHA$ALERT, 7, AudioUtil.randomizedPitch(random, 1, 0.2f));
}
}
Expand Down

0 comments on commit 45abbb2

Please sign in to comment.