Skip to content

Commit d889df0

Browse files
authored
Merge pull request #41 from MengXinSheQu/master
修复世纪遗留BUG
2 parents 567eeeb + 112308c commit d889df0

2 files changed

Lines changed: 28 additions & 10 deletions

File tree

HelpSense/API/Events/CustomEventHandler.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ public class CustomEventHandler : CustomEventsHandler
9696
public static TranslateConfig TranslateConfig;
9797
public static SSSSTranslateConfig SSSSTranslateConfig;
9898
public static CommandTranslateConfig CommandTranslateConfig;
99+
100+
public IEnumerator<float> Scp029InfEffect(Player player)
101+
{
102+
while(true)
103+
{
104+
yield return Timing.WaitForSeconds(1f);
105+
if(!player.HasEffect<MovementBoost>())
106+
player.EnableEffect<MovementBoost>(20);
107+
if (!player.HasEffect<Scp1853>())
108+
player.EnableEffect<Scp1853>(2);
109+
if (!player.HasEffect<DamageReduction>())
110+
player.EnableEffect<DamageReduction>(15);
111+
if (player.GetRoleName() != "SCP-029")
112+
yield break;
113+
}
114+
}
99115

100116
public override void OnServerWaitingForPlayers()
101117
{
@@ -586,6 +602,8 @@ public override void OnServerRoundStarted()
586602
player.EnableEffect<DamageReduction>(15);
587603

588604
player.Health = 120;
605+
606+
Timing.RunCoroutine(Scp029InfEffect(player));
589607
};
590608
});
591609
}

HelpSense/Handler/LobbyLocationHandler.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public static void TowerLocation()
1414
{
1515
LobbyPosition = Random.Range(1, 6) switch
1616
{
17-
1 => new Vector3(162.893f, 1019.470f, -13.430f),
18-
2 => new Vector3(107.698f, 1014.048f, -12.555f),
19-
3 => new Vector3(39.262f, 1014.112f, -31.844f),
20-
4 => new Vector3(-15.854f, 1014.461f, -31.543f),
21-
5 => new Vector3(130.483f, 993.366f, 20.601f),
22-
_ => new Vector3(39.262f, 1014.112f, -31.844f),
17+
1 => new Vector3(162.893f, 319.470f, -13.430f),
18+
2 => new Vector3(107.698f, 314.048f, -12.555f),
19+
3 => new Vector3(39.262f, 314.112f, -31.844f),
20+
4 => new Vector3(-15.854f, 314.461f, -31.543f),
21+
5 => new Vector3(130.483f, 293.366f, 20.601f),
22+
_ => new Vector3(39.262f, 314.112f, -31.844f),
2323
};
2424
}
2525

@@ -36,13 +36,13 @@ public static void IntercomLocation()
3636

3737
public static void MountainLocation()
3838
{
39-
LobbyPosition = new Vector3(103.492f, 998.946f, 24.672f);
39+
LobbyPosition = new Vector3(103.492f, 298.946f, 24.672f);
4040
}
4141

4242
public static void ChaosLocation()
4343
{
44-
LobbyPosition = new Vector3(-49.074f, 989.055f, -42.844f);
45-
//LobbyPosition = new Vector3(-7.500f, 995.402f, -7.910f);
44+
LobbyPosition = new Vector3(-49.074f, 289.055f, -42.844f);
45+
//LobbyPosition = new Vector3(-7.500f, 295.402f, -7.910f);
4646
}
4747
}
48-
}
48+
}

0 commit comments

Comments
 (0)