2022-12-31 09:53:03 +00:00
|
|
|
class DukePlayerPawn : DukePlayerBase
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
Strength MAXPLAYERHEALTH;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class DukePlayerOnWater : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "PLAYERONWATER";
|
|
|
|
+ALWAYSROTATE1;
|
|
|
|
}
|
|
|
|
|
2023-05-14 10:18:47 +00:00
|
|
|
override void Initialize(DukeActor spawner)
|
2022-12-31 09:53:03 +00:00
|
|
|
{
|
2023-05-14 10:18:47 +00:00
|
|
|
if (spawner)
|
2022-12-31 09:53:03 +00:00
|
|
|
{
|
2023-05-14 10:18:47 +00:00
|
|
|
self.scale = spawner.scale;
|
2022-12-31 09:53:03 +00:00
|
|
|
self.vel.Z = 0.5;
|
|
|
|
if (self.sector.lotag != ST_2_UNDERWATER)
|
|
|
|
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
}
|
|
|
|
self.ChangeStat(STAT_DUMMYPLAYER);
|
|
|
|
}
|
|
|
|
|
|
|
|
override void OnHit(DukeActor proj)
|
|
|
|
{
|
2023-05-14 10:18:47 +00:00
|
|
|
// propagate the hit to its Owner.
|
|
|
|
let Owner = self.OwnerActor;
|
|
|
|
if (Owner && self != Owner) Owner.OnHit(proj);
|
2022-12-31 09:53:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class DukePlayerLyingDead : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "DUKELYINGDEAD";
|
|
|
|
+HITRADIUS_FORCEEFFECT;
|
|
|
|
Strength 0;
|
|
|
|
}
|
|
|
|
|
2023-05-14 10:18:47 +00:00
|
|
|
override void Initialize(DukeActor spawner)
|
2022-12-31 09:53:03 +00:00
|
|
|
{
|
2023-05-14 10:18:47 +00:00
|
|
|
if (spawner && spawner.isPlayer())
|
2022-12-31 09:53:03 +00:00
|
|
|
{
|
2023-05-14 10:18:47 +00:00
|
|
|
self.scale = spawner.scale;
|
|
|
|
self.shade = spawner.shade;
|
|
|
|
self.pal = spawner.GetPlayer().palookup;
|
2022-12-31 09:53:03 +00:00
|
|
|
}
|
|
|
|
self.vel.X = 292 / 16.;
|
|
|
|
self.vel.Z = 360 / 256.;
|
|
|
|
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
|
|
|
self.extra = 1;
|
|
|
|
self.clipdist = 32;
|
|
|
|
self.ChangeStat(STAT_ACTOR);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override bool animate(tspritetype t)
|
|
|
|
{
|
|
|
|
t.pos.Z += 24;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|