Skip to content

Commit

Permalink
fixed double StartRound bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GrafDimenzio committed Jan 10, 2021
1 parent c0615b9 commit 0cfc588
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion WaitAndChill/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Synapse.Api;
using System.Collections.Generic;
using UnityEngine;
using Mirror;

namespace WaitAndChill
{
Expand All @@ -14,7 +15,12 @@ private void OnWaiting()
{
GameObject.Find("StartRound").transform.localScale = Vector3.zero;
Timing.RunCoroutine(WaitingForPlayers());
Server.Get.Host.ClassManager.RpcRoundStarted();


var component = Server.Get.Host.ClassManager;
NetworkWriter writer = NetworkWriterPool.GetWriter();
component.SendRPCInternal(typeof(global::CharacterClassManager), "RpcRoundStarted", writer, 0);
NetworkWriterPool.Recycle(writer);
}

private IEnumerator<float> WaitingForPlayers()
Expand Down
2 changes: 1 addition & 1 deletion WaitAndChill/PluginClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace WaitAndChill
SynapseMajor = 2,
SynapseMinor = 4,
SynapsePatch = 2,
Version = "v.1.0.3"
Version = "v.1.0.4"
)]
public class PluginClass : AbstractPlugin
{
Expand Down
4 changes: 2 additions & 2 deletions WaitAndChill/WaitAndChill.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<Reference Include="LiteDB, Version=5.0.9.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL">
<HintPath>..\packages\LiteDB.5.0.9\lib\net45\LiteDB.dll</HintPath>
</Reference>
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.4.2\lib\net472\Mirror.dll</HintPath>
<Reference Include="Mirror_publicized">
<HintPath>..\..\..\Synapse\Refs\Mirror_publicized.dll</HintPath>
</Reference>
<Reference Include="Synapse, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.4.2\lib\net472\Synapse.dll</HintPath>
Expand Down

0 comments on commit 0cfc588

Please sign in to comment.