mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#NET Event blocker fix
This commit is contained in:
parent
66494b7b5a
commit
ff86bfb91d
@ -160,10 +160,16 @@ function NET:_EventHandler(EventData)
|
|||||||
local TNow = timer.getTime()
|
local TNow = timer.getTime()
|
||||||
if self.BlockedPilots[name] and TNow < self.BlockedPilots[name] then
|
if self.BlockedPilots[name] and TNow < self.BlockedPilots[name] then
|
||||||
-- block pilot by name
|
-- block pilot by name
|
||||||
self:ReturnToSpectators(data.IniUnit)
|
local PlayerID = self:GetPlayerIDByName(name)
|
||||||
|
if PlayerID and tonumber(PlayerID) ~= 1 then
|
||||||
|
local outcome = net.force_player_slot(tonumber(PlayerID), 0, '' )
|
||||||
|
end
|
||||||
elseif self.BlockedUCIDs[ucid] and TNow < self.BlockedUCIDs[ucid] then
|
elseif self.BlockedUCIDs[ucid] and TNow < self.BlockedUCIDs[ucid] then
|
||||||
-- block pilot by ucid
|
-- block pilot by ucid
|
||||||
self:ReturnToSpectators(data.IniUnit)
|
local PlayerID = self:GetPlayerIDByName(name)
|
||||||
|
if PlayerID and tonumber(PlayerID) ~= 1 then
|
||||||
|
local outcome = net.force_player_slot(tonumber(PlayerID), 0, '' )
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self.KnownPilots[name] = true
|
self.KnownPilots[name] = true
|
||||||
self.BlockedPilots[name] = nil
|
self.BlockedPilots[name] = nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user