File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1425,8 +1425,11 @@ public void DestroyActor(Actor actor)
1425
1425
actorsOnTeam [ actor . team ] . Remove ( actor ) ;
1426
1426
1427
1427
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 ) ;
1430
1433
1431
1434
ActorManager . Drop ( actor ) ;
1432
1435
Destroy ( actor . controller ) ;
You can’t perform that action at this time.
0 commit comments