Skip to content

Commit

Permalink
Cleanup proj_radiusSweep()
Browse files Browse the repository at this point in the history
Doesn't need a droid object passed to it.
  • Loading branch information
KJeff01 committed Nov 1, 2023
1 parent f19cf46 commit 48f1c60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/projectile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ static void proj_InFlightFunc(PROJECTILE *psProj)

/***************************************************************************/

static void proj_radiusSweep(PROJECTILE *psObj, WEAPON_STATS *psStats, DROID *destDroid, Vector3i &targetPos, bool empRadius)
static void proj_radiusSweep(PROJECTILE *psObj, WEAPON_STATS *psStats, Vector3i &targetPos, bool empRadius)
{
static GridList gridList; // static to avoid allocations.
gridList = gridStartIterate(targetPos.x, targetPos.y, (empRadius) ? psStats->upgrade[psObj->player].empRadius : psStats->upgrade[psObj->player].radius);
Expand Down Expand Up @@ -1277,11 +1277,11 @@ static void proj_ImpactFunc(PROJECTILE *psObj)

if (hasEMPRadius && psStats->weaponSubClass == WSC_EMP)
{
proj_radiusSweep(psObj, psStats, destDroid, targetPos, true);
proj_radiusSweep(psObj, psStats, targetPos, true);
}
if (hasRadius)
{
proj_radiusSweep(psObj, psStats, destDroid, targetPos, false);
proj_radiusSweep(psObj, psStats, targetPos, false);
}
}

Expand Down

0 comments on commit 48f1c60

Please sign in to comment.