Minor refinements
This commit is contained in:
parent
aea68a2c14
commit
ba3bc326eb
@ -233,12 +233,12 @@
|
||||
fade-out-time="1.0" />
|
||||
|
||||
<!-- Swatter
|
||||
duration: how long can the swatter be active.
|
||||
duration: How long can the swatter be active.
|
||||
distance: How close a kart or an item must be before it can be hit.
|
||||
This is the square of the distance to accelerate the
|
||||
This is the square of the real distance to accelerate the
|
||||
compution.
|
||||
squash-duration: How long a kart will remain squashed.
|
||||
squash-slowdown: percentage of max speed that a kart is
|
||||
squash-slowdown: Percentage of max speed that a kart is
|
||||
restricted to. -->
|
||||
<swatter duration="10" distance="9" squash-duration="5"
|
||||
squash-slowdown="0.5" />
|
||||
|
@ -379,8 +379,8 @@ void Camera::smoothMoveCamera(float dt)
|
||||
core::vector3df current_position = m_camera->getPosition();
|
||||
// Smoothly interpolate towards the position and target
|
||||
const KartProperties *kp = m_kart->getKartProperties();
|
||||
float max_increase_with_zipper = kp->getZipperMaxSpeedIncrease();
|
||||
float max_speed_without_zipper = kp->getEngineMaxSpeed();
|
||||
float max_increase_with_zipper = kp->getZipperMaxSpeedIncrease();
|
||||
float max_speed_without_zipper = kp->getEngineMaxSpeed();
|
||||
float current_speed = m_kart->getSpeed();
|
||||
|
||||
const Skidding *ks = m_kart->getSkidding();
|
||||
|
@ -89,7 +89,6 @@ KartProperties::KartProperties(const std::string &filename)
|
||||
m_color = video::SColor(255, 0, 0, 0);
|
||||
m_shape = 32; // close enough to a circle.
|
||||
m_engine_sfx_type = "engine_small";
|
||||
m_kart_model = NULL;
|
||||
m_nitro_min_consumption = 0.53f;
|
||||
// The default constructor for stk_config uses filename=""
|
||||
if (filename != "")
|
||||
@ -107,7 +106,6 @@ KartProperties::KartProperties(const std::string &filename)
|
||||
/** Destructor, dereferences the kart model. */
|
||||
KartProperties::~KartProperties()
|
||||
{
|
||||
delete m_kart_model;
|
||||
} // ~KartProperties
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -187,7 +185,7 @@ void KartProperties::load(const std::string &filename, const std::string &node)
|
||||
// m_kart_model must be initialised after assigning the default
|
||||
// values from stk_config (otherwise all kart_properties will
|
||||
// share the same KartModel
|
||||
m_kart_model = new KartModel(/*is_master*/true);
|
||||
m_kart_model.reset(new KartModel(/*is_master*/true));
|
||||
|
||||
m_root = StringUtils::getPath(filename)+"/";
|
||||
m_ident = StringUtils::getBasename(StringUtils::getPath(filename));
|
||||
@ -204,7 +202,6 @@ void KartProperties::load(const std::string &filename, const std::string &node)
|
||||
msg << "Couldn't load kart properties '" << filename <<
|
||||
"': no kart node.";
|
||||
|
||||
delete m_kart_model;
|
||||
throw std::runtime_error(msg.str());
|
||||
}
|
||||
getAllData(root);
|
||||
@ -262,7 +259,6 @@ void KartProperties::load(const std::string &filename, const std::string &node)
|
||||
const bool success = m_kart_model->loadModels(*this);
|
||||
if (!success)
|
||||
{
|
||||
delete m_kart_model;
|
||||
file_manager->popTextureSearchPath();
|
||||
file_manager->popModelSearchPath();
|
||||
throw std::runtime_error("Cannot load kart models");
|
||||
|
@ -80,7 +80,7 @@ private:
|
||||
/** The kart model and wheels. It is mutable since the wheels of the
|
||||
* KartModel can rotate and turn, and animations are played, but otherwise
|
||||
* the kart_properties object is const. */
|
||||
mutable KartModel *m_kart_model;
|
||||
mutable std::shared_ptr<KartModel> m_kart_model;
|
||||
|
||||
/** List of all groups the kart belongs to. */
|
||||
std::vector<std::string> m_groups;
|
||||
|
@ -34,7 +34,6 @@ def main():
|
||||
print("Please run this script in the root directory of the project.")
|
||||
exit(1)
|
||||
for operation, function in functions.items():
|
||||
# + " 2> /dev/null"
|
||||
result = subprocess.Popen("tools/create_kart_properties.py " +
|
||||
operation, shell = True,
|
||||
stdout = subprocess.PIPE).stdout.read().decode('UTF-8')
|
||||
|
Loading…
Reference in New Issue
Block a user