mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-24 07:33:12 +09:00
Add spectate check to stop_follow (#285)
This commit is contained in:
1 parent
943adeecbf
commit
65e254ec45
1 file changed
+3
-1
@@ -85,7 +85,9 @@ end
|
|||||||
-- @tparam LuaPlayer player The player that will regain control of their camera
|
-- @tparam LuaPlayer player The player that will regain control of their camera
|
||||||
function Public.stop_follow(player)
|
function Public.stop_follow(player)
|
||||||
assert(player and player.valid, 'Invalid player given to follower')
|
assert(player and player.valid, 'Invalid player given to follower')
|
||||||
if following[player.index] and following[player.index][4] then Public.stop_spectate(player) end
|
if following[player.index] and following[player.index][4] and Public.is_spectating(player) then
|
||||||
|
Public.stop_spectate(player)
|
||||||
|
end
|
||||||
|
|
||||||
Gui.destroy_if_valid(player.gui.screen[follow_label.name])
|
Gui.destroy_if_valid(player.gui.screen[follow_label.name])
|
||||||
following[player.index] = nil
|
following[player.index] = nil
|
||||||
|
|||||||
Reference in new issue
Block a user