don't touch velocity in other systems and don't use snapTarget

This commit is contained in:
2026-05-25 07:50:33 +02:00
parent 0cd0529468
commit fa714335dc
4 changed files with 33 additions and 57 deletions

View File

@@ -1,7 +1,5 @@
#pragma once
#include <optional>
#include <QVector2D>
struct DynamicBodyComponent
@@ -20,6 +18,4 @@ struct DynamicBodyComponent
// --- written each tick by MovementIntentSystem, consumed by DynamicBodySystem ---
QVector2D linearAcceleration;
float angularAcceleration;
std::optional<QVector2D> snapTarget; // set when snap-to-target will fire this tick
};

View File

@@ -44,8 +44,7 @@ entt::entity EntityAdmin::spawnShip(QVector2D position, float hp, float maxHp,
QVector2D(0.0f, 0.0f), // velocity
0.0f, // angularVelocity
QVector2D(0.0f, 0.0f), // linearAcceleration
0.0f, // angularAcceleration
std::nullopt // snapTarget
0.0f // angularAcceleration
});
add<SensorRange>(entity, SensorRange{sensorRange});
add<ShipIdentity>(entity, ShipIdentity{level, schematicId});