mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-16 07:21:28 +00:00
760f70d3f1
so that all files are included by a central one instead of compiling each one separately. This speeds up the compilation process by 25% when doing a complete rebuild in Visual C. - Cleaned up more header dependencies. SVN r1226 (trunk)
64 lines
1.1 KiB
C++
64 lines
1.1 KiB
C++
/*
|
|
#include "info.h"
|
|
#include "a_pickups.h"
|
|
#include "a_artifacts.h"
|
|
#include "gstrings.h"
|
|
#include "p_local.h"
|
|
#include "gi.h"
|
|
#include "s_sound.h"
|
|
*/
|
|
|
|
// Boost Armor Artifact (Dragonskin Bracers) --------------------------------
|
|
|
|
class AArtiBoostArmor : public AInventory
|
|
{
|
|
DECLARE_CLASS (AArtiBoostArmor, AInventory)
|
|
public:
|
|
bool Use (bool pickup);
|
|
};
|
|
|
|
IMPLEMENT_CLASS (AArtiBoostArmor)
|
|
|
|
bool AArtiBoostArmor::Use (bool pickup)
|
|
{
|
|
int count = 0;
|
|
|
|
if (gameinfo.gametype == GAME_Hexen)
|
|
{
|
|
AHexenArmor *armor;
|
|
|
|
for (int i = 0; i < 4; ++i)
|
|
{
|
|
armor = Spawn<AHexenArmor> (0,0,0, NO_REPLACE);
|
|
armor->flags |= MF_DROPPED;
|
|
armor->health = i;
|
|
armor->Amount = 1;
|
|
if (!armor->CallTryPickup (Owner))
|
|
{
|
|
armor->Destroy ();
|
|
}
|
|
else
|
|
{
|
|
count++;
|
|
}
|
|
}
|
|
return count != 0;
|
|
}
|
|
else
|
|
{
|
|
ABasicArmorBonus *armor = Spawn<ABasicArmorBonus> (0,0,0, NO_REPLACE);
|
|
armor->flags |= MF_DROPPED;
|
|
armor->SaveAmount = 50;
|
|
armor->MaxSaveAmount = 300;
|
|
if (!armor->CallTryPickup (Owner))
|
|
{
|
|
armor->Destroy ();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|