Fix powerup zipper fire missing in remote karts
This commit is contained in:
parent
e0d7e58bda
commit
569042afa4
@ -384,6 +384,7 @@ void Kart::reset()
|
|||||||
m_bounce_back_ticks = 0;
|
m_bounce_back_ticks = 0;
|
||||||
m_brake_ticks = 0;
|
m_brake_ticks = 0;
|
||||||
m_ticks_last_crash = 0;
|
m_ticks_last_crash = 0;
|
||||||
|
m_ticks_last_zipper = 0;
|
||||||
m_speed = 0.0f;
|
m_speed = 0.0f;
|
||||||
m_current_lean = 0.0f;
|
m_current_lean = 0.0f;
|
||||||
m_falling_time = 0.0f;
|
m_falling_time = 0.0f;
|
||||||
@ -2247,8 +2248,10 @@ void Kart::handleZipper(const Material *material, bool play_sound)
|
|||||||
stk_config->time2Ticks(duration),
|
stk_config->time2Ticks(duration),
|
||||||
stk_config->time2Ticks(fade_out_time));
|
stk_config->time2Ticks(fade_out_time));
|
||||||
// Play custom character sound (weee!)
|
// Play custom character sound (weee!)
|
||||||
if (!RewindManager::get()->isRewinding())
|
int zipper_ticks = World::getWorld()->getTicksSinceStart();
|
||||||
|
if (zipper_ticks > m_ticks_last_zipper)
|
||||||
{
|
{
|
||||||
|
m_ticks_last_zipper = zipper_ticks;
|
||||||
playCustomSFX(SFXManager::CUSTOM_ZIPPER);
|
playCustomSFX(SFXManager::CUSTOM_ZIPPER);
|
||||||
m_controller->handleZipper(play_sound);
|
m_controller->handleZipper(play_sound);
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,10 @@ protected:
|
|||||||
SFXBuffer *m_crash_sounds[CRASH_SOUND_COUNT];
|
SFXBuffer *m_crash_sounds[CRASH_SOUND_COUNT];
|
||||||
SFXBuffer *m_goo_sound;
|
SFXBuffer *m_goo_sound;
|
||||||
SFXBuffer *m_boing_sound;
|
SFXBuffer *m_boing_sound;
|
||||||
|
/* Used to avoid re-play the sound during rewinding, if it's happening at
|
||||||
|
* the same ticks. */
|
||||||
int m_ticks_last_crash;
|
int m_ticks_last_crash;
|
||||||
|
int m_ticks_last_zipper;
|
||||||
RaceManager::KartType m_type;
|
RaceManager::KartType m_type;
|
||||||
|
|
||||||
void updatePhysics(int ticks);
|
void updatePhysics(int ticks);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user