#include <src/Ext/WarheadType/Body.h>
List of all members.
Classes |
class | ExtData |
struct | VersesData |
Public Types |
typedef WarheadTypeClass | TT |
Static Public Member Functions |
static void | applyRipples (WarheadTypeClass *pWH, CoordStruct *coords) |
static void | applyIronCurtain (WarheadTypeClass *pWH, CoordStruct *coords, HouseClass *House, int damage) |
static void | applyEMP (WarheadTypeClass *pWH, CoordStruct *coords, TechnoClass *source) |
static bool | applyPermaMC (WarheadTypeClass *pWH, CoordStruct *coords, HouseClass *House, ObjectClass *Source) |
static void | applyOccupantDamage (BulletClass *) |
static bool | canWarheadAffectTarget (TechnoClass *, HouseClass *, WarheadTypeClass *) |
| Gets whether a Techno can be affected by a warhead fired by a house.
|
Static Public Attributes |
static Container< WarheadTypeExt > | ExtMap |
static WarheadTypeClass * | Temporal_WH = NULL |
static WarheadTypeClass * | EMP_WH = NULL |
static hash_map< IonBlastClass
*, WarheadTypeExt::ExtData * > | IonExt |
Member Typedef Documentation
Member Function Documentation
static void WarheadTypeExt::applyEMP |
( |
WarheadTypeClass * |
pWH, |
|
|
CoordStruct * |
coords, |
|
|
TechnoClass * |
source |
|
) |
| [inline, static] |
static void WarheadTypeExt::applyIronCurtain |
( |
WarheadTypeClass * |
pWH, |
|
|
CoordStruct * |
coords, |
|
|
HouseClass * |
House, |
|
|
int |
damage |
|
) |
| [inline, static] |
void WarheadTypeExt::applyOccupantDamage |
( |
BulletClass * |
Bullet | ) |
[static] |
This function checks if the projectile transporting the warhead should pass through the building's walls and deliver the warhead to the occupants instead. If so, it performs that effect.
- Note:
- Moved here from hook BulletClass_Fire.
-
This cannot logically be triggered in situations where the warhead is not delivered by a projectile, such as the GenericWarhead super weapon.
- Parameters:
-
- Todo:
- This should probably be moved to /Ext/Bullet/ instead, I just maintained the previous structure to ease transition. Since UC.DaMO (#778) in 0.5 will require a reimplementation of this logic anyway, we can probably just leave it here until then.
static bool WarheadTypeExt::applyPermaMC |
( |
WarheadTypeClass * |
pWH, |
|
|
CoordStruct * |
coords, |
|
|
HouseClass * |
House, |
|
|
ObjectClass * |
Source |
|
) |
| [inline, static] |
static void WarheadTypeExt::applyRipples |
( |
WarheadTypeClass * |
pWH, |
|
|
CoordStruct * |
coords |
|
) |
| [inline, static] |
bool WarheadTypeExt::canWarheadAffectTarget |
( |
TechnoClass * |
Target, |
|
|
HouseClass * |
SourceHouse, |
|
|
WarheadTypeClass * |
WH |
|
) |
| [static] |
Gets whether a Techno can be affected by a warhead fired by a house.
A warhead will not affect allies if AffectsAllies is not set and will not affect enemies if AffectsEnemies is not set.
- Parameters:
-
Target | The Techno WH is fired at. |
SourceHouse | The house that fired WH. |
- Returns:
- True if WH can affect Target, false otherwise.
- Author:
- AlexB
- Date:
- 2010-04-27
{
if (SourceHouse && Target && WH) {
bool alliedWithTarget = SourceHouse->IsAlliedWith(Target->Owner);
if (alliedWithTarget && !WH->AffectsAllies) {
return false;
}
WarheadTypeExt::ExtData *pWHdata = WarheadTypeExt::ExtMap.Find(WH);
if (!alliedWithTarget && !pWHdata->AffectsEnemies) {
return false;
}
}
return true;
}
Member Data Documentation
The documentation for this class was generated from the following files: