Skip to content

Commit 71273dc

Browse files
committed
Another actor interaction fix.
1 parent 7ef9973 commit 71273dc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

IngameNetManager.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,8 +1425,11 @@ public void DestroyActor(Actor actor)
14251425
actorsOnTeam[actor.team].Remove(actor);
14261426

14271427
var nextActorIndexTeam = typeof(ActorManager).GetField("nextActorIndexTeam", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ActorManager.instance) as int[];
1428-
nextActorIndexTeam[0]--;
1429-
nextActorIndexTeam[1]--;
1428+
nextActorIndexTeam[actor.team]--;
1429+
1430+
var nextActorIndexF = typeof(ActorManager).GetField("nextActorIndex", BindingFlags.Instance | BindingFlags.NonPublic);
1431+
int nextActorIndex = (int)nextActorIndexF.GetValue(ActorManager.instance);
1432+
nextActorIndexF.SetValue(ActorManager.instance, nextActorIndex - 1);
14301433

14311434
ActorManager.Drop(actor);
14321435
Destroy(actor.controller);

0 commit comments

Comments
 (0)