mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- exported the remaining Duke enemies.
This commit is contained in:
parent
0636358b5f
commit
b4dcf8ddcf
9 changed files with 127 additions and 88 deletions
|
@ -3316,11 +3316,7 @@ void movefta(void)
|
|||
|
||||
auto check_fta_sounds = [](DDukeActor* act)
|
||||
{
|
||||
if (act->GetClass() == RUNTIME_CLASS(DDukeActor))
|
||||
{
|
||||
if (!isRR()) check_fta_sounds_d(act);
|
||||
}
|
||||
else if (act->spr.extra > 0)
|
||||
if (act->spr.extra > 0)
|
||||
CallPlayFTASound(act);
|
||||
};
|
||||
|
||||
|
|
|
@ -44,34 +44,6 @@ This file contains parts of DukeGDX by Alexander Makarov-[M210] (m210-2007@mail.
|
|||
BEGIN_DUKE_NS
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void check_fta_sounds_d(DDukeActor* actor)
|
||||
{
|
||||
if (actor->spr.extra > 0) switch (actor->spr.picnum)
|
||||
{
|
||||
case DTILE_DRONE:
|
||||
S_PlayActorSound(DRON_RECOG, actor);
|
||||
break;
|
||||
case DTILE_COMMANDER:
|
||||
case DTILE_COMMANDERSTAYPUT:
|
||||
S_PlayActorSound(COMM_RECOG, actor);
|
||||
break;
|
||||
case DTILE_ORGANTIC:
|
||||
S_PlayActorSound(TURR_RECOG, actor);
|
||||
break;
|
||||
case DTILE_OCTABRAIN:
|
||||
case DTILE_OCTABRAINSTAYPUT:
|
||||
S_PlayActorSound(OCTA_RECOG, actor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
|
|
@ -79,8 +79,6 @@ void handle_se35(DDukeActor* i);
|
|||
void handle_se128(DDukeActor* i);
|
||||
void handle_se130(DDukeActor* i, int countmax);
|
||||
|
||||
void check_fta_sounds_d(DDukeActor* i);
|
||||
|
||||
int dodge(DDukeActor*);
|
||||
void alterang(int ang, DDukeActor* actor, int g_p);
|
||||
void fall_common(DDukeActor* actor, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOTSPARK1, int squished, int thud, int(*fallspecial)(DDukeActor*, int));
|
||||
|
|
|
@ -189,59 +189,6 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
ChangeActorStat(act, STAT_STANDABLE);
|
||||
break;
|
||||
case DTILE_OCTABRAINSTAYPUT:
|
||||
case DTILE_COMMANDERSTAYPUT:
|
||||
act->actorstayput = act->sector();
|
||||
[[fallthrough]];
|
||||
case DTILE_ROTATEGUN:
|
||||
case DTILE_DRONE:
|
||||
case DTILE_OCTABRAIN:
|
||||
case DTILE_COMMANDER:
|
||||
case DTILE_ORGANTIC:
|
||||
case DTILE_SHARK:
|
||||
|
||||
if (act->spr.picnum != DTILE_SHARK)
|
||||
{
|
||||
act->spr.scale = DVector2(0.625, 0.625);
|
||||
act->clipdist = 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
act->spr.scale = DVector2(0.9375, 0.9375);
|
||||
act->clipdist = 10;
|
||||
}
|
||||
|
||||
if (actj) act->spr.lotag = 0;
|
||||
|
||||
if ((act->spr.lotag > ud.player_skill) || ud.monsters_off == 1)
|
||||
{
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
makeitfall(act);
|
||||
|
||||
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
if (act->spr.picnum == DTILE_ORGANTIC) act->spr.cstat |= CSTAT_SPRITE_YCENTER;
|
||||
|
||||
if (actj)
|
||||
{
|
||||
act->timetosleep = 0;
|
||||
check_fta_sounds_d(act);
|
||||
ChangeActorStat(act, STAT_ACTOR);
|
||||
}
|
||||
else ChangeActorStat(act, STAT_ZOMBIEACTOR);
|
||||
}
|
||||
|
||||
if (act->spr.picnum == DTILE_ROTATEGUN)
|
||||
act->vel.Z = 0;
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case DTILE_FLOORFLAME:
|
||||
act->spr.shade = -127;
|
||||
ChangeActorStat(act, STAT_STANDABLE);
|
||||
|
|
|
@ -325,4 +325,15 @@ spawnclasses
|
|||
1741 = DukeLiztrooperToilet
|
||||
1742 = DukeLiztrooperSitting
|
||||
1744 = DukeLiztrooperDucking
|
||||
|
||||
1820 = DukeOctabrain
|
||||
1821 = DukeOctabrainStayput
|
||||
1920 = DukeCommander
|
||||
1921 = DukeCommanderStayput
|
||||
|
||||
1550 = DukeShark
|
||||
1880 = DukeDrone
|
||||
2420 = DukeTurret
|
||||
2360 = DukeRotateGun
|
||||
|
||||
}
|
||||
|
|
|
@ -117,6 +117,9 @@ version "4.10"
|
|||
#include "zscript/games/duke/actors/pigcop.zs"
|
||||
#include "zscript/games/duke/actors/liztroop.zs"
|
||||
#include "zscript/games/duke/actors/lizman.zs"
|
||||
#include "zscript/games/duke/actors/octabrain.zs"
|
||||
#include "zscript/games/duke/actors/commander.zs"
|
||||
#include "zscript/games/duke/actors/mech.zs"
|
||||
#include "zscript/games/duke/actors/boss1.zs"
|
||||
#include "zscript/games/duke/actors/boss2.zs"
|
||||
#include "zscript/games/duke/actors/boss3.zs"
|
||||
|
|
26
wadsrc/static/zscript/games/duke/actors/commander.zs
Normal file
26
wadsrc/static/zscript/games/duke/actors/commander.zs
Normal file
|
@ -0,0 +1,26 @@
|
|||
class DukeCommander : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "COMMANDER";
|
||||
}
|
||||
|
||||
override void PlayFTASound()
|
||||
{
|
||||
self.PlayActorSound("COMM_RECOG");
|
||||
}
|
||||
}
|
||||
|
||||
class DukeCommanderStayput: DukeCommander
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "COMMANDERSTAYPUT";
|
||||
}
|
||||
|
||||
override void initialize()
|
||||
{
|
||||
super.initialize();
|
||||
self.actorstayput = self.sector; // make this a flag once everything has been exported.
|
||||
}
|
||||
}
|
60
wadsrc/static/zscript/games/duke/actors/mech.zs
Normal file
60
wadsrc/static/zscript/games/duke/actors/mech.zs
Normal file
|
@ -0,0 +1,60 @@
|
|||
class DukeDrone : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "DRONE";
|
||||
}
|
||||
|
||||
override void PlayFTASound()
|
||||
{
|
||||
self.PlayActorSound("DRON_RECOG");
|
||||
}
|
||||
}
|
||||
|
||||
class DukeTurret : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "ORGANTIC";
|
||||
}
|
||||
|
||||
override void PlayFTASound()
|
||||
{
|
||||
self.PlayActorSound("TURR_RECOG");
|
||||
}
|
||||
|
||||
override void Initialize()
|
||||
{
|
||||
self.cstat |= CSTAT_SPRITE_YCENTER;
|
||||
}
|
||||
}
|
||||
|
||||
class DukeRotateGun : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "ROTATEGUN";
|
||||
}
|
||||
|
||||
override void Initialize()
|
||||
{
|
||||
self.vel.Z = 0;
|
||||
}
|
||||
}
|
||||
|
||||
class DukeShark : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "SHARK";
|
||||
}
|
||||
|
||||
override void Initialize()
|
||||
{
|
||||
// override some defaults.
|
||||
self.scale = (0.9375, 0.9375);
|
||||
self.clipdist = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
26
wadsrc/static/zscript/games/duke/actors/octabrain.zs
Normal file
26
wadsrc/static/zscript/games/duke/actors/octabrain.zs
Normal file
|
@ -0,0 +1,26 @@
|
|||
class DukeOctabrain : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "OCTABRAIN";
|
||||
}
|
||||
|
||||
override void PlayFTASound()
|
||||
{
|
||||
self.PlayActorSound("OCTA_RECOG");
|
||||
}
|
||||
}
|
||||
|
||||
class DukeOctabrainStayput: DukeOctabrain
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "OCTABRAINSTAYPUT";
|
||||
}
|
||||
|
||||
override void initialize()
|
||||
{
|
||||
super.initialize();
|
||||
self.actorstayput = self.sector; // make this a flag once everything has been exported.
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue