Skip to content

Commit 3b8eb98

Browse files
committed
remove locking restrictions
1 parent 23c2283 commit 3b8eb98

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Activities/GameActivity.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,12 @@ bool GameActivity::IsBuyGUIVisible(int which) const {
400400

401401
bool GameActivity::LockControlledActor(Players player, bool lock, Controller::InputMode lockToMode) {
402402
if (player >= Players::PlayerOne && player < Players::MaxPlayerCount) {
403+
bool prevLock = m_LuaLockActor[player];
403404
m_LuaLockActor[player] = lock;
404405
m_LuaLockActorMode[player] = lockToMode;
405-
if (m_pBuyGUI[player]->IsVisible() || m_InventoryMenuGUI[player]->IsVisible()) {
406-
m_LuaLockActor[player] = false;
407-
return false;
408-
}
409406
return true;
410407
}
408+
return false;
411409
}
412410

413411
//////////////////////////////////////////////////////////////////////////////////////////

Activities/GameActivity.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ class GameActivity : public Activity {
255255
/// <summary>
256256
/// Locks a player controlled actor to a specific controller mode.
257257
/// Locking the actor will disable player input, including switching actors.
258-
/// Locking will fail if the actor is already locked for another reason (such as being in a menu).
259258
/// </summary>
260259
/// <param name="player">Which player to lock the actor for.</param>
261260
/// <param name="lock">Whether to lock or unlock the actor. (Default: true)</param>

0 commit comments

Comments
 (0)