Update for new sstreaming characteristics
This commit is contained in:
@@ -215,10 +215,14 @@ AbstractCharacteristic::ValueType AbstractCharacteristic::getType(
|
||||
return TYPE_FLOAT;
|
||||
case SLIPSTREAM_DURATION:
|
||||
return TYPE_FLOAT;
|
||||
case SLIPSTREAM_BASE_SPEED:
|
||||
return TYPE_FLOAT;
|
||||
case SLIPSTREAM_LENGTH:
|
||||
return TYPE_FLOAT;
|
||||
case SLIPSTREAM_WIDTH:
|
||||
return TYPE_FLOAT;
|
||||
case SLIPSTREAM_INNER_FACTOR:
|
||||
return TYPE_FLOAT;
|
||||
case SLIPSTREAM_COLLECT_TIME:
|
||||
return TYPE_FLOAT;
|
||||
case SLIPSTREAM_USE_TIME:
|
||||
@@ -447,10 +451,14 @@ std::string AbstractCharacteristic::getName(CharacteristicType type)
|
||||
return "NITRO_MAX";
|
||||
case SLIPSTREAM_DURATION:
|
||||
return "SLIPSTREAM_DURATION";
|
||||
case SLIPSTREAM_BASE_SPEED:
|
||||
return "SLIPSTREAM_BASE_SPEED";
|
||||
case SLIPSTREAM_LENGTH:
|
||||
return "SLIPSTREAM_LENGTH";
|
||||
case SLIPSTREAM_WIDTH:
|
||||
return "SLIPSTREAM_WIDTH";
|
||||
case SLIPSTREAM_INNER_FACTOR:
|
||||
return "SLIPSTREAM_INNER_FACTOR";
|
||||
case SLIPSTREAM_COLLECT_TIME:
|
||||
return "SLIPSTREAM_COLLECT_TIME";
|
||||
case SLIPSTREAM_USE_TIME:
|
||||
@@ -1471,6 +1479,18 @@ float AbstractCharacteristic::getSlipstreamDuration() const
|
||||
return result;
|
||||
} // getSlipstreamDuration
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
float AbstractCharacteristic::getSlipstreamBaseSpeed() const
|
||||
{
|
||||
float result;
|
||||
bool is_set = false;
|
||||
process(SLIPSTREAM_BASE_SPEED, &result, &is_set);
|
||||
if (!is_set)
|
||||
Log::fatal("AbstractCharacteristic", "Can't get characteristic %s",
|
||||
getName(SLIPSTREAM_BASE_SPEED).c_str());
|
||||
return result;
|
||||
} // getSlipstreamBaseSpeed
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
float AbstractCharacteristic::getSlipstreamLength() const
|
||||
{
|
||||
@@ -1495,6 +1515,18 @@ float AbstractCharacteristic::getSlipstreamWidth() const
|
||||
return result;
|
||||
} // getSlipstreamWidth
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
float AbstractCharacteristic::getSlipstreamInnerFactor() const
|
||||
{
|
||||
float result;
|
||||
bool is_set = false;
|
||||
process(SLIPSTREAM_INNER_FACTOR, &result, &is_set);
|
||||
if (!is_set)
|
||||
Log::fatal("AbstractCharacteristic", "Can't get characteristic %s",
|
||||
getName(SLIPSTREAM_INNER_FACTOR).c_str());
|
||||
return result;
|
||||
} // getSlipstreamInnerFactor
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
float AbstractCharacteristic::getSlipstreamCollectTime() const
|
||||
{
|
||||
@@ -1785,4 +1817,3 @@ bool AbstractCharacteristic::getSkidEnabled() const
|
||||
|
||||
|
||||
/* <characteristics-end acgetter> */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user