mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- scriptified Reaver and Templar.
This commit is contained in:
parent
8551a4f6e1
commit
53318f4bde
8 changed files with 42 additions and 82 deletions
|
@ -867,13 +867,11 @@ set( NOT_COMPILED_SOURCE_FILES
|
|||
g_strife/a_loremaster.cpp
|
||||
g_strife/a_oracle.cpp
|
||||
g_strife/a_programmer.cpp
|
||||
g_strife/a_reaver.cpp
|
||||
g_strife/a_rebels.cpp
|
||||
g_strife/a_sentinel.cpp
|
||||
g_strife/a_stalker.cpp
|
||||
g_strife/a_strifeitems.cpp
|
||||
g_strife/a_strifeweapons.cpp
|
||||
g_strife/a_templar.cpp
|
||||
g_strife/a_thingstoblowup.cpp
|
||||
g_shared/sbarinfo_commands.cpp
|
||||
xlat/xlat_parser.y
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
#include "actor.h"
|
||||
#include "p_enemy.h"
|
||||
#include "a_action.h"
|
||||
#include "s_sound.h"
|
||||
#include "m_random.h"
|
||||
#include "p_local.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "vm.h"
|
||||
*/
|
||||
|
||||
static FRandom pr_reaverattack ("ReaverAttack");
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_ReaverRanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
||||
if (self->target != NULL)
|
||||
{
|
||||
DAngle bangle;
|
||||
DAngle pitch;
|
||||
|
||||
A_FaceTarget (self);
|
||||
S_Sound (self, CHAN_WEAPON, "reaver/attack", 1, ATTN_NORM);
|
||||
bangle = self->Angles.Yaw;
|
||||
pitch = P_AimLineAttack (self, bangle, MISSILERANGE);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
DAngle angle = bangle + pr_reaverattack.Random2() * (22.5 / 256);
|
||||
int damage = ((pr_reaverattack() & 7) + 1) * 3;
|
||||
P_LineAttack (self, angle, MISSILERANGE, pitch, damage, NAME_Hitscan, NAME_StrifePuff);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -31,13 +31,11 @@
|
|||
//#include "a_macil.cpp"
|
||||
#include "a_oracle.cpp"
|
||||
#include "a_programmer.cpp"
|
||||
#include "a_reaver.cpp"
|
||||
#include "a_rebels.cpp"
|
||||
#include "a_sentinel.cpp"
|
||||
#include "a_stalker.cpp"
|
||||
#include "a_strifeitems.cpp"
|
||||
#include "a_strifeweapons.cpp"
|
||||
#include "a_templar.cpp"
|
||||
#include "a_thingstoblowup.cpp"
|
||||
|
||||
// Notes so I don't forget them:
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
#include "actor.h"
|
||||
#include "m_random.h"
|
||||
#include "a_action.h"
|
||||
#include "p_local.h"
|
||||
#include "p_enemy.h"
|
||||
#include "s_sound.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "vm.h"
|
||||
*/
|
||||
|
||||
static FRandom pr_templar ("Templar");
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_TemplarAttack)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
||||
int damage;
|
||||
DAngle angle;
|
||||
DAngle pitch;
|
||||
|
||||
if (self->target == NULL)
|
||||
return 0;
|
||||
|
||||
S_Sound (self, CHAN_WEAPON, "templar/shoot", 1, ATTN_NORM);
|
||||
A_FaceTarget (self);
|
||||
pitch = P_AimLineAttack (self, self->Angles.Yaw, MISSILERANGE);
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
damage = (pr_templar() & 4) * 2;
|
||||
angle = self->Angles.Yaw + pr_templar.Random2() * (11.25 / 256);
|
||||
P_LineAttack (self, angle, MISSILERANGE+64., pitch + pr_templar.Random2() * (7.097 / 256), damage, NAME_Hitscan, NAME_MaulerPuff);
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -31,7 +31,6 @@ class Inquisitor : Actor
|
|||
native void A_InquisitorJump ();
|
||||
native void A_InquisitorCheckLand ();
|
||||
native void A_TossArm ();
|
||||
native void A_ReaverRanged ();
|
||||
|
||||
States
|
||||
{
|
||||
|
|
|
@ -22,8 +22,6 @@ class Reaver : Actor
|
|||
Obituary "$OB_REAVER";
|
||||
}
|
||||
|
||||
native void A_ReaverRanged ();
|
||||
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
@ -64,4 +62,27 @@ class Reaver : Actor
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
extend class Actor
|
||||
{
|
||||
// The Inquisitor also uses this function
|
||||
|
||||
void A_ReaverRanged ()
|
||||
{
|
||||
if (target != null)
|
||||
{
|
||||
A_FaceTarget ();
|
||||
A_PlaySound ("reaver/attack", CHAN_WEAPON);
|
||||
double bangle = Angle;
|
||||
double pitch = AimLineAttack (bangle, MISSILERANGE);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
double ang = bangle + Random2[ReaverAttack]() * (22.5 / 256);
|
||||
int damage = ((random[ReaverAttack]() & 7) + 1) * 3;
|
||||
LineAttack (ang, MISSILERANGE, pitch, damage, 'Hitscan', "StrifePuff");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -448,7 +448,7 @@ class Sigil : Weapon
|
|||
{
|
||||
"Sigil1", "Sigil2", "Sigil3", "Sigil4", "Sigil5"
|
||||
};
|
||||
sigl.Icon = GetDefaultByType(sigils[clamp(sigl.health, 1, 5)]).Icon;
|
||||
sigl.Icon = GetDefaultByType(sigils[clamp(sigl.health, 1, 5)-1]).Icon;
|
||||
// If the player has the Sigil out, drop it and bring it back up.
|
||||
if (sigl.Owner.player != null && sigl.Owner.player.ReadyWeapon == sigl)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,6 @@ class Templar : Actor
|
|||
Obituary "$OB_TEMPLAR";
|
||||
DropItem "EnergyPod";
|
||||
}
|
||||
native void A_TemplarAttack();
|
||||
|
||||
States
|
||||
{
|
||||
|
@ -64,5 +63,22 @@ class Templar : Actor
|
|||
PGRD \ -1;
|
||||
Stop;
|
||||
}
|
||||
|
||||
void A_TemplarAttack()
|
||||
{
|
||||
if (target != null)
|
||||
{
|
||||
A_PlaySound ("templar/shoot", CHAN_WEAPON);
|
||||
A_FaceTarget ();
|
||||
double pitch = AimLineAttack (angle, MISSILERANGE);
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
int damage = (random[Templar]() & 4) * 2;
|
||||
double ang = angle + random2[Templar]() * (11.25 / 256);
|
||||
LineAttack (ang, MISSILERANGE+64., pitch + random2[Templar]() * (7.097 / 256), damage, 'Hitscan', "MaulerPuff");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue