mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-13 06:01:11 +00:00
063c85b157
with an FString now. - Fixed: The music strings in the default level info were never freed and caused memory leaks when used repeatedly. - Fixed: The intermusic string in the level info was never freed. - Fixed: The default fire obituary should only be printed if the damage came from the environment. If it comes from a monster the monster specific obituary should be used instead. - Added custom damage types from the floating point test release. - Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also be used by other actors so a more generalized approach is needed than hard coding it into the Pain Elemental. - Converted a few of Doom's monsters to DECORATE because I couldn't test the first version of the custom state code with the corpses inheriting from them. - Added custom states from last year's floating point test release and fixed some bugs I found in that code. Unfortunately it wasn't all salvageable and it was easier to recreate some parts from scratch. SVN r368 (trunk)
30 lines
691 B
C++
30 lines
691 B
C++
#include "actor.h"
|
|
#include "info.h"
|
|
#include "m_random.h"
|
|
#include "s_sound.h"
|
|
#include "p_local.h"
|
|
#include "p_enemy.h"
|
|
#include "doomstat.h"
|
|
#include "gstrings.h"
|
|
#include "a_action.h"
|
|
|
|
static FRandom pr_bruisattack ("BruisAttack");
|
|
|
|
|
|
void A_BruisAttack (AActor *self)
|
|
{
|
|
if (!self->target)
|
|
return;
|
|
|
|
if (self->CheckMeleeRange ())
|
|
{
|
|
int damage = (pr_bruisattack()%8+1)*10;
|
|
S_Sound (self, CHAN_WEAPON, "baron/melee", 1, ATTN_NORM);
|
|
P_DamageMobj (self->target, self, self, damage, NAME_Melee);
|
|
P_TraceBleed (damage, self->target, self);
|
|
return;
|
|
}
|
|
|
|
// launch a missile
|
|
P_SpawnMissile (self, self->target, PClass::FindClass("BaronBall"));
|
|
}
|