render playerlist
This commit is contained in:
@@ -40,9 +40,10 @@ class StateMachine {
|
||||
auto* currentState = m_State.get();
|
||||
auto newState = std::make_unique<T>(static_cast<TDerived&>(*this), std::forward<Args>(args)...);
|
||||
// This allows chaining
|
||||
if (m_State.get() == currentState)
|
||||
if (m_State.get() == currentState) {
|
||||
m_State = std::move(newState);
|
||||
OnStateChange(*m_State);
|
||||
OnStateChange(*m_State);
|
||||
}
|
||||
return static_cast<T*>(m_State.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user