render playerlist

This commit is contained in:
2025-08-23 11:36:23 +02:00
parent 5b6254c690
commit 73dd2dabfa
6 changed files with 59 additions and 3 deletions

View File

@@ -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());
}