mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 18:35:34 +00:00
finally block so ForIdOverride is returned to normal
This commit is contained in:
parent
4db0df8527
commit
8ae21ede3d
@ -32,25 +32,29 @@ namespace QSB.Player.Events
|
||||
{
|
||||
// send response only to the requesting client
|
||||
ForIdOverride = message.FromId;
|
||||
|
||||
// if host, send worldobject and server states
|
||||
if (isHost)
|
||||
try
|
||||
{
|
||||
QSBEventManager.FireEvent(EventNames.QSBServerState, ServerStateManager.Instance.GetServerState());
|
||||
QSBEventManager.FireEvent(EventNames.QSBPlayerInformation);
|
||||
|
||||
if (WorldObjectManager.AllObjectsReady)
|
||||
// if host, send worldobject and server states
|
||||
if (isHost)
|
||||
{
|
||||
SendWorldObjectInfo();
|
||||
QSBEventManager.FireEvent(EventNames.QSBServerState, ServerStateManager.Instance.GetServerState());
|
||||
QSBEventManager.FireEvent(EventNames.QSBPlayerInformation);
|
||||
|
||||
if (WorldObjectManager.AllObjectsReady)
|
||||
{
|
||||
SendWorldObjectInfo();
|
||||
}
|
||||
}
|
||||
// if client, send player and client states
|
||||
else
|
||||
{
|
||||
QSBEventManager.FireEvent(EventNames.QSBPlayerInformation);
|
||||
}
|
||||
}
|
||||
// if client, send player and client states
|
||||
else
|
||||
finally
|
||||
{
|
||||
QSBEventManager.FireEvent(EventNames.QSBPlayerInformation);
|
||||
ForIdOverride = uint.MaxValue;
|
||||
}
|
||||
|
||||
ForIdOverride = uint.MaxValue;
|
||||
}
|
||||
|
||||
private void SendWorldObjectInfo()
|
||||
|
Loading…
x
Reference in New Issue
Block a user