mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
hopefully finished with RCon changes.
added more tests. fixed issues from event changes (there's most definitely still issues related to that)
This commit is contained in:
@ -181,10 +181,10 @@ namespace SharedLibraryCore
|
||||
/// asynchronously wait for GameEvent to be processed
|
||||
/// </summary>
|
||||
/// <returns>waitable task </returns>
|
||||
public Task<bool> WaitAsync(int timeOut = int.MaxValue) => Task.Run(() =>
|
||||
public Task<GameEvent> WaitAsync(int timeOut = int.MaxValue) => Task.Run(() =>
|
||||
{
|
||||
OnProcessed.Wait(timeOut);
|
||||
return !Failed;
|
||||
return this;
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
@ -214,7 +214,7 @@ namespace SharedLibraryCore
|
||||
/// <returns>true if event should be delayed, false otherwise</returns>
|
||||
public static bool ShouldTargetEventBeDelayed(GameEvent queuedEvent)
|
||||
{
|
||||
return queuedEvent.Target != null &&
|
||||
return (queuedEvent.Target != null && queuedEvent.Target.ClientNumber != -1) &&
|
||||
(queuedEvent.Target.State != Player.ClientState.Connected &&
|
||||
queuedEvent.Target.NetworkId != 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user