📄 serversettings.cpp
字号:
/*! Get method for the 'dPlayerDecay' member variable.
\return the player speed decay per cycle */
double ServerSettings::getPlayerDecay( ) const
{
return ( dPlayerDecay );
}
/*! Set method for the 'dPlayerRand' member variable.
\param d a double value representing a new random error in player movement
\return a boolean indicating whether the update was successful */
bool ServerSettings::setPlayerRand( double d )
{
dPlayerRand = d;
return ( true );
}
/*! Get method for the 'dPlayerRand' member variable.
\return the random error in player movement */
double ServerSettings::getPlayerRand( ) const
{
return ( dPlayerRand );
}
/*! Set method for the 'dPlayerWeight' member variable.
\param d a double value representing a new weight of a player (for wind)
\return a boolean indicating whether the update was successful */
bool ServerSettings::setPlayerWeight( double d )
{
dPlayerWeight = d;
return ( true );
}
/*! Get method for the 'dPlayerWeight' member variable.
\return the weight of a player (for wind) */
double ServerSettings::getPlayerWeight( ) const
{
return ( dPlayerWeight );
}
/*! Set method for the 'dPlayerSpeedMax' member variable.
\param d a double value representing a new maximum speed of a player
\return a boolean indicating whether the update was successful */
bool ServerSettings::setPlayerSpeedMax( double d )
{
dPlayerSpeedMax = d;
return ( true );
}
/*! Get method for the 'dPlayerSpeedMax' member variable.
\return the maximum speed of a player */
double ServerSettings::getPlayerSpeedMax( ) const
{
return ( dPlayerSpeedMax );
}
/*! Set method for the 'dPlayerAccelMax' member variable.
\param d a double value representing a new maximum acceleration of a player
per cycle
\return a boolean indicating whether the update was successful */
bool ServerSettings::setPlayerAccelMax( double d )
{
dPlayerAccelMax = d;
return ( true );
}
/*! Get method for the 'dPlayerAccelMax' member variable.
\return the maximum acceleration of a player per cycle */
double ServerSettings::getPlayerAccelMax( ) const
{
return ( dPlayerAccelMax );
}
/*! Set method for the 'dStaminaMax' member variable.
\param d a double value representing a new maximum stamina of a player
\return a boolean indicating whether the update was successful */
bool ServerSettings::setStaminaMax( double d )
{
dStaminaMax = d;
return ( true );
}
/*! Get method for the 'dStaminaMax' member variable.
\return the maximum stamina of a player */
double ServerSettings::getStaminaMax( ) const
{
return ( dStaminaMax );
}
/*! Set method for the 'dStaminaIncMax' member variable.
\param d a double value representing a new maximum stamina increase of a
player per cycle
\return a boolean indicating whether the update was successful */
bool ServerSettings::setStaminaIncMax( double d )
{
dStaminaIncMax = d;
return ( true );
}
/*! Get method for the 'dStaminaIncMax' member variable.
\return the maximum stamina increase of a player per cycle */
double ServerSettings::getStaminaIncMax( ) const
{
return ( dStaminaIncMax );
}
/*! Set method for the 'dRecoverDecThr' member variable.
\param d a double value representing a new percentage of stamina_max below
which player recovery decreases
\return a boolean indicating whether the update was successful */
bool ServerSettings::setRecoverDecThr( double d )
{
dRecoverDecThr = d;
return ( true );
}
/*! Get method for the 'dRecoverDecThr' member variable.
\return percentage of stamina_max below which player recovery decreases */
double ServerSettings::getRecoverDecThr( ) const
{
return ( dRecoverDecThr );
}
/*! Set method for the 'dRecoverDec' member variable.
\param d a double value representing a new decrement step per cycle for
player recovery
\return a boolean indicating whether the update was successful */
bool ServerSettings::setRecoverDec( double d )
{
dRecoverDec = d;
return ( true );
}
/*! Get method for the 'dRecoverDec' member variable.
\return the decrement step per cycle for player recovery */
double ServerSettings::getRecoverDec( ) const
{
return ( dRecoverDec );
}
/*! Set method for the 'dRecoverMin' member variable.
\param d a double value representing a new minimum player recovery
\return a boolean indicating whether the update was successful */
bool ServerSettings::setRecoverMin( double d )
{
dRecoverMin = d;
return ( true );
}
/*! Get method for the 'dRecoverMin' member variable.
\return the minimum player recovery */
double ServerSettings::getRecoverMin( ) const
{
return ( dRecoverMin );
}
/*! Set method for the 'dEffortDecThr' member variable.
\param d a double value representing a new percentage of stamina_max below
which player effort capacity decreases
\return a boolean indicating whether the update was successful */
bool ServerSettings::setEffortDecThr( double d )
{
dEffortDecThr = d;
return ( true );
}
/*! Get method for the 'dEffortDecThr' member variable.
\return the percentage of stamina_max below which player effort capacity
decreases */
double ServerSettings::getEffortDecThr( ) const
{
return ( dEffortDecThr );
}
/*! Set method for the 'dEffortDec' member variable.
\param d a double value representing a new decrement step per cycle for
player effort capacity
\return a boolean indicating whether the update was successful */
bool ServerSettings::setEffortDec( double d )
{
dEffortDec = d;
return ( true );
}
/*! Get method for the 'dEffortDec' member variable.
\return the decrement step per cycle for player effort capacity */
double ServerSettings::getEffortDec( ) const
{
return ( dEffortDec );
}
/*! Set method for the 'dEffortIncThr' member variable.
\param d a double value representing a new percentage of stamina_max above
which player effort capacity increases
\return a boolean indicating whether the update was successful */
bool ServerSettings::setEffortIncThr( double d )
{
dEffortIncThr = d;
return ( true );
}
/*! Get method for the 'dEffortIncThr' member variable.
\return the percentage of stamina_max above which player effort capacity
increases */
double ServerSettings::getEffortIncThr( ) const
{
return ( dEffortIncThr );
}
/*! Set method for the 'dEffortInc' member variable.
\param d a double value representing a new increment step per cycle for
player effort capacity
\return a boolean indicating whether the update was successful */
bool ServerSettings::setEffortInc( double d )
{
dEffortInc = d;
return ( true );
}
/*! Get method for the 'dEffortInc' member variable.
\return the increment step per cycle for player effort capacity */
double ServerSettings::getEffortInc( ) const
{
return ( dEffortInc );
}
/*! Set method for the 'dEffortMin' member variable.
\param d a double value representing a new minimum value for player effort
\return a boolean indicating whether the update was successful */
bool ServerSettings::setEffortMin( double d )
{
dEffortMin = d;
return ( true );
}
/*! Get method for the 'dEffortMin' member variable.
\return the minimum value for player effort */
double ServerSettings::getEffortMin( ) const
{
return ( dEffortMin );
}
/*! Set method for the 'iHearMax' member variable.
\param i an integer value representing a new maximum hearing
capacity of a player (a player can hear iHearInc messages in
iHearDecay simulation cycles)
\return a boolean indicating whether the update was successful */
bool ServerSettings::setHearMax( int i )
{
iHearMax = i;
return ( true );
}
/*! Get method for the 'iHearMax' member variable.
\return the maximum hearing capacity of a player (a player can
hear iHearInc messages in iHearDecay simulation cycles) */
int ServerSettings::getHearMax( ) const
{
return ( iHearMax );
}
/*! Set method for the 'iHearInc' member variable.
\param i an integer value representing a new minimum hearing capacity of a
player, i.e. the number of messages a player can hear in iHearDecay
simulation cycles
\return a boolean indicating whether the update was successful */
bool ServerSettings::setHearInc( int i )
{
iHearInc = i;
return ( true );
}
/*! Get method for the 'iHearInc' member variable.
\return the minimum hearing capacity of a player, i.e. the number of
messages a player can hear in iHearDecay simulation cycles */
int ServerSettings::getHearInc( ) const
{
return ( iHearInc );
}
/*! Set method for the 'iHearDecay' member variable.
\param i an integer value representing a new decay rate of player hearing
capacity, i.e. minimum number of cycles for iHearInc messages
\return a boolean indicating whether the update was successful */
bool ServerSettings::setHearDecay( int i )
{
iHearDecay = i;
return ( true );
}
/*! Get method for the 'iHearDecay' member variable.
\return the decay rate of player hearing capacity, i.e. minimum number of
cycles for iHearInc messages */
int ServerSettings::getHearDecay( ) const
{
return ( iHearDecay );
}
/*! Set method for the 'dInertiaMoment' member variable.
\param d a double value representing a new inertia moment of a player
(affects actual turn angle depending on speed)
\return a boolean indicating whether the update was successful */
bool ServerSettings::setInertiaMoment( double d )
{
dInertiaMoment = d;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -