Skip to content

Commit d07b9d4

Browse files
author
Motive
committed
- The @radius command will now modify the InnerRadius property as well as Radius. Thanks to Ghilleh at CortexRP.com: https://www.cortexrp.com/forums/viewtopic.php?f=12&t=2703
1 parent 252e31b commit d07b9d4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Commands/UnitCommands.galaxy

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,11 +1530,13 @@ bool libcrtx_command_radius(bool testConds, bool runActions)
15301530
UnitGroupLoopBegin(g);
15311531
while(!UnitGroupLoopDone())
15321532
{
1533-
val = CatalogFieldValueGet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()),
1534-
"Radius", UnitGetOwner(UnitGroupLoopCurrent()));
1533+
val = CatalogFieldValueGet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()), "Radius", UnitGetOwner(UnitGroupLoopCurrent()));
15351534
val = FixedToString(StringToFixed(val) * radius, 8);
1536-
CatalogFieldValueSet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()),
1537-
"Radius", UnitGetOwner(UnitGroupLoopCurrent()), val);
1535+
CatalogFieldValueSet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()), "Radius", UnitGetOwner(UnitGroupLoopCurrent()), val);
1536+
1537+
val = CatalogFieldValueGet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()), "InnerRadius", UnitGetOwner(UnitGroupLoopCurrent()));
1538+
val = FixedToString(StringToFixed(val) * radius, 8);
1539+
CatalogFieldValueSet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()), "InnerRadius", UnitGetOwner(UnitGroupLoopCurrent()), val);
15381540
UnitGroupLoopStep();
15391541
}
15401542
UnitGroupLoopEnd();
@@ -1544,8 +1546,8 @@ bool libcrtx_command_radius(bool testConds, bool runActions)
15441546
UnitGroupLoopBegin(g);
15451547
while(!UnitGroupLoopDone())
15461548
{
1547-
CatalogFieldValueSet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()),
1548-
"Radius", UnitGetOwner(UnitGroupLoopCurrent()), val);
1549+
CatalogFieldValueSet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()), "Radius", UnitGetOwner(UnitGroupLoopCurrent()), val);
1550+
CatalogFieldValueSet(c_gameCatalogUnit, UnitGetType(UnitGroupLoopCurrent()), "InnerRadius", UnitGetOwner(UnitGroupLoopCurrent()), val);
15491551
UnitGroupLoopStep();
15501552
}
15511553
UnitGroupLoopEnd();

0 commit comments

Comments
 (0)