#include <src/Ext/SWType/Body.h>
List of all members.
Member Typedef Documentation
Member Function Documentation
bool SWTypeExt::ChangeLighting |
( |
SuperClass * |
pThis | ) |
[static] |
bool SWTypeExt::ChangeLighting |
( |
SuperWeaponTypeClass * |
pThis | ) |
[static] |
void SWTypeExt::ClearChronoAnim |
( |
SuperClass * |
pThis | ) |
[static] |
{
DynamicVectorClass<SuperClass*>* pSupers = (DynamicVectorClass<SuperClass*>*)0xB0F5B8;
if(pThis->Animation) {
pThis->Animation->RemainingIterations = 0;
pThis->Animation = NULL;
int idx = pSupers->FindItemIndex(&pThis);
if(idx != -1) {
pSupers->RemoveItem(idx);
}
}
if(pThis->unknown_bool_6C) {
int idx = pSupers->FindItemIndex(&pThis);
if(idx != -1) {
pSupers->RemoveItem(idx);
}
pThis->unknown_bool_6C = false;
}
}
void SWTypeExt::CreateChronoAnim |
( |
SuperClass * |
pThis, |
|
|
CoordStruct * |
pCoords, |
|
|
AnimTypeClass * |
pAnimType |
|
) |
| [static] |
{
DynamicVectorClass<SuperClass*>* pSupers = (DynamicVectorClass<SuperClass*>*)0xB0F5B8;
ClearChronoAnim(pThis);
if(pAnimType && pCoords) {
AnimClass* pAnim = NULL;
GAME_ALLOC(AnimClass, pAnim, pAnimType, pCoords);
if(pAnim) {
SWTypeExt::ExtData *pData = SWTypeExt::ExtMap.Find(pThis->Type);
pAnim->Invisible = !pData->IsAnimVisible(pThis->Owner);
pThis->Animation = pAnim;
pSupers->AddItem(pThis);
}
}
}
bool SWTypeExt::Launch |
( |
SuperClass * |
pThis, |
|
|
NewSWType * |
pData, |
|
|
CellStruct * |
pCoords, |
|
|
byte |
IsPlayer |
|
) |
| [static] |
{
if(SWTypeExt::ExtData *pData = SWTypeExt::ExtMap.Find(pThis->Type)) {
if(pSW->Launch(pThis, pCoords, IsPlayer)) {
SuperWeaponFlags::Value flags = pSW->Flags();
if(flags & SuperWeaponFlags::PostClick) {
if(HouseExt::ExtData *pExt = HouseExt::ExtMap.Find(pThis->Owner)) {
if(pThis->Owner->Supers.ValidIndex(pExt->SWLastIndex)) {
pThis = pThis->Owner->Supers.GetItem(pExt->SWLastIndex);
pData = SWTypeExt::ExtMap.Find(pThis->Type);
}
}
}
if(!Unsorted::MuteSWLaunches && (pData->EVA_Activated != -1) && !(flags & SuperWeaponFlags::NoEVA)) {
VoxClass::PlayIndex(pData->EVA_Activated);
}
if(!(flags & SuperWeaponFlags::NoMoney)) {
int Money_Amount = pData->Money_Amount;
if(Money_Amount > 0) {
DEBUGLOG("House %d gets %d credits\n", pThis->Owner->ArrayIndex, Money_Amount);
pThis->Owner->GiveMoney(Money_Amount);
} else if(Money_Amount < 0) {
DEBUGLOG("House %d loses %d credits\n", pThis->Owner->ArrayIndex, -Money_Amount);
pThis->Owner->TakeMoney(-Money_Amount);
}
}
CellClass *pTarget = MapClass::Instance->GetCellAt(pCoords);
CoordStruct coords;
pTarget->GetCoordsWithBridge(&coords);
if((pData->SW_Anim.Get() != NULL) && !(flags & SuperWeaponFlags::NoAnim)) {
coords.Z += pData->SW_AnimHeight;
AnimClass *placeholder;
GAME_ALLOC(AnimClass, placeholder, pData->SW_Anim, &coords);
placeholder->Invisible = !pData->IsAnimVisible(pThis->Owner);
}
if((pData->SW_Sound != -1) && !(flags & SuperWeaponFlags::NoSound)) {
VocClass::PlayAt(pData->SW_Sound, &coords, NULL);
}
if(pData->SW_RadarEvent.Get() && !(flags & SuperWeaponFlags::NoEvent)) {
RadarEventClass::Create(RADAREVENT_SUPERWEAPONLAUNCHED, *pCoords);
}
if(pData->Message_Launch && !(flags & SuperWeaponFlags::NoMessage)) {
pData->PrintMessage(pData->Message_Launch, pThis->Owner);
}
int idxThis = pThis->Owner->Supers.FindItemIndex(&pThis);
if(IsPlayer && !(flags & SuperWeaponFlags::NoCleanup)) {
if(pThis->Owner == HouseClass::Player) {
if(idxThis == Unsorted::CurrentSWType || (flags & SuperWeaponFlags::PostClick)) {
Unsorted::CurrentSWType = -1;
}
}
if(pData->EVA_Ready != -1) {
VoxClass::SilenceIndex(pData->EVA_Ready);
}
}
if(HouseExt::ExtData *pExt = HouseExt::ExtMap.Find(pThis->Owner)) {
if(!(flags & SuperWeaponFlags::PostClick) && !pData->SW_AutoFire) {
pExt->SWLastIndex = idxThis;
}
}
return true;
}
}
return false;
}
Member Data Documentation
The documentation for this class was generated from the following files: