cleanup and comment

This commit is contained in:
2024-01-13 19:51:37 -06:00
parent 4bff36d7bb
commit a94a400102
2 changed files with 8 additions and 5 deletions
+3 -1
View File
@@ -26,8 +26,10 @@ public class Mesh {
if(!this.BoundsCollides(line))
return false;
boolean feetcollides = (charY + charHeight) < this.minY;
boolean headcollides = charY > this.maxY;
//check to see if the mesh collides between the characters feet and head locations
if((charY + charHeight) < this.minY && charY > this.maxY){
if(feetcollides && headcollides){
return false;
}
@@ -19,9 +19,9 @@ import engine.math.Vector2f;
import engine.math.Vector3f;
import engine.math.Vector3fImmutable;
import engine.objects.*;
import javafx.geometry.Bounds;
import org.joda.time.DateTime;
import org.pmw.tinylog.Logger;
import java.awt.geom.Rectangle2D;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -30,7 +30,6 @@ import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
@@ -881,7 +880,7 @@ public class dbBuildingHandler extends dbHandlerBase {
public void LOAD_MESH_DATA() {
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `new-static_mesh_triangles`")) {
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_mesh_triangles`")) {
ResultSet rs = preparedStatement.executeQuery();
BuildingManager.mesh_triangle_points = new HashMap<>();
@@ -934,8 +933,10 @@ public class dbBuildingHandler extends dbHandlerBase {
float refX = Float.parseFloat(rs.getString("ref").split(";")[0]);
float refZ = Float.parseFloat(rs.getString("ref").split(";")[1]);
//Bounds bound = new Bounds(endX,0,endZ,0,0,0);
Vector2f topLeft = new Vector2f(centerX - refX,centerZ + refZ);
Vector2f topLeft = new Vector2f(centerX + refX,centerZ + refZ);
float width = Math.abs(endX-refX);
float height = Math.abs(endZ-refZ);
Rectangle2D boundRect = new Rectangle2D.Float();