mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-23 12:32:13 +00:00
- exported WT's Firefly
This commit is contained in:
parent
4e0dad54a5
commit
ef54987a58
5 changed files with 27 additions and 45 deletions
|
@ -379,6 +379,7 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
|
|||
clipmove(ppos, &dasectp, change * 0.5, 64., 4., 4., cliptype, result);
|
||||
else
|
||||
{
|
||||
// todo: move this mess to the actor definitions once we have them all available.
|
||||
double clipdist;
|
||||
if (actor->spr.picnum == DTILE_LIZMAN)
|
||||
clipdist = 18.25;
|
||||
|
@ -393,7 +394,7 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
|
|||
// conditional code from hell...
|
||||
if (dasectp == nullptr || (dasectp != nullptr &&
|
||||
((actor->actorstayput != nullptr && actor->actorstayput != dasectp) ||
|
||||
((actor->spr.picnum == DTILE_BOSS2) && actor->spr.pal == 0 && dasectp->lotag != 3) ||
|
||||
((actor->spr.picnum == DTILE_BOSS2) && actor->spr.pal == 0 && dasectp->lotag != ST_3) ||
|
||||
((actor->spr.picnum == DTILE_BOSS1 || actor->spr.picnum == DTILE_BOSS2) && dasectp->lotag == ST_1_ABOVE_WATER) ||
|
||||
(dasectp->lotag == ST_1_ABOVE_WATER && (actor->spr.picnum == DTILE_LIZMAN || (actor->spr.picnum == DTILE_LIZTROOP && actor->vel.Z == 0)))
|
||||
))
|
||||
|
|
|
@ -988,20 +988,6 @@ void shoot_d(DDukeActor* actor, int atwith, PClass *cls)
|
|||
case DTILE_FIREBALL:
|
||||
shootfireball(actor, p, spos, sang);
|
||||
return;
|
||||
|
||||
case DTILE_FIREFLY: // DTILE_BOSS5 shot
|
||||
{
|
||||
auto k = spawn(actor, atwith);
|
||||
if (k)
|
||||
{
|
||||
k->setsector(sect);
|
||||
k->spr.pos = spos;
|
||||
k->spr.Angles.Yaw = sang;
|
||||
k->vel.X = 500 / 16.;
|
||||
k->vel.Z = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,34 +70,6 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
{
|
||||
switch (act->spr.picnum)
|
||||
{
|
||||
case DTILE_FIREFLY:
|
||||
act->spr.scale = DVector2(0.625, 0.625);
|
||||
act->clipdist = 20;
|
||||
|
||||
if (actj)
|
||||
act->spr.lotag = 0;
|
||||
|
||||
if ((act->spr.lotag > ud.player_skill) || ud.monsters_off)
|
||||
{
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
makeitfall(act);
|
||||
|
||||
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
if (actj) {
|
||||
act->timetosleep = 0;
|
||||
check_fta_sounds_d(act);
|
||||
ChangeActorStat(act, STAT_ACTOR);
|
||||
}
|
||||
else
|
||||
ChangeActorStat(act, STAT_ZOMBIEACTOR);
|
||||
}
|
||||
return act;
|
||||
case DTILE_WHISPYSMOKE:
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
act->spr.pos.X += krandf(16) - 8;
|
||||
|
|
|
@ -12,6 +12,7 @@ spawnclasses
|
|||
|
||||
5310 = DukeBoss5
|
||||
5311 = DukeBoss5Stayput
|
||||
5180 = DukeFirefly
|
||||
|
||||
5134 = DukeFlamethrowerSprite
|
||||
5135 = DukeFlamethrowerAmmo
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
// for now only the effect is scriptified.
|
||||
|
||||
class DukeFireflyFlyingEffect : DukeActor
|
||||
{
|
||||
default
|
||||
|
@ -45,3 +43,27 @@ class DukeFireflyFlyingEffect : DukeActor
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DukeFirefly : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "FIREFLY";
|
||||
}
|
||||
|
||||
override bool ShootThis(DukeActor shooter, DukePlayer p, Vector3 spos, double sang)
|
||||
{
|
||||
let k = shooter.spawn("DukeFirefly");
|
||||
if (k)
|
||||
{
|
||||
k.sector = shooter.sector;
|
||||
k.pos = spos;
|
||||
k.Angle = sang;
|
||||
k.vel.X = 500 / 16.;
|
||||
k.vel.Z = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue