Skip to content

Commit

Permalink
fix MJ12Jail deleting your biocells and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Die4Ever committed Jun 28, 2023
1 parent 79d5b59 commit c9400c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ function Inventory MoveNextItemTo(Inventory item, vector Location, name Tag)
}
item.DropFrom(Location);
item.Tag = Tag;// so we can find the item again later
item.bIsSecretGoal = true;// so they don't get deleted by DXRReduceItems
info("MoveNextItemTo "$item$" drop from: ("$Location$"), now at ("$item.Location$"), attempts: "$i);

// restore any ammo amounts for a weapon to default; Y|y: except for grenades
Expand Down
3 changes: 3 additions & 0 deletions DXRModules/DeusEx/Classes/DXRReduceItems.uc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ function ReduceItem(Inventory a)
{
local int mission, scale;

if(a.bIsSecretGoal) return;

mission = Clamp(dxr.dxInfo.missionNumber, 0, ArrayCount(mission_scaling)-1);
scale = mission_scaling[mission];

Expand Down Expand Up @@ -264,6 +266,7 @@ function ReduceSpawns(class<Inventory> classname, float percent)
{
if( PlayerPawn(a) != None ) continue;
if( PlayerPawn(a.Owner) != None ) continue;
if(a.bIsSecretGoal) continue;

_ReduceSpawn(Inventory(a), percent);
}
Expand Down

0 comments on commit c9400c2

Please sign in to comment.