Fix error message when displaying EMP VTOL bombs.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4927 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2008-05-04 16:22:48 +00:00
parent 88d85a26f7
commit d2956ea953
1 changed files with 8 additions and 7 deletions

View File

@ -183,10 +183,11 @@ UDWORD getComponentRadius(BASE_STATS *psComponent)
}
/* VTOL bombs are only stats allowed to have NULL ComponentIMD */
if ( (StatIsComponent(psComponent) != COMP_WEAPON) ||
((WEAPON_STATS *)psComponent)->weaponSubClass != WSC_BOMB )
if (StatIsComponent(psComponent) != COMP_WEAPON
|| (((WEAPON_STATS *)psComponent)->weaponSubClass != WSC_BOMB
&& ((WEAPON_STATS *)psComponent)->weaponSubClass != WSC_EMP))
{
debug(LOG_ERROR, "getComponentRadius: ComponentPIE == NULL");
ASSERT(ComponentIMD, "No ComponentIMD!");
}
return COMPONENT_RADIUS;
@ -593,11 +594,11 @@ void displayComponentButton(BASE_STATS *Stat, Vector3i *Rotation, Vector3i *Posi
}
/* VTOL bombs are only stats allowed to have NULL ComponentIMD */
if ( (ComponentIMD == NULL) &&
((StatIsComponent(Stat) != COMP_WEAPON) ||
((WEAPON_STATS *)Stat)->weaponSubClass != WSC_BOMB) )
if (StatIsComponent(Stat) != COMP_WEAPON
|| (((WEAPON_STATS *)Stat)->weaponSubClass != WSC_BOMB
&& ((WEAPON_STATS *)Stat)->weaponSubClass != WSC_EMP))
{
debug(LOG_ERROR, "ComponentPIE == NULL");
ASSERT(ComponentIMD, "No ComponentIMD");
}
if(MountIMD)