Merge pull request #250 from devZoGok/bf-249-no-debug-render

bf-249-no-debug-render
This commit is contained in:
devZoGok
2026-05-26 16:56:59 +00:00
committed by GitHub
4 changed files with 8 additions and 5 deletions
@@ -723,7 +723,7 @@ units = {
cost = 500,
size = {x = 2.43, y = 2.43, z = 2.47},
hitboxOffset = {x = 0, y = 1.21, z = 0},
lineOfSight = 150,
lineOfSight = 200,
name = 'Engineer',
basePath = PATH .. vehiclePrefix .. 'Engineers/',
albedoPath = 'engineer.jpg',
@@ -768,7 +768,7 @@ units = {
cost = 500,
size = {x = 4.95, y = 6.59, z = 4.11},
hitboxOffset = {x = .178, y = 3.27, z = 0},
lineOfSight = 1500,
lineOfSight = 150,
name = 'Engineer',
basePath = PATH .. vehiclePrefix .. 'Engineers/',
albedoPath = 'engineer.jpg',
+2 -1
View File
@@ -40,6 +40,8 @@ namespace battleship{
upVec = model->getGlobalAxis(1);
dirVec = model->getGlobalAxis(2);
screenPos = spaceToScreen(pos);
if(hitbox) hitbox->setVisible(Game::getSingleton()->isDebug());
}
void GameObject::placeAt(Vector3 p) {
@@ -71,7 +73,6 @@ namespace battleship{
hitbox = new Node(Vector3(offsetPosTable["x"], offsetPosTable["y"], offsetPosTable["z"]));
hitbox->attachMesh(box);
hitbox->setVisible(Game::getSingleton()->isDebug());
model->attachChild(hitbox);
}
+3 -1
View File
@@ -36,6 +36,9 @@ namespace battleship{
Unit::update();
if(garrisonable) model->setVisible(false);
for(Node *n : debugPathPoints)
n->setVisible(Game::getSingleton()->isDebug());
}
void Vehicle::halt(){
@@ -311,7 +314,6 @@ namespace battleship{
Node *n = new Node(pointPos);
n->attachMesh(b);
n->setVisible(Game::getSingleton()->isDebug());
Root::getSingleton()->getRootNode()->attachChild(n);
debugPathPoints.push_back(n);
}