* Use "if (!condition) { action }" instead of "if (condition) { /* Nothing */ } else { action }"
* Use proper indenting/style git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6176 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
19f1175c04
commit
0bcbf27b21
13
src/hci.c
13
src/hci.c
|
@ -1966,9 +1966,8 @@ INT_RETVAL intRunWidgets(void)
|
||||||
structX2 = world_coord(structX2) + TILE_UNITS / 2;
|
structX2 = world_coord(structX2) + TILE_UNITS / 2;
|
||||||
structY2 = world_coord(structY2) + TILE_UNITS / 2;
|
structY2 = world_coord(structY2) + TILE_UNITS / 2;
|
||||||
|
|
||||||
if(IsPlayerStructureLimitReached(selectedPlayer)) {
|
if (!IsPlayerStructureLimitReached(selectedPlayer))
|
||||||
/* Nothing */
|
{
|
||||||
} else {
|
|
||||||
// Set the droid order
|
// Set the droid order
|
||||||
if (intNumSelectedDroids(DROID_CONSTRUCT) == 0
|
if (intNumSelectedDroids(DROID_CONSTRUCT) == 0
|
||||||
&& intNumSelectedDroids(DROID_CYBORG_CONSTRUCT) == 0
|
&& intNumSelectedDroids(DROID_CYBORG_CONSTRUCT) == 0
|
||||||
|
@ -2024,10 +2023,10 @@ INT_RETVAL intRunWidgets(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CanBuild) {
|
if (CanBuild)
|
||||||
if(IsPlayerStructureLimitReached(selectedPlayer)) {
|
{
|
||||||
|
if (!IsPlayerStructureLimitReached(selectedPlayer))
|
||||||
} else {
|
{
|
||||||
// Set the droid order
|
// Set the droid order
|
||||||
if (intNumSelectedDroids(DROID_CONSTRUCT) == 0
|
if (intNumSelectedDroids(DROID_CONSTRUCT) == 0
|
||||||
&& intNumSelectedDroids(DROID_CYBORG_CONSTRUCT) == 0
|
&& intNumSelectedDroids(DROID_CYBORG_CONSTRUCT) == 0
|
||||||
|
|
|
@ -651,7 +651,8 @@ BOOL scrOrderDroidStatsLoc(void)
|
||||||
|
|
||||||
// Don't allow scripts to order structure builds if players structure
|
// Don't allow scripts to order structure builds if players structure
|
||||||
// limit has been reached.
|
// limit has been reached.
|
||||||
if(IsPlayerStructureLimitReached(psDroid->player) == false) {
|
if (!IsPlayerStructureLimitReached(psDroid->player))
|
||||||
|
{
|
||||||
orderDroidStatsLoc(psDroid, order, psStats, (UDWORD)x,(UDWORD)y);
|
orderDroidStatsLoc(psDroid, order, psStats, (UDWORD)x,(UDWORD)y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue