Added brake_tick counter to the state (the longer you brake the

stronger you brake).
This commit is contained in:
hiker 2018-06-01 21:40:00 +10:00
parent eebd5f2534
commit da14ffc4de

2
src/karts/kart_rewinder.cpp Normal file → Executable file
View File

@ -103,6 +103,7 @@ BareNetworkString* KartRewinder::saveState()
// -------------------------------------
getControls().saveState(buffer);
getController()->saveState(buffer);
buffer->addTime(m_brake_ticks);
// 3) Attachment, powerup, nitro
// -----------------------------
@ -154,6 +155,7 @@ void KartRewinder::restoreState(BareNetworkString *buffer, int count)
// ------------------------------
getControls().rewindTo(buffer);
getController()->rewindTo(buffer);
m_brake_ticks = buffer->getTime();
// 3) Attachment, powerup, nitro
// ------------------------------