|
|
@ -1222,17 +1222,32 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
return this.parentZone; |
|
|
|
return this.parentZone; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setParentZone(Zone zone) { |
|
|
|
public void setParentZone(Zone zone) { |
|
|
|
|
|
|
|
|
|
|
|
if (this.parentZone == null) { |
|
|
|
if (this.parentZone == null){ |
|
|
|
zone.zoneMobSet.add(this); |
|
|
|
zone.zoneMobSet.add(this); |
|
|
|
this.parentZone = zone; |
|
|
|
this.parentZone = zone; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.bindLoc = Mob.GetSpawnRadiusLocation(this); |
|
|
|
if (this.building != null) { |
|
|
|
this.lastBindLoc = bindLoc; |
|
|
|
|
|
|
|
this.setLoc(bindLoc); |
|
|
|
Vector3fImmutable localLoc = new Vector3fImmutable(this.statLat,this.statAlt,this.statLon); |
|
|
|
this.stopMovement(bindLoc); |
|
|
|
Vector3fImmutable buildingWorldLoc = ZoneManager.convertLocalToWorld(this.building, localLoc); |
|
|
|
|
|
|
|
this.setBindLoc(buildingWorldLoc); |
|
|
|
|
|
|
|
this.setLoc(buildingWorldLoc); |
|
|
|
|
|
|
|
this.stopMovement(buildingWorldLoc); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Vector3fImmutable localLoc = new Vector3fImmutable(this.statLat + zone.absX, this.statAlt + zone.absY, this.statLon + zone.absZ); |
|
|
|
|
|
|
|
Vector3fImmutable spawnRadiusLoc = Vector3fImmutable.getRandomPointInCircle(localLoc, this.spawnRadius); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setBindLoc(spawnRadiusLoc); |
|
|
|
|
|
|
|
this.setLoc(spawnRadiusLoc); |
|
|
|
|
|
|
|
this.stopMovement(spawnRadiusLoc); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getParentZoneID() { |
|
|
|
public int getParentZoneID() { |
|
|
|