Skip to content

Commit

Permalink
Don't allow disabling replay controlller
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram authored Feb 24, 2019
1 parent dafa66d commit 644d3b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,9 @@ class LunaGameState : public Luna<GameState>
}
static int SetAutoplay(T* p, lua_State* L)
{
// Don't allow disabling replay controlller
if (PC_REPLAY == p->m_pPlayerState->m_PlayerController || PC_REPLAY == GamePreferences::m_AutoPlay)
return 0;
p->m_pPlayerState->m_PlayerController = BArg(1) ? PC_CPU : PC_HUMAN;
GamePreferences::m_AutoPlay.Set(p->m_pPlayerState->m_PlayerController);
return 0;
Expand Down

0 comments on commit 644d3b2

Please sign in to comment.