vehicles can't obstruct their own frames

This commit is contained in:
devZoGok
2025-11-26 13:47:45 +02:00
parent 7b9399d2a5
commit af8e124276
2 changed files with 9 additions and 2 deletions
+3 -1
View File
@@ -53,7 +53,7 @@ namespace battleship{
buildDir = gameObjectFrames[1].getModel()->getPosition() - gameObjectFrames[0].getModel()->getPosition();
Vector3 pos = paintSelectRowStart + buildDir.norm() * hypothenuse * gameObjectFrames.size();
addGameObjectFrame(GameObjectFrame(structureId, GameObject::Type::UNIT, pos));
addGameObjectFrame(GameObjectFrame(structureId, GameObject::Type::UNIT, nullptr, pos));
}
}
@@ -104,6 +104,8 @@ namespace battleship{
}
for(Unit *unit : units){
if(unit == s.getOriginalUnit()) continue;
Vector3 gm1Pos = s.getPos();
Vector3 gm1Dir = s.getDirVec();
gm1Dir = Vector3(gm1Dir.x, 0, gm1Dir.z).norm();