Skip to content

Commit

Permalink
fix PlaceholderEnemies hogging nanokeys and then getting deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Die4Ever committed Mar 26, 2024
1 parent 4b35d95 commit 224e431
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions DXRModules/DeusEx/Classes/DXREnemiesShuffle.uc
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ function SwapItems(Pawn a, Pawn b)
}

for(i=0; i<numa; i++) {
item = GiveExistingItem(a, newa[i]);
if(Robot(a) != None)
ThrowItem(item, 0.1);
GiveExistingItem(a, newa[i]);
}
for(i=0; i<numb; i++) {
item = GiveExistingItem(b, newb[i]);
if(Robot(b) != None)
ThrowItem(item, 0.1);
GiveExistingItem(b, newb[i]);
}
}

Expand Down Expand Up @@ -82,6 +78,7 @@ function SwapScriptedPawns(int percent, bool enemies)
local name exceptTag, exceptAlliance, keepTagName;
local bool keepTags;
local int num, i, slot;
local Inventory item, nextItem;

num=0;
switch(dxr.localURL) {
Expand Down Expand Up @@ -175,5 +172,13 @@ function SwapScriptedPawns(int percent, bool enemies)
}
if(a.Orders != 'DynamicPatrolling')// we pick these up later in DXREnemiesPatrols
ResetOrders(a);
if(#var(prefix)Robot(a) != None || PlaceholderEnemy(a) != None) {
for(item=a.Inventory; item != None; item=nextItem) {
nextItem = item.Inventory;
if(#var(prefix)NanoKey(item) != None) {
ThrowItem(item, 0.1);
}
}
}
}
}

0 comments on commit 224e431

Please sign in to comment.