mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- scriptified a_spidermaster.cpp.
- fixed bad assert in XOR_RK instruction.
This commit is contained in:
parent
c961e653a5
commit
d32d52c0b9
6 changed files with 32 additions and 46 deletions
|
@ -844,7 +844,6 @@ set( NOT_COMPILED_SOURCE_FILES
|
||||||
g_doom/a_painelemental.cpp
|
g_doom/a_painelemental.cpp
|
||||||
g_doom/a_revenant.cpp
|
g_doom/a_revenant.cpp
|
||||||
g_doom/a_scriptedmarine.cpp
|
g_doom/a_scriptedmarine.cpp
|
||||||
g_doom/a_spidermaster.cpp
|
|
||||||
g_heretic/a_chicken.cpp
|
g_heretic/a_chicken.cpp
|
||||||
g_heretic/a_dsparil.cpp
|
g_heretic/a_dsparil.cpp
|
||||||
g_heretic/a_hereticartifacts.cpp
|
g_heretic/a_hereticartifacts.cpp
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include "a_lostsoul.cpp"
|
#include "a_lostsoul.cpp"
|
||||||
#include "a_painelemental.cpp"
|
#include "a_painelemental.cpp"
|
||||||
#include "a_revenant.cpp"
|
#include "a_revenant.cpp"
|
||||||
#include "a_spidermaster.cpp"
|
|
||||||
#include "a_scriptedmarine.cpp"
|
#include "a_scriptedmarine.cpp"
|
||||||
|
|
||||||
// The barrel of green goop ------------------------------------------------
|
// The barrel of green goop ------------------------------------------------
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
#include "templates.h"
|
|
||||||
#include "actor.h"
|
|
||||||
#include "m_random.h"
|
|
||||||
#include "s_sound.h"
|
|
||||||
#include "p_local.h"
|
|
||||||
#include "p_enemy.h"
|
|
||||||
#include "a_action.h"
|
|
||||||
#include "vm.h"
|
|
||||||
*/
|
|
||||||
|
|
||||||
static FRandom pr_spidrefire ("SpidRefire");
|
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_SpidRefire)
|
|
||||||
{
|
|
||||||
PARAM_SELF_PROLOGUE(AActor);
|
|
||||||
|
|
||||||
// keep firing unless target got out of sight
|
|
||||||
A_FaceTarget (self);
|
|
||||||
|
|
||||||
if (pr_spidrefire() < 10)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!self->target
|
|
||||||
|| P_HitFriend (self)
|
|
||||||
|| self->target->health <= 0
|
|
||||||
|| !P_CheckSight (self, self->target, SF_SEEPASTBLOCKEVERYTHING|SF_SEEPASTSHOOTABLELINES))
|
|
||||||
{
|
|
||||||
self->SetState (self->SeeState);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_Metal)
|
|
||||||
{
|
|
||||||
PARAM_SELF_PROLOGUE(AActor);
|
|
||||||
|
|
||||||
S_Sound (self, CHAN_BODY, "spider/walk", 1, ATTN_IDLE);
|
|
||||||
A_Chase (stack, self);
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -924,7 +924,7 @@ begin:
|
||||||
reg.d[a] = reg.d[B] ^ reg.d[C];
|
reg.d[a] = reg.d[B] ^ reg.d[C];
|
||||||
NEXTOP;
|
NEXTOP;
|
||||||
OP(XOR_RK):
|
OP(XOR_RK):
|
||||||
ASSERTD(a); ASSERTD(B); ASSERTD(C);
|
ASSERTD(a); ASSERTD(B); ASSERTKD(C);
|
||||||
reg.d[a] = reg.d[B] ^ konstd[C];
|
reg.d[a] = reg.d[B] ^ konstd[C];
|
||||||
NEXTOP;
|
NEXTOP;
|
||||||
|
|
||||||
|
|
|
@ -113,8 +113,6 @@ class Actor : Thinker native
|
||||||
native void A_BossDeath();
|
native void A_BossDeath();
|
||||||
native void A_SkullAttack(float speed = 20);
|
native void A_SkullAttack(float speed = 20);
|
||||||
native void A_BetaSkullAttack();
|
native void A_BetaSkullAttack();
|
||||||
native void A_Metal();
|
|
||||||
native void A_SpidRefire();
|
|
||||||
native void A_PainAttack(class<Actor> spawntype = "LostSoul", float angle = 0, int flags = 0, int limit = -1);
|
native void A_PainAttack(class<Actor> spawntype = "LostSoul", float angle = 0, int flags = 0, int limit = -1);
|
||||||
native void A_DualPainAttack(class<Actor> spawntype = "LostSoul");
|
native void A_DualPainAttack(class<Actor> spawntype = "LostSoul");
|
||||||
native void A_PainDie(class<Actor> spawntype = "LostSoul");
|
native void A_PainDie(class<Actor> spawntype = "LostSoul");
|
||||||
|
|
|
@ -60,3 +60,34 @@ class SpiderMastermind : Actor
|
||||||
Stop;
|
Stop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// Code (must be attached to Actor)
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
|
extend class Actor
|
||||||
|
{
|
||||||
|
void A_SpidRefire()
|
||||||
|
{
|
||||||
|
// keep firing unless target got out of sight
|
||||||
|
A_FaceTarget();
|
||||||
|
if (Random[CPosRefire](0, 255) >= 10)
|
||||||
|
{
|
||||||
|
if (!target
|
||||||
|
|| HitFriend()
|
||||||
|
|| target.health <= 0
|
||||||
|
|| !CheckSight(target, SF_SEEPASTBLOCKEVERYTHING|SF_SEEPASTSHOOTABLELINES))
|
||||||
|
{
|
||||||
|
SetState(SeeState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void A_Metal()
|
||||||
|
{
|
||||||
|
A_PlaySound("spider/walk", CHAN_BODY, 1, false, ATTN_IDLE);
|
||||||
|
A_Chase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue