don't touch velocity in other systems and don't use snapTarget
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user