// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . // ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· // ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ // ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ // ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ // Magicbane Emulator Project © 2013 - 2022 // www.magicbane.com package engine.devcmd.cmds; import engine.Enum; import engine.Enum.BuildingGroup; import engine.Enum.GameObjectType; import engine.Enum.TargetColor; import engine.collisionEngine.Mesh; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; import engine.math.Vector3fImmutable; import engine.objects.*; import engine.util.StringUtils; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.concurrent.ConcurrentHashMap; /** * @author */ public class ColliderCmd extends AbstractDevCmd { public ColliderCmd() { super("collider"); } @Override protected void _doCmd(PlayerCharacter pc, String[] words, AbstractGameObject target) { // Arg Count Check if (words.length != 1) { this.sendUsage(pc); return; } if (pc == null) { return; } String newline = "\r\n "; String output = "----------Collider Information----------" + newline; if(target.getObjectType().equals(GameObjectType.Building) == false) throwbackInfo(pc, "You Must Select A Building"); Building building = (Building)target; output += "Mesh Count: " + ((Building) target).buildingMeshes.size() + newline; for(Mesh mesh : building.buildingMeshes){ output += "------------------------------" + newline; output += "Mesh ID: " + mesh.meshData.meshID + newline; output += "Mesh Tri Count: " + mesh.triangles.size() + newline; output += "Mesh Bounds: " + mesh.bounds + newline; output += "Mesh Min/Max: " + mesh.mesh_minY + " / " + mesh.mesh_maxY + newline; output += "Location Inside: " + mesh.bounds.contains(pc.loc.x,pc.loc.z * -1) + newline; output += "------------------------------" + newline; } throwbackInfo(pc, output); } @Override protected String _getHelpString() { return "Gets information on an Object."; } @Override protected String _getUsageString() { return "' /info targetID'"; } }