Skip to content

Commit 3722e5b

Browse files
committed
fix for RocketCore not playing goal effects in MP
1 parent ad80f6d commit 3722e5b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreGamemode.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Sandbox.Game;
1212
using VRageMath;
1313
using VRage.ModAPI;
14+
using static SC.SUGMA.GameModes.Domination.DominationGamemode;
1415

1516
namespace SC.SUGMA.GameModes.RocketCore
1617
{
@@ -73,7 +74,6 @@ public override void UpdateActive()
7374
continue;
7475
// Goal was made
7576
PointTracker.AddFactionPoints(zoneSet.Key, -1);
76-
SUGMA_SessionComponent.I.GetComponent<RocketCoreHud>("rocHud")?.GoalScored(zoneSet.Key);
7777

7878
if (_winningFaction != null)
7979
break;
@@ -160,6 +160,10 @@ public override void StartRound(string[] arguments = null)
160160
if (!MyAPIGateway.Utilities.IsDedicated)
161161
SUGMA_SessionComponent.I.RegisterComponent("rocHud", new RocketCoreHud(this));
162162

163+
PointTracker.OnPointsUpdated += (faction, points) =>
164+
{
165+
SUGMA_SessionComponent.I.GetComponent<RocketCoreHud>("rocHud")?.GoalScored(faction);
166+
};
163167
SpawnBall();
164168

165169
Log.Info("Started a ROC match." +

0 commit comments

Comments
 (0)