mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:23:54 +00:00
change const to constexpr
This commit is contained in:
parent
6a9af5ccca
commit
4e61fec14d
1 changed files with 9 additions and 9 deletions
|
@ -7,25 +7,25 @@ namespace Constants
|
||||||
{
|
{
|
||||||
|
|
||||||
// The game uses 64 units per yard
|
// The game uses 64 units per yard
|
||||||
const float UnitsPerMeter = 69.99125109f;
|
constexpr float UnitsPerMeter = 69.99125109f;
|
||||||
const float UnitsPerFoot = 21.33333333f;
|
constexpr float UnitsPerFoot = 21.33333333f;
|
||||||
|
|
||||||
// Sound speed in meters per second
|
// Sound speed in meters per second
|
||||||
const float SoundSpeedInAir = 343.3f;
|
constexpr float SoundSpeedInAir = 343.3f;
|
||||||
const float SoundSpeedUnderwater = 1484.0f;
|
constexpr float SoundSpeedUnderwater = 1484.0f;
|
||||||
|
|
||||||
// Gravity constant in m/sec^2
|
// Gravity constexprant in m/sec^2
|
||||||
// Note: 8.96 m/sec^2 = 9.8 yards/sec^2
|
// Note: 8.96 m/sec^2 = 9.8 yards/sec^2
|
||||||
// Probaly original engine's developers just forgot
|
// Probaly original engine's developers just forgot
|
||||||
// that their engine uses yards instead of meters
|
// that their engine uses yards instead of meters
|
||||||
// and used standart gravity value as it is
|
// and used standart gravity value as it is
|
||||||
const float GravityConst = 8.96f;
|
constexpr float GravityConst = 8.96f;
|
||||||
|
|
||||||
// Size of one exterior cell in game units
|
// Size of one exterior cell in game units
|
||||||
const int CellSizeInUnits = 8192;
|
constexpr int CellSizeInUnits = 8192;
|
||||||
|
|
||||||
// Size of active cell grid in cells (it is a square with the (2 * CellGridRadius + 1) cells side)
|
// Size of active cell grid in cells (it is a square with the (2 * CellGridRadius + 1) cells side)
|
||||||
const int CellGridRadius = 1;
|
constexpr int CellGridRadius = 1;
|
||||||
|
|
||||||
// A label to mark night/day visual switches
|
// A label to mark night/day visual switches
|
||||||
const std::string NightDayLabel = "NightDaySwitch";
|
const std::string NightDayLabel = "NightDaySwitch";
|
||||||
|
@ -34,7 +34,7 @@ namespace Constants
|
||||||
const std::string HerbalismLabel = "HerbalismSwitch";
|
const std::string HerbalismLabel = "HerbalismSwitch";
|
||||||
|
|
||||||
// Percentage height at which projectiles are spawned from an actor
|
// Percentage height at which projectiles are spawned from an actor
|
||||||
const float TorsoHeight = 0.75f;
|
constexpr float TorsoHeight = 0.75f;
|
||||||
|
|
||||||
static constexpr float sStepSizeUp = 34.0f;
|
static constexpr float sStepSizeUp = 34.0f;
|
||||||
static constexpr float sMaxSlope = 46.0f;
|
static constexpr float sMaxSlope = 46.0f;
|
||||||
|
|
Loading…
Reference in a new issue