change to physics based ship movement
This commit is contained in:
@@ -395,7 +395,11 @@ ShipsConfig ConfigLoader::loadShips(const std::string& path)
|
||||
const std::string mPath = elemPath + ".movement";
|
||||
const toml::table& mTable = requireTable(mt["movement"], file, mPath);
|
||||
toml::table& mMt = const_cast<toml::table&>(mTable);
|
||||
def.movement.speedFormula = requireFormula(mMt["speed_formula"], file, mPath + ".speed_formula");
|
||||
def.movement.speedFormula = requireFormula(mMt["speed_formula"], file, mPath + ".speed_formula");
|
||||
def.movement.mainAccelerationFormula = requireFormula(mMt["main_acceleration_formula"], file, mPath + ".main_acceleration_formula");
|
||||
def.movement.maneuveringAccelerationFormula = requireFormula(mMt["maneuvering_acceleration_formula"], file, mPath + ".maneuvering_acceleration_formula");
|
||||
def.movement.angularAccelerationFormula = requireFormula(mMt["angular_acceleration_formula"], file, mPath + ".angular_acceleration_formula");
|
||||
def.movement.maxRotationSpeedFormula = requireFormula(mMt["max_rotation_speed_formula"], file, mPath + ".max_rotation_speed_formula");
|
||||
}
|
||||
|
||||
// Sensor
|
||||
|
||||
@@ -30,7 +30,11 @@ struct ShipHealth
|
||||
|
||||
struct ShipMovement
|
||||
{
|
||||
Formula speedFormula; // REQ-SHP-STATS, REQ-SHP-MOVEMENT
|
||||
Formula speedFormula; // max linear speed cap, tiles/s (REQ-SHP-STATS, REQ-SHP-MOVEMENT)
|
||||
Formula mainAccelerationFormula; // forward acceleration, tiles/s²
|
||||
Formula maneuveringAccelerationFormula;// omnidirectional acceleration, tiles/s²
|
||||
Formula angularAccelerationFormula; // angular acceleration, rad/s²
|
||||
Formula maxRotationSpeedFormula; // angular velocity cap, rad/s
|
||||
};
|
||||
|
||||
struct ShipSensor
|
||||
|
||||
Reference in New Issue
Block a user