Skip to content

Commit

Permalink
Fixed the crash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal78900 committed Sep 18, 2021
1 parent 42dc774 commit 982119b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
9 changes: 6 additions & 3 deletions WaitAndChillReborn/Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ internal void OnVerified(VerifiedEventArgs ev)
{
if (!Config.MultipleRooms)
{
ev.Player.Position = ChoosedSpawnPos;
ev.Player.Position = choosedSpawnPos;
}
else
{
Expand Down Expand Up @@ -116,7 +116,7 @@ internal void OnDied(DiedEventArgs ev)
{
if (!Config.MultipleRooms)
{
ev.Target.Position = ChoosedSpawnPos;
ev.Target.Position = choosedSpawnPos;
}
else
{
Expand Down Expand Up @@ -233,6 +233,9 @@ internal void OnRoundStarted()

foreach (ThrownProjectile throwable in Object.FindObjectsOfType<ThrownProjectile>())
{
if (throwable is Scp018Projectile scp018 && scp018.Rb.velocity.sqrMagnitude <= 1f)
continue;

throwable.transform.position = Vector3.zero;
Timing.CallDelayed(1f, () => NetworkServer.Destroy(throwable?.gameObject));
}
Expand Down Expand Up @@ -282,7 +285,7 @@ internal void OnRoundStarted()

private List<Vector3> possibleSpawnPoses = new List<Vector3>();

private Vector3 ChoosedSpawnPos;
private Vector3 choosedSpawnPos;

private CoroutineHandle lobbyTimer;

Expand Down
2 changes: 1 addition & 1 deletion WaitAndChillReborn/Methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ internal void SpawnManager()
}
}

ChoosedSpawnPos = possibleSpawnPoses[Random.Range(0, possibleSpawnPoses.Count)];
choosedSpawnPos = possibleSpawnPoses[Random.Range(0, possibleSpawnPoses.Count)];
}

internal void Scp079sDoors(bool state)
Expand Down
2 changes: 1 addition & 1 deletion WaitAndChillReborn/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override void OnDisabled()

public override string Name => "WaitAndChillReborn";
public override string Author => "Michal78900";
public override Version Version => new Version(3, 0, 3);
public override Version Version => new Version(3, 0, 4);
public override Version RequiredExiledVersion => new Version(3, 0, 0);
}
}
16 changes: 8 additions & 8 deletions WaitAndChillReborn/WaitAndChillReborn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,28 @@
<HintPath>..\..\..\Desktop\Exiled\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Exiled.API, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.API.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.API.dll</HintPath>
</Reference>
<Reference Include="Exiled.Bootstrap, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.Bootstrap.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.Bootstrap.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.CreditTags.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.CreditTags.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomItems, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.CustomItems.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.CustomItems.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.Events.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.Loader.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.Permissions.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="Exiled.Updater, Version=3.1.1.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.3.0.0-alpha.82\lib\net472\Exiled.Updater.dll</HintPath>
<HintPath>..\packages\EXILED.3.0.0-alpha.84\lib\net472\Exiled.Updater.dll</HintPath>
</Reference>
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
2 changes: 1 addition & 1 deletion WaitAndChillReborn/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EXILED" version="3.0.0-alpha.82" targetFramework="net472" />
<package id="EXILED" version="3.0.0-alpha.84" targetFramework="net472" />
</packages>

0 comments on commit 982119b

Please sign in to comment.