Adds immediate migration results

This commit is contained in:
torsten committed 2026-08-18 22:12:24 +02:00
1 parent ba4121728b
commit 6a2a0667ab
2395 files changed
+357322 -2524

No files matched your search

@@ -2,6 +2,7 @@
#include "vwm_api.h"
#include <utility>
#include "vwm_deposition.h"
#include "vwm_xml_reader.h"
#include "vwm_state_store.h"
@@ -216,7 +217,7 @@ void Api::dumpHitResult(const Hit &hit, const HitResult &result, const Charge &c
output << ",," << "\n";
output << "RoomId,damagePercent,remainingEffectPercent,directHit" << "\n";
for (const HitRoom &hitRoom : qAsConst(result.rooms))
for (const HitRoom &hitRoom : std::as_const(result.rooms))
{
output << hitRoom.roomId << ","
<< hitRoom.damagePercent << ","
@@ -281,7 +282,7 @@ void Api::onSetContaminationState(const std::vector<ContaminationState> &contami
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
QSet<int> roomsSet;
for (const auto i: qAsConst(newcs.rooms))
for (const auto i: std::as_const(newcs.rooms))
{
roomsSet.insert(i);
}
@@ -404,7 +405,7 @@ void Api::onHitCes(const qint64 effectTimeMSec, const int chargeTypeId,
INFO_LOG(m_logger) << "XXXXX Aes hit - hit pos: " << posImpactOnGround << " direction: " << hit.direction
<< " (p=" << hit.direction+posImpactOnGround << ")"
<< " ; nearestWall.roomId=" << nearestWall.roomId;
for (auto item : qAsConst(nearestWall.wallElement))
for (auto item : std::as_const(nearestWall.wallElement))
DEBUG_LOG(m_logger) << "Aes hit - hit pos: " << posImpactOnGround << " direction: " << hit.direction
<< " (p=" << hit.direction+posImpactOnGround
<< " - " << item;
@@ -436,13 +437,13 @@ NearestWall Api::findNearestWall(const LtsUtils::QPoint3D &detonationLocation, d
distanceOut = std::numeric_limits<double>::max();
INFO_LOG(m_logger) << "XXXXX searching nearest wall ...";
for (const Room &room : qAsConst(m_building.rooms()))
for (const Room &room : std::as_const(m_building.rooms()))
{
for (const OuterWall &wall : qAsConst(room.outerWalls()))
for (const OuterWall &wall : std::as_const(room.outerWalls()))
{
for (const WallElement &we : qAsConst(wall.elements()))
for (const WallElement &we : std::as_const(wall.elements()))
{
for (const LtsUtils::QPoint3D &p : qAsConst(we))
for (const LtsUtils::QPoint3D &p : std::as_const(we))
{
const double dist = (detonationLocation - p).length();
DEBUG_LOG(m_logger) << "Room[" << room.id() << "]: " << p << ", dist = " << dist;