Added brake_tick counter to the state (the longer you brake the
stronger you brake).
This commit is contained in:
parent
eebd5f2534
commit
da14ffc4de
2
src/karts/kart_rewinder.cpp
Normal file → Executable file
2
src/karts/kart_rewinder.cpp
Normal file → Executable 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
|
||||
// ------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user