Replace accidently placed tabs
This commit is contained in:
parent
48323d4456
commit
a31ec772ff
@ -142,4 +142,4 @@ struct DrawElementsIndirectCommand{
|
||||
GLuint baseInstance;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1310,7 +1310,7 @@ void GL32_draw2DRectangle(video::SColor color, const core::rect<s32>& position,
|
||||
glGetError();
|
||||
}
|
||||
|
||||
bool hasGLExtension(const char* extension)
|
||||
bool hasGLExtension(const char* extension)
|
||||
{
|
||||
if (glGetStringi != NULL)
|
||||
{
|
||||
|
@ -339,7 +339,7 @@ void IrrDriver::initDevice()
|
||||
UserConfigParams::m_height = (int)ssize.Height;
|
||||
}
|
||||
|
||||
core::dimension2d<u32> res = core::dimension2du(UserConfigParams::m_width,
|
||||
core::dimension2d<u32> res = core::dimension2du(UserConfigParams::m_width,
|
||||
UserConfigParams::m_height);
|
||||
|
||||
|
||||
|
@ -804,4 +804,4 @@ void IrrDriver::renderGlow(std::vector<GlowData>& glows)
|
||||
m_rtts->getFBO(FBO_COLORS).Bind();
|
||||
m_post_processing->renderGlow(m_rtts->getRenderTarget(RTT_QUARTER1));
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
}
|
||||
}
|
||||
|
@ -579,4 +579,4 @@ void IrrDriver::renderSkybox(const scene::ICameraSceneNode *camera)
|
||||
0);
|
||||
glDrawElements(GL_TRIANGLES, 6 * 6, GL_UNSIGNED_INT, 0);
|
||||
glBindVertexArray(0);
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <IMeshSceneNode.h>
|
||||
#include <ISceneNode.h>
|
||||
|
||||
Shadow::Shadow(video::ITexture *texture, scene::ISceneNode *node,
|
||||
Shadow::Shadow(video::ITexture *texture, scene::ISceneNode *node,
|
||||
float scale = 1.0, float x_offset = 0.0, float y_offset = 0.0,
|
||||
float z_offset = 0.0)
|
||||
{
|
||||
|
@ -70,10 +70,10 @@ SlipStream::SlipStream(AbstractKart* kart) : MovingTexture(0, 0), m_kart(kart)
|
||||
m_slipstream_time = 0.0f;
|
||||
|
||||
float length = m_kart->getKartProperties()->getSlipstreamLength() *
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamLength();
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamLength();
|
||||
float kw = m_kart->getKartWidth();
|
||||
float ew = m_kart->getKartProperties()->getSlipstreamWidth() *
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamWidth();
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamWidth();
|
||||
float kl = m_kart->getKartLength();
|
||||
|
||||
Vec3 p[4];
|
||||
@ -380,7 +380,7 @@ void SlipStream::update(float dt)
|
||||
#undef DISPLAY_SLIPSTREAM_WITH_0_SPEED_FOR_DEBUGGING
|
||||
#ifndef DISPLAY_SLIPSTREAM_WITH_0_SPEED_FOR_DEBUGGING
|
||||
if(m_kart->getSpeed()<m_kart->getKartProperties()->getSlipstreamMinSpeed() *
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamMinSpeed())
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamMinSpeed())
|
||||
{
|
||||
setIntensity(0, NULL);
|
||||
m_slipstream_mode = SS_NONE;
|
||||
@ -438,7 +438,7 @@ void SlipStream::update(float dt)
|
||||
// away from the other kart
|
||||
Vec3 delta = m_kart->getXYZ() - m_target_kart->getXYZ();
|
||||
float l = m_kart->getKartProperties()->getSlipstreamLength() *
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamLength()
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamLength()
|
||||
+ 0.5f*( m_target_kart->getKartLength()
|
||||
+m_kart->getKartLength() );
|
||||
if(delta.length2_2d() > l*l)
|
||||
@ -502,7 +502,7 @@ void SlipStream::update(float dt)
|
||||
|
||||
m_slipstream_mode = SS_COLLECT;
|
||||
if(m_slipstream_time>m_kart->getKartProperties()->getSlipstreamCollectTime() *
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamCollectTime())
|
||||
m_kart->getPlayerDifficulty()->getSlipstreamCollectTime())
|
||||
{
|
||||
setIntensity(1.0f, m_target_kart);
|
||||
}
|
||||
|
@ -175,4 +175,4 @@ void STKTextBillboard::collectChar(video::ITexture* texture,
|
||||
const video::SColor* const colors)
|
||||
{
|
||||
m_chars.push_back(STKTextBillboardChar(texture, destRect, sourceRect, colors));
|
||||
}
|
||||
}
|
||||
|
@ -337,4 +337,4 @@ void InitTextures(GLMesh &mesh, MeshMaterial Mat)
|
||||
SetTexture(mesh, 4, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,4 +39,4 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -34,7 +34,7 @@ Weather::Weather(bool lightning, std::string sound)
|
||||
|
||||
if (m_lightning)
|
||||
{
|
||||
m_thunder_sound = sfx_manager->createSoundSource("thunder");
|
||||
m_thunder_sound = sfx_manager->createSoundSource("thunder");
|
||||
}
|
||||
|
||||
if (sound != "")
|
||||
@ -50,10 +50,10 @@ Weather::Weather(bool lightning, std::string sound)
|
||||
|
||||
Weather::~Weather()
|
||||
{
|
||||
if (m_thunder_sound != NULL)
|
||||
if (m_thunder_sound != NULL)
|
||||
sfx_manager->deleteSFX(m_thunder_sound);
|
||||
|
||||
if (m_weather_sound != NULL)
|
||||
if (m_weather_sound != NULL)
|
||||
sfx_manager->deleteSFX(m_weather_sound);
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ void Weather::update(float dt)
|
||||
{
|
||||
gui_base->doLightning();
|
||||
|
||||
if (m_thunder_sound)
|
||||
if (m_thunder_sound)
|
||||
{
|
||||
m_thunder_sound->play();
|
||||
}
|
||||
@ -89,9 +89,9 @@ void Weather::update(float dt)
|
||||
|
||||
void Weather::playSound()
|
||||
{
|
||||
if (m_weather_sound)
|
||||
if (m_weather_sound)
|
||||
{
|
||||
m_weather_sound->setLoop(true);
|
||||
m_weather_sound->play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ namespace GUIEngine
|
||||
*/
|
||||
void setImage(const char* path_to_texture,
|
||||
IconPathType path_type=ICON_PATH_TYPE_NO_CHANGE);
|
||||
// --------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------
|
||||
/** Convenience function taking std::string. */
|
||||
void setImage(const std::string &path_to_texture,
|
||||
IconPathType path_type=ICON_PATH_TYPE_NO_CHANGE)
|
||||
|
@ -165,7 +165,7 @@ namespace GUIEngine
|
||||
* value is set to the new maximum. */
|
||||
void setMax(int n)
|
||||
{
|
||||
m_max = n;
|
||||
m_max = n;
|
||||
if(getValue()>m_max) setValue(m_max);
|
||||
} // setMax
|
||||
// --------------------------------------------------------------------
|
||||
@ -179,7 +179,7 @@ namespace GUIEngine
|
||||
* value is set to the new minimum. */
|
||||
void setMin(int n)
|
||||
{
|
||||
m_min = n;
|
||||
m_min = n;
|
||||
if(getValue()<m_min) setValue(m_min);
|
||||
} // setMin
|
||||
|
||||
|
@ -178,7 +178,7 @@ bool Plunger::hit(AbstractKart *kart, PhysicalObject *obj)
|
||||
else
|
||||
{
|
||||
m_keep_alive = m_owner->getKartProperties()->getRubberBandDuration() *
|
||||
m_owner->getPlayerDifficulty()->getRubberBandDuration();
|
||||
m_owner->getPlayerDifficulty()->getRubberBandDuration();
|
||||
|
||||
// Make this object invisible by placing it faaar down. Not that if this
|
||||
// objects is simply removed from the scene graph, it might be auto-deleted
|
||||
|
@ -147,7 +147,7 @@ void RubberBand::update(float dt)
|
||||
// ------------------------------
|
||||
float l = (m_end_position-k).length2();
|
||||
float max_len = m_owner->getKartProperties()->getRubberBandMaxLength() *
|
||||
m_owner->getPlayerDifficulty()->getRubberBandMaxLength();
|
||||
m_owner->getPlayerDifficulty()->getRubberBandMaxLength();
|
||||
if(l>max_len*max_len)
|
||||
{
|
||||
// Rubber band snaps
|
||||
@ -161,7 +161,7 @@ void RubberBand::update(float dt)
|
||||
if(m_attached_state!=RB_TO_PLUNGER)
|
||||
{
|
||||
float force = m_owner->getKartProperties()->getRubberBandForce() *
|
||||
m_owner->getPlayerDifficulty()->getRubberBandForce();
|
||||
m_owner->getPlayerDifficulty()->getRubberBandForce();
|
||||
Vec3 diff = m_end_position-k;
|
||||
|
||||
// detach rubber band if kart gets very close to hit point
|
||||
|
@ -294,7 +294,7 @@ void Swatter::squashThingsAround()
|
||||
if(dist2 >= min_dist2) continue; // too far away, ignore this kart
|
||||
|
||||
kart->setSquash(kp->getSquashDuration() * kart->getPlayerDifficulty()->getSquashDuration(),
|
||||
kp->getSquashSlowdown() * kart->getPlayerDifficulty()->getSquashSlowdown());
|
||||
kp->getSquashSlowdown() * kart->getPlayerDifficulty()->getSquashSlowdown());
|
||||
|
||||
if (kart->getAttachment()->getType()==Attachment::ATTACH_BOMB)
|
||||
{ // make bomb explode
|
||||
|
@ -133,4 +133,4 @@ void AbstractKart::kartIsInRestNow()
|
||||
// Update the kart transforms with the newly computed position
|
||||
// after all karts are reset
|
||||
setTrans(getBody()->getWorldTransform());
|
||||
} // kartIsInRest
|
||||
} // kartIsInRest
|
||||
|
@ -64,7 +64,7 @@ protected:
|
||||
/** The kart properties. */
|
||||
const KartProperties *m_kart_properties;
|
||||
|
||||
/** The per-player difficulty. */
|
||||
/** The per-player difficulty. */
|
||||
const PlayerDifficulty *m_difficulty;
|
||||
|
||||
/** This stores a copy of the kart model. It has to be a copy
|
||||
@ -170,7 +170,7 @@ public:
|
||||
float getHighestPoint() const { return m_kart_highest_point; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Called after the kart comes to rest. It can be used to e.g. compute
|
||||
* differences between graphical and physical chassis. Note that
|
||||
* differences between graphical and physical chassis. Note that
|
||||
* overwriting this function is possible, but this implementation must
|
||||
* be called. */
|
||||
virtual void kartIsInRestNow();
|
||||
|
@ -79,7 +79,7 @@ ExplosionAnimation::ExplosionAnimation(AbstractKart *kart,
|
||||
m_orig_y = m_xyz.getY();
|
||||
m_kart->playCustomSFX(SFXManager::CUSTOM_EXPLODE);
|
||||
m_timer = m_kart->getKartProperties()->getExplosionTime() *
|
||||
m_kart->getPlayerDifficulty()->getExplosionTime();
|
||||
m_kart->getPlayerDifficulty()->getExplosionTime();
|
||||
|
||||
// Non-direct hits will be only affected half as much.
|
||||
if(!direct_hit) m_timer*=0.5f;
|
||||
@ -107,7 +107,7 @@ ExplosionAnimation::ExplosionAnimation(AbstractKart *kart,
|
||||
|
||||
// Set invulnerable time, and graphical effects
|
||||
float t = m_kart->getKartProperties()->getExplosionInvulnerabilityTime() *
|
||||
m_kart->getPlayerDifficulty()->getExplosionInvulnerabilityTime();
|
||||
m_kart->getPlayerDifficulty()->getExplosionInvulnerabilityTime();
|
||||
m_kart->setInvulnerableTime(t);
|
||||
if ( UserConfigParams::m_graphical_effects )
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
GhostKart::GhostKart(const std::string& ident)
|
||||
: Kart(ident, /*world kart id*/99999,
|
||||
/*position*/-1, btTransform(), stk_config->getPlayerDifficulty(
|
||||
PLAYER_DIFFICULTY_NORMAL))
|
||||
PLAYER_DIFFICULTY_NORMAL))
|
||||
{
|
||||
m_current_transform = 0;
|
||||
m_next_event = 0;
|
||||
|
@ -609,7 +609,7 @@ void Kart::createPhysics()
|
||||
{
|
||||
int index = (x + 1) / 2 + 1 - z; // get index of wheel
|
||||
float f = getKartProperties()->getPhysicalWheelPosition();
|
||||
// f < 0 indicates to use the old physics position, i.e.
|
||||
// f < 0 indicates to use the old physics position, i.e.
|
||||
// to place the wheels outside of the chassis
|
||||
if(f<0)
|
||||
{
|
||||
@ -925,7 +925,7 @@ void Kart::collectedItem(Item *item, int add_info)
|
||||
m_bubblegum_torque = ((rand()%2)
|
||||
? m_kart_properties->getBubblegumTorque()
|
||||
: -m_kart_properties->getBubblegumTorque()) *
|
||||
m_difficulty->getBubblegumTorque();
|
||||
m_difficulty->getBubblegumTorque();
|
||||
m_max_speed->setSlowdown(MaxSpeed::MS_DECREASE_BUBBLE,
|
||||
m_kart_properties->getBubblegumSpeedFraction() *
|
||||
m_difficulty->getBubblegumSpeedFraction(),
|
||||
@ -958,13 +958,13 @@ float Kart::getActualWheelForce()
|
||||
for(unsigned int i=0; i<gear_ratio.size(); i++)
|
||||
{
|
||||
if(m_speed <= m_kart_properties->getMaxSpeed() *
|
||||
m_difficulty->getMaxSpeed() * gear_ratio[i])
|
||||
m_difficulty->getMaxSpeed() * gear_ratio[i])
|
||||
{
|
||||
assert(!isnan(m_kart_properties->getMaxPower() *
|
||||
m_difficulty->getMaxPower()));
|
||||
m_difficulty->getMaxPower()));
|
||||
assert(!isnan(m_kart_properties->getGearPowerIncrease()[i]));
|
||||
return m_kart_properties->getMaxPower() *
|
||||
m_difficulty->getMaxPower()
|
||||
m_difficulty->getMaxPower()
|
||||
*m_kart_properties->getGearPowerIncrease()[i]
|
||||
+add_force;
|
||||
}
|
||||
@ -1642,32 +1642,32 @@ void Kart::handleZipper(const Material *material, bool play_sound)
|
||||
&speed_gain, &fade_out_time, &engine_force);
|
||||
if(max_speed_increase<0)
|
||||
max_speed_increase = m_kart_properties->getZipperMaxSpeedIncrease() *
|
||||
m_difficulty->getZipperMaxSpeedIncrease();
|
||||
m_difficulty->getZipperMaxSpeedIncrease();
|
||||
if(duration<0)
|
||||
duration = m_kart_properties->getZipperTime() *
|
||||
m_difficulty->getZipperTime();
|
||||
m_difficulty->getZipperTime();
|
||||
if(speed_gain<0)
|
||||
speed_gain = m_kart_properties->getZipperSpeedGain() *
|
||||
m_difficulty->getZipperSpeedGain();
|
||||
m_difficulty->getZipperSpeedGain();
|
||||
if(fade_out_time<0)
|
||||
fade_out_time = m_kart_properties->getZipperFadeOutTime() *
|
||||
m_difficulty->getZipperFadeOutTime();
|
||||
m_difficulty->getZipperFadeOutTime();
|
||||
if(engine_force<0)
|
||||
engine_force = m_kart_properties->getZipperForce() *
|
||||
m_difficulty->getZipperForce();
|
||||
m_difficulty->getZipperForce();
|
||||
}
|
||||
else
|
||||
{
|
||||
max_speed_increase = m_kart_properties->getZipperMaxSpeedIncrease() *
|
||||
m_difficulty->getZipperMaxSpeedIncrease();
|
||||
m_difficulty->getZipperMaxSpeedIncrease();
|
||||
duration = m_kart_properties->getZipperTime() *
|
||||
m_difficulty->getZipperTime();
|
||||
m_difficulty->getZipperTime();
|
||||
speed_gain = m_kart_properties->getZipperSpeedGain() *
|
||||
m_difficulty->getZipperSpeedGain();
|
||||
m_difficulty->getZipperSpeedGain();
|
||||
fade_out_time = m_kart_properties->getZipperFadeOutTime() *
|
||||
m_difficulty->getZipperFadeOutTime();
|
||||
m_difficulty->getZipperFadeOutTime();
|
||||
engine_force = m_kart_properties->getZipperForce() *
|
||||
m_difficulty->getZipperForce();
|
||||
m_difficulty->getZipperForce();
|
||||
}
|
||||
// Ignore a zipper that's activated while braking
|
||||
if(m_controls.m_brake || m_speed<0) return;
|
||||
@ -1706,7 +1706,7 @@ void Kart::updateNitro(float dt)
|
||||
return;
|
||||
}
|
||||
m_collected_energy -= dt * m_kart_properties->getNitroConsumption() *
|
||||
m_difficulty->getNitroConsumption();
|
||||
m_difficulty->getNitroConsumption();
|
||||
if (m_collected_energy < 0)
|
||||
{
|
||||
m_collected_energy = 0;
|
||||
@ -2458,7 +2458,7 @@ void Kart::kartIsInRestNow()
|
||||
f += wi.m_chassisConnectionPointCS.getY()
|
||||
- wi.m_raycastInfo.m_suspensionLength - wi.m_wheelsRadius;
|
||||
}
|
||||
m_graphical_y_offset = f/m_vehicle->getNumWheels()
|
||||
m_graphical_y_offset = f/m_vehicle->getNumWheels()
|
||||
+ getKartProperties()->getGraphicalYOffset();
|
||||
|
||||
m_kart_model->setDefaultSuspension();
|
||||
@ -2485,7 +2485,7 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz,
|
||||
// fabs(speed) is important, otherwise the negative number will
|
||||
// become a huge unsigned number in the particle scene node!
|
||||
float f = fabsf(getSpeed())/m_kart_properties->getMaxSpeed() *
|
||||
m_difficulty->getMaxSpeed();
|
||||
m_difficulty->getMaxSpeed();
|
||||
// The speed of the kart can be higher (due to powerups) than
|
||||
// the normal maximum speed of the kart.
|
||||
if(f>1.0f) f = 1.0f;
|
||||
@ -2517,7 +2517,7 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz,
|
||||
// its maximum speed, but not the current speed (by much). On the
|
||||
// other hand, that ratio can often be greater than 1.
|
||||
float speed_frac = m_speed / m_kart_properties->getMaxSpeed() *
|
||||
m_difficulty->getMaxSpeed();
|
||||
m_difficulty->getMaxSpeed();
|
||||
if(speed_frac>1.0f)
|
||||
speed_frac = 1.0f;
|
||||
else if (speed_frac < 0.0f) // no leaning when backwards driving
|
||||
@ -2573,7 +2573,7 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz,
|
||||
float lean_height = tan(fabsf(m_current_lean)) * getKartWidth()*0.5f;
|
||||
|
||||
float heading = m_skidding->getVisualSkidRotation();
|
||||
Vec3 center_shift = Vec3(0, m_skidding->getGraphicalJumpOffset()
|
||||
Vec3 center_shift = Vec3(0, m_skidding->getGraphicalJumpOffset()
|
||||
+ lean_height +m_graphical_y_offset, 0);
|
||||
center_shift = getTrans().getBasis() * center_shift;
|
||||
|
||||
|
@ -276,7 +276,7 @@ void KartGFX::updateTerrain(const ParticleKind *pk)
|
||||
rate = fabsf(m_kart->getControls().m_steer) > 0.8 ? skidding - 1 : 0;
|
||||
else if (speed >= 0.5f && on_ground)
|
||||
rate = speed/m_kart->getKartProperties()->getMaxSpeed() *
|
||||
m_kart->getPlayerDifficulty()->getMaxSpeed();
|
||||
m_kart->getPlayerDifficulty()->getMaxSpeed();
|
||||
else
|
||||
{
|
||||
pe->setCreationRateAbsolute(0);
|
||||
|
@ -764,7 +764,7 @@ void KartModel::setDefaultSuspension()
|
||||
* \param rotation_dt How far the wheels have rotated since last time.
|
||||
* \param steer The actual steer settings.
|
||||
* \param suspension Suspension height for all four wheels.
|
||||
* \param speed The speed of the kart in meters/sec, used for the
|
||||
* \param speed The speed of the kart in meters/sec, used for the
|
||||
* speed-weighted objects' animations
|
||||
*/
|
||||
void KartModel::update(float dt, float rotation_dt, float steer, float speed)
|
||||
|
@ -177,7 +177,7 @@ private:
|
||||
float m_min_suspension[4];
|
||||
|
||||
/** Maximum suspension length (i.e. most extended). If the displayed
|
||||
* suspension is any longer, the wheel would look too far away from the
|
||||
* suspension is any longer, the wheel would look too far away from the
|
||||
* chassis. */
|
||||
float m_max_suspension[4];
|
||||
|
||||
|
@ -92,7 +92,7 @@ KartProperties::KartProperties(const std::string &filename)
|
||||
m_squash_duration = m_downward_impulse_factor =
|
||||
m_bubblegum_fade_in_time = m_bubblegum_speed_fraction =
|
||||
m_bubblegum_time = m_bubblegum_torque = m_jump_animation_time =
|
||||
m_smooth_flying_impulse = m_physical_wheel_position =
|
||||
m_smooth_flying_impulse = m_physical_wheel_position =
|
||||
m_graphical_y_offset =
|
||||
UNDEFINED;
|
||||
|
||||
|
@ -151,8 +151,8 @@ private:
|
||||
Vec3 m_bevel_factor;
|
||||
|
||||
/** The position of the physical wheel is a weighted average of the
|
||||
* two ends of the beveled shape. This determines the weight: 0 =
|
||||
* a the widest end, 1 = at the narrowest front end. If the value is
|
||||
* two ends of the beveled shape. This determines the weight: 0 =
|
||||
* a the widest end, 1 = at the narrowest front end. If the value is
|
||||
* < 0, the old physics settings are used which places the raycast
|
||||
* wheels outside of the chassis - but result in a more stable
|
||||
* physics behaviour (which is therefore atm still the default).
|
||||
@ -528,7 +528,7 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the torque scaling factor used to keep the karts parallel to
|
||||
* the ground when flying. */
|
||||
float getSmoothFlyingImpulse() const
|
||||
float getSmoothFlyingImpulse() const
|
||||
{
|
||||
return m_smooth_flying_impulse;
|
||||
} // getSmoothFlyingImpulse
|
||||
@ -928,13 +928,13 @@ public:
|
||||
const Vec3 &getBevelFactor() const { return m_bevel_factor; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns position of the physical wheel is a weighted average of the
|
||||
* two ends of the beveled shape. This determines the weight: 0 =
|
||||
* two ends of the beveled shape. This determines the weight: 0 =
|
||||
* a the widest end, 1 = at the narrowest, front end. If the value is <0,
|
||||
* the old physics position is picked, which placed the raycast wheels
|
||||
* outside of the chassis, but gives more stable physics. */
|
||||
const float getPhysicalWheelPosition() const
|
||||
const float getPhysicalWheelPosition() const
|
||||
{
|
||||
return m_physical_wheel_position;
|
||||
return m_physical_wheel_position;
|
||||
} // getPhysicalWheelPosition
|
||||
}; // KartProperties
|
||||
|
||||
|
@ -61,7 +61,7 @@ MaxSpeed::MaxSpeed(AbstractKart *kart)
|
||||
void MaxSpeed::reset()
|
||||
{
|
||||
m_current_max_speed = m_kart->getKartProperties()->getMaxSpeed() *
|
||||
m_kart->getPlayerDifficulty()->getMaxSpeed();
|
||||
m_kart->getPlayerDifficulty()->getMaxSpeed();
|
||||
m_min_speed = -1.0f;
|
||||
|
||||
for(unsigned int i=MS_DECREASE_MIN; i<MS_DECREASE_MAX; i++)
|
||||
@ -242,7 +242,7 @@ void MaxSpeed::update(float dt)
|
||||
|
||||
m_add_engine_force = 0;
|
||||
m_current_max_speed = m_kart->getKartProperties()->getMaxSpeed() *
|
||||
m_kart->getPlayerDifficulty()->getMaxSpeed();
|
||||
m_kart->getPlayerDifficulty()->getMaxSpeed();
|
||||
|
||||
// Then add the speed increase from each category
|
||||
// ----------------------------------------------
|
||||
|
@ -40,7 +40,7 @@ RescueAnimation::RescueAnimation(AbstractKart *kart, bool is_auto_rescue)
|
||||
m_referee = new Referee(*m_kart);
|
||||
m_kart->getNode()->addChild(m_referee->getSceneNode());
|
||||
m_timer = m_kart->getKartProperties()->getRescueTime() *
|
||||
m_kart->getPlayerDifficulty()->getRescueTime();
|
||||
m_kart->getPlayerDifficulty()->getRescueTime();
|
||||
m_velocity = m_kart->getKartProperties()->getRescueHeight() / m_timer;
|
||||
m_xyz = m_kart->getXYZ();
|
||||
|
||||
|
@ -478,7 +478,7 @@ AbstractKart *SoccerWorld::createKart(const std::string &kart_ident, int index,
|
||||
btTransform init_pos = m_track->getStartTransform(posIndex);
|
||||
|
||||
AbstractKart *new_kart = new Kart(kart_ident, index, position, init_pos,
|
||||
difficulty);
|
||||
difficulty);
|
||||
new_kart->init(race_manager->getKartType(index));
|
||||
Controller *controller = NULL;
|
||||
|
||||
|
@ -179,7 +179,7 @@ void World::init()
|
||||
int local_player_id = race_manager->getKartLocalPlayerId(i);
|
||||
int global_player_id = race_manager->getKartGlobalPlayerId(i);
|
||||
const PlayerDifficulty *player_difficulty =
|
||||
stk_config->getPlayerDifficulty(race_manager->getPlayerDifficulty(i));
|
||||
stk_config->getPlayerDifficulty(race_manager->getPlayerDifficulty(i));
|
||||
AbstractKart* newkart = createKart(kart_ident, i, local_player_id,
|
||||
global_player_id,
|
||||
race_manager->getKartType(i),
|
||||
@ -202,7 +202,7 @@ void World::init()
|
||||
|
||||
if (UserConfigParams::m_weather_effects)
|
||||
{
|
||||
m_weather = new Weather(m_track->getWeatherLightning(),
|
||||
m_weather = new Weather(m_track->getWeatherLightning(),
|
||||
m_track->getWeatherSound());
|
||||
}
|
||||
} // init
|
||||
@ -299,7 +299,7 @@ AbstractKart *World::createKart(const std::string &kart_ident, int index,
|
||||
int position = index+1;
|
||||
btTransform init_pos = m_track->getStartTransform(index);
|
||||
AbstractKart *new_kart = new Kart(kart_ident, index, position, init_pos,
|
||||
difficulty);
|
||||
difficulty);
|
||||
new_kart->init(race_manager->getKartType(index));
|
||||
Controller *controller = NULL;
|
||||
switch(kart_type)
|
||||
|
@ -65,7 +65,7 @@ void WorldStatus::reset()
|
||||
|
||||
IrrlichtDevice *device = irr_driver->getDevice();
|
||||
|
||||
if (device->getTimer()->isStopped())
|
||||
if (device->getTimer()->isStopped())
|
||||
device->getTimer()->start();
|
||||
} // reset
|
||||
|
||||
@ -79,7 +79,7 @@ WorldStatus::~WorldStatus()
|
||||
sfx_manager->deleteSFX(m_track_intro_sound);
|
||||
IrrlichtDevice *device = irr_driver->getDevice();
|
||||
|
||||
if (device->getTimer()->isStopped())
|
||||
if (device->getTimer()->isStopped())
|
||||
device->getTimer()->start();
|
||||
} // ~WorldStatus
|
||||
|
||||
@ -172,7 +172,7 @@ void WorldStatus::update(const float dt)
|
||||
|
||||
m_auxiliary_timer = 0.0f;
|
||||
|
||||
if (m_play_racestart_sounds)
|
||||
if (m_play_racestart_sounds)
|
||||
m_prestart_sound->play();
|
||||
|
||||
m_phase = READY_PHASE;
|
||||
@ -341,7 +341,7 @@ void WorldStatus::pause(Phase phase)
|
||||
m_phase = phase;
|
||||
IrrlichtDevice *device = irr_driver->getDevice();
|
||||
|
||||
if (!device->getTimer()->isStopped())
|
||||
if (!device->getTimer()->isStopped())
|
||||
device->getTimer()->stop();
|
||||
} // pause
|
||||
|
||||
@ -356,6 +356,6 @@ void WorldStatus::unpause()
|
||||
m_previous_phase = UNDEFINED_PHASE;
|
||||
IrrlichtDevice *device = irr_driver->getDevice();
|
||||
|
||||
if (device->getTimer()->isStopped())
|
||||
if (device->getTimer()->isStopped())
|
||||
device->getTimer()->start();
|
||||
} // unpause
|
||||
|
@ -103,13 +103,13 @@ namespace Online
|
||||
* \param path The path to add to the server.(see API::USER_*)
|
||||
* \param action The action to perform. eg: connect, pool
|
||||
*/
|
||||
void HTTPRequest::setApiURL(const std::string& path,
|
||||
void HTTPRequest::setApiURL(const std::string& path,
|
||||
const std::string &action)
|
||||
{
|
||||
// Old (0.8.1) API: send to client-user.php, and add action as a parameter
|
||||
if(UserConfigParams::m_server_version==1)
|
||||
{
|
||||
setURL( (std::string)UserConfigParams::m_server_multiplayer +
|
||||
setURL( (std::string)UserConfigParams::m_server_multiplayer +
|
||||
"client-user.php" );
|
||||
if(action=="change-password")
|
||||
addParameter("action", "change_password");
|
||||
|
@ -190,7 +190,7 @@ void Physics::update(float dt)
|
||||
AbstractKart *kart = p->getUserPointer(1)->getPointerKart();
|
||||
const KartProperties* kp = kart->getKartProperties();
|
||||
kart->setSquash(kp->getSquashDuration() * kart->getPlayerDifficulty()->getSquashDuration(),
|
||||
kp->getSquashSlowdown() * kart->getPlayerDifficulty()->getSquashSlowdown());
|
||||
kp->getSquashSlowdown() * kart->getPlayerDifficulty()->getSquashSlowdown());
|
||||
}
|
||||
else if(obj->isSoccerBall())
|
||||
{
|
||||
@ -220,7 +220,7 @@ void Physics::update(float dt)
|
||||
AbstractKart *kart = p->getUserPointer(1)->getPointerKart();
|
||||
const KartProperties* kp = kart->getKartProperties();
|
||||
kart->setSquash(kp->getSquashDuration() * kart->getPlayerDifficulty()->getSquashDuration(),
|
||||
kp->getSquashSlowdown() * kart->getPlayerDifficulty()->getSquashSlowdown());
|
||||
kp->getSquashSlowdown() * kart->getPlayerDifficulty()->getSquashSlowdown());
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -57,7 +57,7 @@ GrandPrixData::GrandPrixData(const std::string& filename)
|
||||
* \param new_tracks If true, new tracks are selected, otherwise existing
|
||||
* tracks will not be changed (used to e.g. increase the number of
|
||||
* tracks in an already existing random grand prix).
|
||||
*
|
||||
*
|
||||
*/
|
||||
void GrandPrixData::createRandomGP(const unsigned int number_of_tracks,
|
||||
const std::string &track_group,
|
||||
|
@ -374,8 +374,8 @@ public:
|
||||
*/
|
||||
void setLocalKartSoccerTeam(unsigned int player_id, SoccerTeam team);
|
||||
|
||||
/** Sets the per-player difficulty for a player.
|
||||
*/
|
||||
/** Sets the per-player difficulty for a player.
|
||||
*/
|
||||
void setPlayerDifficulty(unsigned int player_id, PerPlayerDifficulty difficulty);
|
||||
|
||||
/** Sets the number of local players playing on this computer (including
|
||||
|
@ -51,4 +51,4 @@ static std::vector<T> createVector(Args...args)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
namespace STK {
|
||||
|
||||
|
||||
// tuple
|
||||
// tuple
|
||||
template<typename... _Types> class Tuple;
|
||||
|
||||
// empty tuple
|
||||
|
Loading…
x
Reference in New Issue
Block a user