Prevented the collision loop from running as many times as there are players.
This commit is contained in:
parent
83e08ed403
commit
e43973aef3
@ -44097,36 +44097,36 @@ MonoBehaviour:
|
|||||||
useAssignedLayers: 0
|
useAssignedLayers: 0
|
||||||
DynamicPrefabs: []
|
DynamicPrefabs: []
|
||||||
DynamicMaterials:
|
DynamicMaterials:
|
||||||
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 79cb8dae66bc60241b5964b24ff1ac7e, type: 2}
|
|
||||||
- {fileID: 2100000, guid: d811246c848733b4c8310b4dec5a5fdf, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
|
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
|
||||||
|
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
|
||||||
- {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2}
|
- {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2}
|
||||||
- {fileID: 2100000, guid: cc22c7f9de95cab4488b30fe8699a82a, type: 2}
|
- {fileID: 2100000, guid: cc22c7f9de95cab4488b30fe8699a82a, type: 2}
|
||||||
- {fileID: 2100000, guid: fe872fb72ad98da4dbb868481468e848, type: 2}
|
- {fileID: 2100000, guid: fe872fb72ad98da4dbb868481468e848, type: 2}
|
||||||
- {fileID: 2100000, guid: f025bfafc9ecec74aa3aab468ef837d7, type: 2}
|
|
||||||
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
|
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
|
||||||
- {fileID: 2100000, guid: accd304c49b7d6d43b97738e8e118342, type: 2}
|
- {fileID: 2100000, guid: accd304c49b7d6d43b97738e8e118342, type: 2}
|
||||||
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
|
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 95dd396b63c6ad4429ad37eedc63f20c, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 74aa3dbc50df9464e8d9d11815b389a7, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 79cb8dae66bc60241b5964b24ff1ac7e, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 5a56ded101f363e46861c8fe1c4f360e, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 50e427994e5b0224f966b200c577b78b, type: 2}
|
||||||
|
- {fileID: 2100000, guid: f025bfafc9ecec74aa3aab468ef837d7, type: 2}
|
||||||
|
- {fileID: 2100000, guid: d811246c848733b4c8310b4dec5a5fdf, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 82bace4c334919c4f92e87905c39fdf8, type: 2}
|
||||||
|
- {fileID: 2100000, guid: c4382cc6d54262b46913ae6fe8a3740e, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 7eb7cd9bfc12d4c4198d1874ca5a1aa4, type: 2}
|
||||||
- {fileID: 2100000, guid: c3186340e03d26341969d34663dbf8f3, type: 2}
|
- {fileID: 2100000, guid: c3186340e03d26341969d34663dbf8f3, type: 2}
|
||||||
- {fileID: 2100000, guid: 49170bf20870c7c45873b3c1966d86af, type: 2}
|
- {fileID: 2100000, guid: 49170bf20870c7c45873b3c1966d86af, type: 2}
|
||||||
- {fileID: 2100000, guid: bd8b723337ae5824fa61f693f76e943f, type: 2}
|
- {fileID: 2100000, guid: bd8b723337ae5824fa61f693f76e943f, type: 2}
|
||||||
- {fileID: 2100000, guid: faae26a849699fc4b804b74882a344df, type: 2}
|
- {fileID: 2100000, guid: faae26a849699fc4b804b74882a344df, type: 2}
|
||||||
- {fileID: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2}
|
- {fileID: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2}
|
||||||
- {fileID: 2100000, guid: 50e427994e5b0224f966b200c577b78b, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 220d5a1f1701e674794a1083cc2f0bac, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 82bace4c334919c4f92e87905c39fdf8, type: 2}
|
|
||||||
- {fileID: 2100000, guid: c4382cc6d54262b46913ae6fe8a3740e, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 7eb7cd9bfc12d4c4198d1874ca5a1aa4, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 95dd396b63c6ad4429ad37eedc63f20c, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 74aa3dbc50df9464e8d9d11815b389a7, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 5a56ded101f363e46861c8fe1c4f360e, type: 2}
|
|
||||||
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 71ede89a28bd60e4ca2918572046ba90, type: 2}
|
|
||||||
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, type: 2}
|
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, type: 2}
|
||||||
- {fileID: 2100000, guid: 341141e903fac3e4ca54a62259c6d01d, type: 2}
|
- {fileID: 2100000, guid: 71ede89a28bd60e4ca2918572046ba90, type: 2}
|
||||||
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
|
|
||||||
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
|
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
|
||||||
|
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 220d5a1f1701e674794a1083cc2f0bac, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 341141e903fac3e4ca54a62259c6d01d, type: 2}
|
||||||
LightMapsNear: []
|
LightMapsNear: []
|
||||||
LightMapsFar: []
|
LightMapsFar: []
|
||||||
LightMode: 0
|
LightMode: 0
|
||||||
|
|||||||
@ -135,7 +135,7 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
|
|
||||||
public void BeginRound()
|
public void BeginRound()
|
||||||
{
|
{
|
||||||
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.All, "Activated", true);
|
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
|
||||||
|
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(GameHasBeenLost), true);
|
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(GameHasBeenLost), true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.All, "Activated", true);
|
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NetworkCallable]
|
[NetworkCallable]
|
||||||
|
|||||||
@ -44,7 +44,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 15
|
Data: 16
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data:
|
Data:
|
||||||
@ -897,6 +897,60 @@ MonoBehaviour:
|
|||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: _CurrentOwner
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: _CurrentOwner
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 55|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: VRC.SDKBase.VRCPlayerApi, VRCSDKBase
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 55
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 56|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 13
|
Entry: 13
|
||||||
Data:
|
Data:
|
||||||
|
|||||||
@ -33,6 +33,8 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
private VRCPickup _PickupComponent;
|
private VRCPickup _PickupComponent;
|
||||||
private MeshRenderer _MarkerMesh;
|
private MeshRenderer _MarkerMesh;
|
||||||
|
|
||||||
|
private VRCPlayerApi _CurrentOwner;
|
||||||
|
|
||||||
private const int MAX_REPEAT_COLLISION_CHECKS = 3;
|
private const int MAX_REPEAT_COLLISION_CHECKS = 3;
|
||||||
private const int MAX_CHECKS_WITH_NO_COLLISIONS = 8;
|
private const int MAX_CHECKS_WITH_NO_COLLISIONS = 8;
|
||||||
private const float TIME_BETWEEN_REPEAT_COLLISION_CHECKS = 0.15f;
|
private const float TIME_BETWEEN_REPEAT_COLLISION_CHECKS = 0.15f;
|
||||||
@ -44,6 +46,14 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
_ObjectSync = GetComponent<LightSync>();
|
_ObjectSync = GetComponent<LightSync>();
|
||||||
_PickupComponent = GetComponent<VRCPickup>();
|
_PickupComponent = GetComponent<VRCPickup>();
|
||||||
_MarkerMesh = GetComponent<MeshRenderer>();
|
_MarkerMesh = GetComponent<MeshRenderer>();
|
||||||
|
|
||||||
|
_CurrentOwner = Networking.GetOwner(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnOwnershipTransferred(VRCPlayerApi Player)
|
||||||
|
{
|
||||||
|
_CurrentOwner = Player;
|
||||||
|
base.OnOwnershipTransferred(Player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -207,7 +217,7 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
|
|
||||||
RequestSerialization();
|
RequestSerialization();
|
||||||
|
|
||||||
if (Networking.GetOwner(gameObject) == Networking.LocalPlayer)
|
if (_CurrentOwner == Networking.LocalPlayer)
|
||||||
{
|
{
|
||||||
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.Owner, "CorrectResponse");
|
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.Owner, "CorrectResponse");
|
||||||
}
|
}
|
||||||
@ -222,7 +232,7 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
|
|
||||||
_EnableCollisionChecks = false;
|
_EnableCollisionChecks = false;
|
||||||
|
|
||||||
if (Networking.GetOwner(gameObject) == Networking.LocalPlayer)
|
if (_CurrentOwner == Networking.LocalPlayer)
|
||||||
{
|
{
|
||||||
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.Owner, "IncorrectResponse");
|
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.Owner, "IncorrectResponse");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user