init. patrol points list

This commit is contained in:
2023-04-16 13:07:28 -05:00
parent 0779fbab87
commit ef74d1ae8c
+2 -1
View File
@@ -1979,6 +1979,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.setBounds(mobBounds); this.setBounds(mobBounds);
//assign 5 random patrol points for regular mobs //assign 5 random patrol points for regular mobs
if(!this.isGuard() && !this.isPlayerGuard() && !this.isPet() && !this.isNecroPet() && !this.isSummonedPet() && !this.isCharmedPet()){ if(!this.isGuard() && !this.isPlayerGuard() && !this.isPet() && !this.isNecroPet() && !this.isSummonedPet() && !this.isCharmedPet()){
this.patrolPoints = new ArrayList<>();
for(int i = 0; i < 5; ++i){ for(int i = 0; i < 5; ++i){
float patrolRadius = this.getSpawnRadius(); float patrolRadius = this.getSpawnRadius();
@@ -1989,7 +1990,7 @@ public class Mob extends AbstractIntelligenceAgent {
patrolRadius = 60; patrolRadius = 60;
Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius); Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius);
patrolPoints.add(newPatrolPoint); this.patrolPoints.add(newPatrolPoint);
} }
} }
} catch (Exception e) { } catch (Exception e) {