Skip to content

Commit

Permalink
Randomizer static function to call from CC effect for shuffle items
Browse files Browse the repository at this point in the history
  • Loading branch information
Die4Ever committed Apr 18, 2023
1 parent a3dc993 commit 002b1fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/Randomizer.uc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ class Randomizer extends Mutator;

function InitRando()
{
ShuffleItems();
ShuffleItems(self);
}

function ShuffleItems()
static function ShuffleItems(Actor a)
{
local Inventory item, items[512], weapons[128];
local int num_items, num_weapons, i, slot;

foreach AllActors(class'Inventory', item) {
foreach a.AllActors(class'Inventory', item) {
if(item.Owner != None) continue;
if(Weapon(item) != None)
weapons[num_weapons++] = item;
Expand All @@ -31,7 +31,7 @@ function ShuffleItems()
}
}

function SwapActors(Actor a, Actor b)
static function SwapActors(Actor a, Actor b)
{
local vector locA;
local Rotator rotA;
Expand Down

0 comments on commit 002b1fc

Please sign in to comment.