online fix
This commit is contained in:
@@ -210,7 +210,7 @@ namespace MegaKoop.Game.Networking
|
|||||||
EnemyDefinitionRegistry.Register(definition);
|
EnemyDefinitionRegistry.Register(definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DetermineAuthority() || networkManager == null)
|
if (!IsHostClient() || networkManager == null)
|
||||||
{
|
{
|
||||||
if (hasPendingRemoteSpawn)
|
if (hasPendingRemoteSpawn)
|
||||||
{
|
{
|
||||||
@@ -241,7 +241,7 @@ namespace MegaKoop.Game.Networking
|
|||||||
|
|
||||||
private void HandleInstanceDespawned(GameObject instance, EnemyDefinition definition)
|
private void HandleInstanceDespawned(GameObject instance, EnemyDefinition definition)
|
||||||
{
|
{
|
||||||
if (!DetermineAuthority() || networkManager == null)
|
if (!IsHostClient() || networkManager == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ namespace MegaKoop.Game.Networking
|
|||||||
|
|
||||||
private void HandleEnemySpawnMessage(NetworkMessage message)
|
private void HandleEnemySpawnMessage(NetworkMessage message)
|
||||||
{
|
{
|
||||||
if (DetermineAuthority())
|
if (IsHostClient())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -302,7 +302,7 @@ namespace MegaKoop.Game.Networking
|
|||||||
|
|
||||||
private void HandleEnemyDespawnMessage(NetworkMessage message)
|
private void HandleEnemyDespawnMessage(NetworkMessage message)
|
||||||
{
|
{
|
||||||
if (DetermineAuthority())
|
if (IsHostClient())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -351,5 +351,11 @@ namespace MegaKoop.Game.Networking
|
|||||||
identity.SetNetworkId(pendingRemoteSpawn.NetworkId);
|
identity.SetNetworkId(pendingRemoteSpawn.NetworkId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsHostClient()
|
||||||
|
{
|
||||||
|
RefreshNetworkManager();
|
||||||
|
return networkManager != null && networkManager.IsHost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
56788
Scenes/SimplePoly City - Low Poly Assets_Demo Scene.unity
Normal file
56788
Scenes/SimplePoly City - Low Poly Assets_Demo Scene.unity
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f51635c50073da5cabba6efdf303ee59
|
||||||
|
timeCreated: 1488638231
|
||||||
|
licenseType: Store
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user