Merge branch 'devel' into experimental
This commit is contained in:
commit
62b8975991
69 changed files with 2597 additions and 264 deletions
|
|
@ -91,6 +91,7 @@ Class BioHitbox : Actor
|
|||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOBLOOD;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -823,6 +824,8 @@ Class BioRifle : UTWeapon
|
|||
invoker.charge = min(5.1,invoker.charge+0.1);
|
||||
A_Overlay(-9999,null);
|
||||
A_WeaponOffset(0,32); // fix sudden psprite lowering
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayAttacking3();
|
||||
}
|
||||
BIOF A 2 A_BioFire(true);
|
||||
BIOF BCDEFGHI 2;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Class SawImpact : Actor
|
|||
+NOGRAVITY;
|
||||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -251,159 +251,3 @@ Class ActMedBox : UTActivatableHealth
|
|||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
// Alternative player classes for compatibility with Heretic sprites
|
||||
Class UTPlayerHereticCompat : UTPlayer
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.ColorRange 225, 240;
|
||||
Player.Colorset 0, "Green", 225, 240, 238;
|
||||
Player.Colorset 1, "Yellow", 114, 129, 127;
|
||||
Player.Colorset 2, "Red", 145, 160, 158;
|
||||
Player.Colorset 3, "Blue", 190, 205, 203;
|
||||
Player.Colorset 4, "Brown", 67, 82, 80;
|
||||
Player.Colorset 5, "Light Gray", 9, 24, 22;
|
||||
Player.Colorset 6, "Light Brown", 74, 89, 87;
|
||||
Player.Colorset 7, "Light Red", 150, 165, 163;
|
||||
Player.Colorset 8, "Light Blue", 192, 207, 205;
|
||||
Player.Colorset 9, "Beige", 95, 110, 108;
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
PLAY A -1;
|
||||
Stop;
|
||||
See:
|
||||
PLAY ABCD 4;
|
||||
Loop;
|
||||
Melee:
|
||||
Missile:
|
||||
PLAY F 6 BRIGHT;
|
||||
PLAY E 12;
|
||||
Goto Spawn;
|
||||
Pain:
|
||||
PLAY G 4;
|
||||
PLAY G 4 A_Pain;
|
||||
Goto Spawn;
|
||||
Death:
|
||||
PLAY H 6 A_PlayerSkinCheck("AltSkinDeath");
|
||||
PLAY I 6 A_PlayerScream;
|
||||
PLAY JK 6;
|
||||
PLAY L 6 A_NoBlocking;
|
||||
PLAY MNO 6;
|
||||
PLAY P -1;
|
||||
Stop;
|
||||
XDeath:
|
||||
PLAY Q 0 A_PlayerSkinCheck("AltSkinXDeath");
|
||||
PLAY Q 5 A_PlayerScream;
|
||||
PLAY R 0 A_NoBlocking;
|
||||
PLAY R 5 A_SkullPop;
|
||||
PLAY STUVWX 5;
|
||||
PLAY Y -1;
|
||||
Stop;
|
||||
Burn:
|
||||
FDTH A 5 BRIGHT A_PlaySound("*burndeath");
|
||||
FDTH B 4 BRIGHT;
|
||||
FDTH C 5 BRIGHT;
|
||||
FDTH D 4 BRIGHT A_PlayerScream;
|
||||
FDTH E 5 BRIGHT;
|
||||
FDTH F 4 BRIGHT;
|
||||
FDTH G 5 BRIGHT A_PlaySound("*burndeath");
|
||||
FDTH H 4 BRIGHT;
|
||||
FDTH I 5 BRIGHT;
|
||||
FDTH J 4 BRIGHT;
|
||||
FDTH K 5 BRIGHT;
|
||||
FDTH L 4 BRIGHT;
|
||||
FDTH M 5 BRIGHT;
|
||||
FDTH N 4 BRIGHT;
|
||||
FDTH O 5 BRIGHT A_NoBlocking;
|
||||
FDTH P 4 BRIGHT;
|
||||
FDTH Q 5 BRIGHT;
|
||||
FDTH R 4 BRIGHT;
|
||||
ACLO E 35 A_CheckPlayerDone;
|
||||
Wait;
|
||||
AltSkinDeath:
|
||||
PLAY H 10;
|
||||
PLAY I 10 A_PlayerScream;
|
||||
PLAY J 10 A_NoBlocking;
|
||||
PLAY KLM 10;
|
||||
PLAY N -1;
|
||||
Stop;
|
||||
AltSkinXDeath:
|
||||
PLAY O 5;
|
||||
PLAY P 5 A_XScream;
|
||||
PLAY Q 5 A_NoBlocking;
|
||||
PLAY RSTUV 5;
|
||||
PLAY W -1;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
Class UTPlayerHereticCompatTMale1 : UTPlayerHereticCompat
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tmale1";
|
||||
Player.DisplayName "$N_TMALE1";
|
||||
Player.Portrait "Blake";
|
||||
UTPlayer.VoiceType VOICE_MaleOne;
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerHereticCompatTMale2 : UTPlayerHereticCompat
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tmale2";
|
||||
Player.DisplayName "$N_TMALE2";
|
||||
Player.Portrait "Brock";
|
||||
UTPlayer.VoiceType VOICE_MaleTwo;
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerHereticCompatTFemale1 : UTPlayerHereticCompat
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "$N_TFEMALE1";
|
||||
Player.Portrait "Ivana";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
UTPlayer.VoiceType VOICE_FemaleOne;
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerHereticCompatTFemale2 : UTPlayerHereticCompat
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "$N_TFEMALE2";
|
||||
Player.Portrait "Lauren";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
UTPlayer.VoiceType VOICE_FemaleTwo;
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerHereticCompatTBoss : UTPlayerHereticCompat
|
||||
{
|
||||
transient CVar bossfootsteps;
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tboss";
|
||||
Player.DisplayName "$N_TBOSS";
|
||||
Player.Portrait "Xan";
|
||||
UTPlayer.DollType DOLL_Boss;
|
||||
UTPlayer.VoiceType VOICE_Boss;
|
||||
// should have NOBLOOD, but Xan did bleed in vanilla UT so...
|
||||
// (this is what gave birth to the theory that Xan was actually Jerl Liandri himself)
|
||||
-NOMENU;
|
||||
}
|
||||
override void PlayFootstep( double vol )
|
||||
{
|
||||
if ( !bossfootsteps ) bossfootsteps = CVar.GetCVar('flak_bossfootsteps',players[consoleplayer]);
|
||||
if ( bossfootsteps.GetBool() ) A_PlaySound("ut/bossfootstep",CHAN_5,vol);
|
||||
else Super.PlayFootstep(vol);
|
||||
}
|
||||
}
|
||||
|
|
@ -67,6 +67,7 @@ Class UTRocketTrail : Actor
|
|||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+FORCEXYBILLBOARD;
|
||||
+NOTELEPORT;
|
||||
Scale 0.7;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
|
|
@ -359,6 +360,8 @@ Class UTRocketLauncher : UTWeapon
|
|||
else A_PlaySound("utrl/fire",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(64,255,0,0),1);
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayAttacking3();
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(2+num,2+num,2+num,6+num,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1+num*0.05);
|
||||
for ( int i=0; i<num; i++ )
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ Class BulletImpact : Actor
|
|||
+NOGRAVITY;
|
||||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
Scale 0.25;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
|
|
@ -102,6 +103,7 @@ Class UTCasing : Actor
|
|||
+THRUACTORS;
|
||||
+USEBOUNCESTATE;
|
||||
+INTERPOLATEANGLES;
|
||||
+NOTELEPORT;
|
||||
Mass 1;
|
||||
Gravity 0.35;
|
||||
BounceType "Hexen";
|
||||
|
|
@ -542,7 +544,12 @@ Class Enforcer : UTWeapon
|
|||
}
|
||||
ENFR ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
ENR2 AB 1;
|
||||
ENR2 B 30 A_PlaySound("enforcer/reload",CHAN_WEAPON);
|
||||
ENR2 B 30
|
||||
{
|
||||
A_PlaySound("enforcer/reload",CHAN_WEAPON);
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayReloading();
|
||||
}
|
||||
ENFS A 0 A_PlaySound("enforcer/select",CHAN_WEAPON);
|
||||
Goto Ready;
|
||||
LeftReload:
|
||||
|
|
@ -555,7 +562,12 @@ Class Enforcer : UTWeapon
|
|||
}
|
||||
2NFR ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
2NR2 AB 1;
|
||||
2NR2 B 30 A_PlaySound("enforcer/reload",CHAN_6);
|
||||
2NR2 B 30
|
||||
{
|
||||
A_PlaySound("enforcer/reload",CHAN_6);
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayReloading();
|
||||
}
|
||||
2NFS A 0 A_PlaySound("enforcer/select",CHAN_6);
|
||||
Goto LeftReady;
|
||||
Deselect:
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ Class ChunkTrail : Actor
|
|||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+FORCEXYBILLBOARD;
|
||||
+NOTELEPORT;
|
||||
Scale 0.2;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
|
|
@ -387,6 +388,7 @@ Class SlugSmoke : Actor
|
|||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Class HammerImpact : Actor
|
|||
+NOGRAVITY;
|
||||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -290,7 +291,12 @@ Class ImpactHammer : UTWeapon
|
|||
IMPR A 0 A_ImpactRefire("Hold");
|
||||
Goto Release;
|
||||
Release:
|
||||
IMPF A 0 A_FireBlast();
|
||||
IMPF A 0
|
||||
{
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayAttacking3();
|
||||
A_FireBlast();
|
||||
}
|
||||
IMPF AABCCDEEFGGHIIJKKLMMNOOP 1;
|
||||
Goto Idle;
|
||||
AltFire:
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ Class MinigunTracer : Actor
|
|||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+INTERPOLATEANGLES;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ Class PulseBoltCap : Actor
|
|||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+FORCEXYBILLBOARD;
|
||||
+NOTELEPORT;
|
||||
Scale 0.3;
|
||||
}
|
||||
States
|
||||
|
|
@ -327,6 +328,7 @@ Class PulseBoltHit : Actor
|
|||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+FORCEXYBILLBOARD;
|
||||
+NOTELEPORT;
|
||||
Scale 0.3;
|
||||
}
|
||||
States
|
||||
|
|
@ -498,6 +500,7 @@ Class PulseBolt : Actor
|
|||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+INTERPOLATEANGLES;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -807,7 +810,12 @@ Class PulseGun : UTWeapon
|
|||
Reload:
|
||||
PGNI A 1;
|
||||
PGNI A 0 A_JumpIf(invoker.clipcount >= Min(50,invoker.Ammo1.Amount),"Idle");
|
||||
PGNR A 1 A_Reloading();
|
||||
PGNR A 1
|
||||
{
|
||||
A_Reloading();
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayReloading();
|
||||
}
|
||||
PGNR BCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
PGR2 ABCDEFGHIJKLMNOPQRSTUVWX 1;
|
||||
Goto Idle;
|
||||
|
|
|
|||
|
|
@ -142,13 +142,6 @@ Class Razor2 : Actor
|
|||
}
|
||||
Goto Spawn;
|
||||
Death:
|
||||
TNT1 A 0
|
||||
{
|
||||
angle += 180;
|
||||
pitch *= -1;
|
||||
A_RazorHit();
|
||||
}
|
||||
XDeath:
|
||||
TNT1 A 1 A_StopSound(CHAN_VOICE);
|
||||
Stop;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ Class ShockRifleWave : Actor
|
|||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
@ -95,6 +96,7 @@ Class SuperShockRifleWave : Actor
|
|||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
@ -123,6 +125,7 @@ Class ShockBeamRing : Actor
|
|||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
@ -150,6 +153,7 @@ Class SuperShockBeamRing : Actor
|
|||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
@ -283,6 +287,7 @@ Class ShockBeam : Actor
|
|||
+FORCEXYBILLBOARD;
|
||||
+FORCERADIUSDMG;
|
||||
+NODAMAGETHRUST;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -516,6 +521,7 @@ Class SuperShockBeam : Actor
|
|||
+FORCERADIUSDMG;
|
||||
+EXTREMEDEATH;
|
||||
+NODAMAGETHRUST;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -824,6 +830,7 @@ Class ShockHitbox : Actor
|
|||
+NOGRAVITY;
|
||||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Class ModuleHitbox : Actor
|
|||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOBLOOD;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
|
||||
{
|
||||
|
|
@ -100,6 +101,7 @@ Class TranslocatorGlow : Actor
|
|||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+FORCEXYBILLBOARD;
|
||||
+NOTELEPORT;
|
||||
RenderStyle "AddShaded";
|
||||
StencilColor "FFFFFF";
|
||||
Scale 0.5;
|
||||
|
|
@ -265,8 +267,6 @@ Class TranslocatorAfterimage : Actor
|
|||
angle = target.angle;
|
||||
pitch = target.pitch;
|
||||
roll = target.roll;
|
||||
sprite = target.sprite;
|
||||
frame = target.frame;
|
||||
vel = (FRandom[Transloc](-.5,.5),FRandom[Transloc](-.5,.5),FRandom[Transloc](-.5,.5));
|
||||
}
|
||||
action void A_Spread()
|
||||
|
|
@ -277,8 +277,8 @@ Class TranslocatorAfterimage : Actor
|
|||
States
|
||||
{
|
||||
Spawn:
|
||||
#### # 10 A_SetTics(Random[Transloc](20,50));
|
||||
#### # 1 A_Spread();
|
||||
PLAY A 10 A_SetTics(Random[Transloc](20,50));
|
||||
PLAY A 1 A_Spread();
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
Class UTPlayer : DoomPlayer
|
||||
{
|
||||
bool lastground;
|
||||
int lastwaterlevel;
|
||||
int lastgroundtic;
|
||||
double lastvelz, prevvelz;
|
||||
transient CVar footsteps;
|
||||
|
|
@ -11,6 +12,18 @@ Class UTPlayer : DoomPlayer
|
|||
int last_tap_fm, last_tap_sm;
|
||||
int last_jump_held;
|
||||
|
||||
int tempslide;
|
||||
double ssup;
|
||||
int corpsetime;
|
||||
bool headless, leglessR, leglessL, armlessR, armlessL, torsoless;
|
||||
// these are gibber hints to disable spawning some parts
|
||||
// headless: missing head
|
||||
// leglessR: missing right leg
|
||||
// leglessL: mising left leg
|
||||
// armlessR: missing right arm
|
||||
// armlessL: mising left arm
|
||||
// torsoless: missing torso
|
||||
|
||||
int dolltype, voicetype;
|
||||
|
||||
Property DollType : dolltype;
|
||||
|
|
@ -174,7 +187,7 @@ Class UTPlayer : DoomPlayer
|
|||
let type = (class<Inventory>)(AllActorClasses[i]);
|
||||
if ( !type ) continue;
|
||||
let def = GetDefaultByType(type);
|
||||
if ( !(self is "UTPlayerHereticCompat")
|
||||
if ( !(gameinfo.gametype&GAME_Raven)
|
||||
&& ((type is "UTActivatable") || (type is "UTActivatableHealth")) )
|
||||
continue; // don't give these outside of Heretic/Hexen
|
||||
if ( def.Icon.isValid() && (def.MaxAmount > 1) &&
|
||||
|
|
@ -226,7 +239,7 @@ Class UTPlayer : DoomPlayer
|
|||
bNOFRICTIONBOUNCE = false;
|
||||
}
|
||||
if ( !footsteps ) footsteps = CVar.GetCVar('flak_footsteps',players[consoleplayer]);
|
||||
if ( !footsteps.GetBool() ) return;
|
||||
if ( !footsteps.GetBool() || (Health <= 0) ) return;
|
||||
double ang = level.time/(20*TICRATE/35.)*360.;
|
||||
bool forcefootstep = false;
|
||||
if ( player.onground && !bNoGravity && !lastground && (waterlevel < 2) )
|
||||
|
|
@ -237,9 +250,15 @@ Class UTPlayer : DoomPlayer
|
|||
double vol = clamp((-lastvelz-8)*0.05,0.01,1.0);
|
||||
if ( ((waterlevel > 0) || GetFloorTerrain().IsLiquid) && !bOnMobj ) A_PlaySound("ut/wetsplash",CHAN_AUTO,vol);
|
||||
else A_PlaySound("*uland",CHAN_AUTO,vol);
|
||||
PlayLanding();
|
||||
}
|
||||
else forcefootstep = true;
|
||||
}
|
||||
if ( tempslide )
|
||||
{
|
||||
tempslide = max(0,tempslide-1);
|
||||
if ( !tempslide ) forcefootstep = true;
|
||||
}
|
||||
if ( forcefootstep || ((abs(sin(ang)) >= 1.0) && player.onground && lastground && (player.jumptics == 0) && (player.cmd.forwardmove || player.cmd.sidemove) && (waterlevel < 2)) )
|
||||
{
|
||||
double vol = abs(vel.xy.length())*0.03;
|
||||
|
|
@ -247,10 +266,14 @@ Class UTPlayer : DoomPlayer
|
|||
if ( (waterlevel > 0) || GetFloorTerrain().IsLiquid && !bOnMobj ) A_PlaySound("ut/playerfootstepwet",CHAN_5,vol);
|
||||
else PlayFootstep(vol);
|
||||
}
|
||||
if ( (waterlevel >= 2) && (lastwaterlevel < 2) )
|
||||
A_PlaySound("ut/wetsplash",CHAN_AUTO);
|
||||
else if ( (waterlevel < 2) && (lastwaterlevel >= 2) )
|
||||
A_PlaySound("ut/wetsurface",CHAN_AUTO);
|
||||
lastground = player.onground;
|
||||
lastvelz = prevvelz;
|
||||
prevvelz = vel.z;
|
||||
// TODO exit/entry sounds for water
|
||||
lastwaterlevel = waterlevel;
|
||||
}
|
||||
|
||||
double FrictionToUnreal()
|
||||
|
|
@ -260,6 +283,89 @@ Class UTPlayer : DoomPlayer
|
|||
return 734.2969*fin*fin-1485.0868*fin+750.7899;
|
||||
}
|
||||
|
||||
override void CalcHeight()
|
||||
{
|
||||
if ( !flak_utmovement || !player || (player.mo != self) )
|
||||
{
|
||||
Super.CalcHeight();
|
||||
return;
|
||||
}
|
||||
double angle, bob;
|
||||
bool still = false;
|
||||
// no bobbing while:
|
||||
// - using noclip2 (equivalent to unreal's ghost cheat)
|
||||
// - flying
|
||||
// - swimming
|
||||
// - falling
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
{
|
||||
player.bob = player.Vel dot player.Vel;
|
||||
if ( player.bob == 0 ) still = true;
|
||||
else
|
||||
{
|
||||
player.bob *= player.GetMoveBob();
|
||||
if ( player.bob > MAXBOB ) player.bob = MAXBOB;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// this still doesn't help because fly bob is hardcoded
|
||||
player.bob = 0;
|
||||
}
|
||||
double defaultviewheight = ViewHeight+player.crouchviewdelta;
|
||||
if ( player.cheats&CF_NOVELOCITY )
|
||||
{
|
||||
player.viewz = pos.z+defaultviewheight;
|
||||
if ( player.viewz > ceilingz-4 ) player.viewz = ceilingz-4;
|
||||
return;
|
||||
}
|
||||
if ( still )
|
||||
{
|
||||
if ( player.health > 0 )
|
||||
{
|
||||
angle = Level.maptime/(120*TICRATE/35.)*360.;
|
||||
bob = player.GetStillBob()*sin(angle);
|
||||
}
|
||||
else bob = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
angle = Level.maptime/(20*TICRATE/35.)*360.;
|
||||
bob = player.bob*sin(angle)*((waterlevel>1)?0.25:0.5);
|
||||
}
|
||||
// move viewheight
|
||||
if ( player.playerstate == PST_LIVE )
|
||||
{
|
||||
player.viewheight += player.deltaviewheight;
|
||||
if ( player.viewheight > defaultviewheight )
|
||||
{
|
||||
player.viewheight = defaultviewheight;
|
||||
player.deltaviewheight = 0;
|
||||
}
|
||||
else if ( player.viewheight < (defaultviewheight/2) )
|
||||
{
|
||||
player.viewheight = defaultviewheight/2;
|
||||
if ( player.deltaviewheight <= 0 )
|
||||
player.deltaviewheight = 1/65536.;
|
||||
}
|
||||
if ( player.deltaviewheight )
|
||||
{
|
||||
player.deltaviewheight += 0.25;
|
||||
if ( !player.deltaviewheight )
|
||||
player.deltaviewheight = 1/65536.;
|
||||
}
|
||||
}
|
||||
if ( player.morphTics ) bob = 0;
|
||||
player.viewz = pos.z+player.viewheight+(bob*clamp(ViewBob,0.,1.5)); // [SP] Allow DECORATE changes to view bobbing speed.
|
||||
// handle smooth step down (hacky but looks ok)
|
||||
player.viewz += ssup;
|
||||
ssup = max(0,(ssup*0.7)-0.25);
|
||||
if ( floorclip && (player.playerstate != PST_DEAD) && (pos.z <= floorz) )
|
||||
player.viewz -= Floorclip;
|
||||
if ( player.viewz > ceilingz-4 ) player.viewz = ceilingz-4;
|
||||
if ( player.viewz < floorz+4 ) player.viewz = floorz+4;
|
||||
}
|
||||
|
||||
override void MovePlayer()
|
||||
{
|
||||
if ( !flak_utmovement || !player || (player.mo != self) )
|
||||
|
|
@ -276,9 +382,14 @@ Class UTPlayer : DoomPlayer
|
|||
}
|
||||
else Angle += cmd.yaw*(360./65536.);
|
||||
player.onground = (pos.z <= floorz) || bOnMobj || bMBFBouncer || (player.cheats & CF_NOCLIP2);
|
||||
// slant (aka steep slope) detection
|
||||
// TODO make it 3d floor aware when the PR makes it in
|
||||
if ( floorsector.floorplane.normal dot (0,0,1) < (46342./65536.) )
|
||||
player.onground = false;
|
||||
if ( player.onground ) lastgroundtic = gametic;
|
||||
if ( !player.onground && !bNoGravity && (waterlevel < 2) && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) && (vel.z < 0) )
|
||||
{
|
||||
ssup = max(0,(pos.z-floorz));
|
||||
SetOrigin(Vec2OffsetZ(0,0,floorz),true);
|
||||
player.onground = true;
|
||||
}
|
||||
|
|
@ -321,11 +432,20 @@ Class UTPlayer : DoomPlayer
|
|||
last_sm = sm;
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
{
|
||||
if ( flak_tapdodge && (dodge.length() > 0) )
|
||||
if ( flak_tapdodge && (dodge.length() > 0) && !tempslide )
|
||||
{
|
||||
if ( flak_doomspeed ) vel += dodge.unit()*(groundspeed_doomish*1.5)/TICRATE;
|
||||
else vel += dodge.unit()*(groundspeed*1.5)/TICRATE;
|
||||
vel.z += dodgez/TICRATE;
|
||||
if ( level.IsJumpingAllowed() )
|
||||
{
|
||||
if ( flak_doomspeed ) vel += dodge.unit()*(groundspeed_doomish*1.5)/TICRATE;
|
||||
else vel += dodge.unit()*(groundspeed*1.5)/TICRATE;
|
||||
vel.z += dodgez/TICRATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( flak_doomspeed ) vel += dodge.unit()*(groundspeed_doomish*2.0)/TICRATE;
|
||||
else vel += dodge.unit()*(groundspeed*2.0)/TICRATE;
|
||||
tempslide = 8;
|
||||
}
|
||||
bOnMobj = false;
|
||||
if ( !(player.cheats&CF_PREDICTING) )
|
||||
A_PlaySound("*jump",CHAN_BODY);
|
||||
|
|
@ -339,12 +459,13 @@ Class UTPlayer : DoomPlayer
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( flak_nowalkdrop )
|
||||
if ( flak_nowalkdrop && !tempslide )
|
||||
bNODROPOFF = ((acceleration.length() > double.epsilon) && (cmd.buttons&BT_SPEED));
|
||||
// Hook in Unreal physics
|
||||
Vector2 dir = (0,0);
|
||||
if ( vel.xy.length() > double.epsilon ) dir = vel.xy.unit();
|
||||
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
|
||||
if ( tempslide ) friction *= 0;
|
||||
if ( acceleration.length() <= double.epsilon )
|
||||
{
|
||||
Vector2 oldvel = vel.xy;
|
||||
|
|
@ -369,7 +490,8 @@ Class UTPlayer : DoomPlayer
|
|||
if ( acceleration.length() <= double.epsilon ) PlayIdle();
|
||||
else PlayRunning();
|
||||
}
|
||||
player.vel = vel.xy;
|
||||
if ( tempslide ) player.vel *= 0;
|
||||
else player.vel = vel.xy;
|
||||
}
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
|
|
@ -401,8 +523,9 @@ Class UTPlayer : DoomPlayer
|
|||
if ( vel.length() > terminalvelocity/TICRATE ) vel = vel.unit()*(terminalvelocity/TICRATE);
|
||||
player.vel *= 0;
|
||||
player.jumptics = -2;
|
||||
if ( !(player.cheats & CF_PREDICTING) ) PlayIdle();
|
||||
}
|
||||
else if ( bFly || (player.cheats&CF_NOCLIP2) )
|
||||
else if ( (bFly && bFlyCheat) || (player.cheats&CF_NOCLIP2) )
|
||||
{
|
||||
// fly cheat has infinite friction (player stops moving when movement keys are released)
|
||||
Vector3 dir = (0,0,0);
|
||||
|
|
@ -455,8 +578,16 @@ Class UTPlayer : DoomPlayer
|
|||
}
|
||||
vel = vel+acceleration3/TICRATE;
|
||||
double maxvel;
|
||||
if ( flak_doomspeed ) maxvel = swimspeed_doomish/TICRATE;
|
||||
else maxvel = swimspeed/TICRATE;
|
||||
if ( waterlevel < 2 ) // flying uses ground speed
|
||||
{
|
||||
if ( flak_doomspeed ) maxvel = groundspeed_doomish/TICRATE;
|
||||
else maxvel = groundspeed/TICRATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( flak_doomspeed ) maxvel = swimspeed_doomish/TICRATE;
|
||||
else maxvel = swimspeed/TICRATE;
|
||||
}
|
||||
maxvel *= fs*doomfriction;
|
||||
if ( vel.length() > maxvel ) vel = vel.unit()*maxvel;
|
||||
player.vel = vel.xy;
|
||||
|
|
@ -595,6 +726,389 @@ Class UTPlayer : DoomPlayer
|
|||
{
|
||||
A_PlaySound("ut/playerfootstep",CHAN_5,vol);
|
||||
}
|
||||
|
||||
override void PlayIdle()
|
||||
{
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) )
|
||||
{
|
||||
// Crouching
|
||||
if ( !InStateSequence(CurState,FindState("SpawnCrouch")) )
|
||||
SetStateLabel("SpawnCrouch");
|
||||
}
|
||||
else if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
{
|
||||
// Ground
|
||||
if ( (player && (player.mo == self)) && player.cmd.yaw )
|
||||
{
|
||||
if ( InStateSequence(CurState,FindState("See"))
|
||||
|| InStateSequence(CurState,FindState("SeeAir"))
|
||||
|| InStateSequence(CurState,FindState("SeeSwim"))
|
||||
|| InStateSequence(CurState,FindState("SeeCrouch"))
|
||||
|| InStateSequence(CurState,FindState("SpawnAir"))
|
||||
|| InStateSequence(CurState,FindState("SpawnSwim"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Spawn")+1) )
|
||||
SetStateLabel("Turn");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( InStateSequence(CurState,FindState("See"))
|
||||
|| InStateSequence(CurState,FindState("SeeAir"))
|
||||
|| InStateSequence(CurState,FindState("SeeSwim"))
|
||||
|| InStateSequence(CurState,FindState("SeeCrouch"))
|
||||
|| InStateSequence(CurState,FindState("SpawnAir"))
|
||||
|| InStateSequence(CurState,FindState("SpawnSwim"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch")) )
|
||||
SetStateLabel("Spawn");
|
||||
}
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
{
|
||||
// Falling
|
||||
if ( InStateSequence(CurState,FindState("See"))
|
||||
|| InStateSequence(CurState,FindState("SeeAir"))
|
||||
|| InStateSequence(CurState,FindState("SeeSwim"))
|
||||
|| InStateSequence(CurState,FindState("SeeCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Spawn"))
|
||||
|| InStateSequence(CurState,FindState("SpawnSwim"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Turn")) )
|
||||
SetStateLabel("SpawnAir");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Swimming
|
||||
if ( InStateSequence(CurState,FindState("See"))
|
||||
|| InStateSequence(CurState,FindState("SeeAir"))
|
||||
|| InStateSequence(CurState,FindState("SeeSwim"))
|
||||
|| InStateSequence(CurState,FindState("SeeCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Spawn"))
|
||||
|| InStateSequence(CurState,FindState("SpawnAir"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Turn")) )
|
||||
SetStateLabel("SpawnSwim");
|
||||
}
|
||||
}
|
||||
|
||||
override void PlayRunning()
|
||||
{
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) )
|
||||
{
|
||||
// Crouching
|
||||
if ( !InStateSequence(CurState,FindState("SeeCrouch")) )
|
||||
SetStateLabel("SeeCrouch");
|
||||
}
|
||||
else if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
{
|
||||
// Ground
|
||||
if ( InStateSequence(CurState,FindState("Spawn"))
|
||||
|| InStateSequence(CurState,FindState("SpawnAir"))
|
||||
|| InStateSequence(CurState,FindState("SpawnSwim"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch"))
|
||||
|| InStateSequence(CurState,FindState("SeeAir"))
|
||||
|| InStateSequence(CurState,FindState("SeeSwim"))
|
||||
|| InStateSequence(CurState,FindState("SeeCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Turn")) )
|
||||
SetStateLabel("See");
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
{
|
||||
// Falling
|
||||
if ( InStateSequence(CurState,FindState("Spawn"))
|
||||
|| InStateSequence(CurState,FindState("SpawnAir"))
|
||||
|| InStateSequence(CurState,FindState("SpawnSwim"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch"))
|
||||
|| InStateSequence(CurState,FindState("See"))
|
||||
|| InStateSequence(CurState,FindState("SeeSwim"))
|
||||
|| InStateSequence(CurState,FindState("SeeCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Turn")) )
|
||||
SetStateLabel("SeeAir");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Swimming
|
||||
if ( InStateSequence(CurState,FindState("Spawn"))
|
||||
|| InStateSequence(CurState,FindState("SpawnAir"))
|
||||
|| InStateSequence(CurState,FindState("SpawnSwim"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch"))
|
||||
|| InStateSequence(CurState,FindState("See"))
|
||||
|| InStateSequence(CurState,FindState("SeeAir"))
|
||||
|| InStateSequence(CurState,FindState("SeeCrouch"))
|
||||
|| InStateSequence(CurState,FindState("Turn")) )
|
||||
SetStateLabel("SeeSwim");
|
||||
}
|
||||
}
|
||||
|
||||
override void PlayAttacking()
|
||||
{
|
||||
// no animation if crouched
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) ) return;
|
||||
// check weapon type
|
||||
if ( (player.ReadyWeapon is 'SniperRifle') && (player.buttons&BT_ALTATTACK) )
|
||||
return;
|
||||
if ( ((player.ReadyWeapon is 'BioRifle') && (player.buttons&BT_ALTATTACK))
|
||||
|| (player.ReadyWeapon is 'UTRocketLauncher') )
|
||||
{
|
||||
if ( !InStateSequence(CurState,FindState("MissileRepStill")) )
|
||||
SetStateLabel("MissileRepStill");
|
||||
}
|
||||
else if ( ((player.ReadyWeapon is 'ImpactHammer') && (player.buttons&BT_ATTACK))
|
||||
|| ((player.ReadyWeapon is 'UTChainsaw') && (player.buttons&BT_ATTACK))
|
||||
|| (player.ReadyWeapon is 'PulseGun')
|
||||
|| (player.ReadyWeapon is 'Minigun') )
|
||||
{
|
||||
if ( !InStateSequence(CurState,FindState("MissileRep")) )
|
||||
SetStateLabel("MissileRep");
|
||||
}
|
||||
else SetStateLabel("Missile");
|
||||
}
|
||||
|
||||
override void PlayAttacking2()
|
||||
{
|
||||
PlayAttacking();
|
||||
}
|
||||
|
||||
virtual void PlayAttacking3()
|
||||
{
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) ) return;
|
||||
SetStateLabel("Missile");
|
||||
}
|
||||
|
||||
virtual void PlayReloading()
|
||||
{
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) ) return;
|
||||
SetStateLabel("Reload");
|
||||
}
|
||||
|
||||
virtual void PlayLanding()
|
||||
{
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) ) return;
|
||||
SetStateLabel("Landing");
|
||||
}
|
||||
|
||||
void A_HeadPop()
|
||||
{
|
||||
headless = true;
|
||||
Class<UTHead> hclass = "UTHeadMale";
|
||||
if ( DollType == DOLL_Boss ) hclass = "UTHeadBoss";
|
||||
else if ( DollType == DOLL_Female ) hclass = "UTHeadFemale";
|
||||
let h = UTHead(Spawn(hclass,Vec3Offset(0,0,viewheight)));
|
||||
if ( player )
|
||||
{
|
||||
h.headowner = player;
|
||||
player.camera = h;
|
||||
}
|
||||
double ang = FRandom[Blod](0,360);
|
||||
double pt = FRandom[Blod](-90,-30);
|
||||
Vector3 dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
|
||||
h.vel = vel*0.6+dir*FRandom[Blod](8.0,12.0);
|
||||
}
|
||||
|
||||
void A_GibMe()
|
||||
{
|
||||
let a = Actor.Spawn("UTPlayerGibber",pos);
|
||||
a.vel = vel;
|
||||
a.Scale = Scale;
|
||||
a.A_SetSize(radius,height);
|
||||
UTGibber(a).Gibbed = self;
|
||||
}
|
||||
|
||||
void A_DMFade()
|
||||
{
|
||||
if ( !deathmatch || player ) return;
|
||||
corpsetime++;
|
||||
if ( corpsetime > 350 ) A_FadeOut(0.03);
|
||||
}
|
||||
|
||||
override double GetDeathHeight()
|
||||
{
|
||||
// no height reduction while still being zapped
|
||||
if ( DamageType == 'Zapped' ) return height;
|
||||
return Super.GetDeathHeight();
|
||||
}
|
||||
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
#### # 5;
|
||||
PLAY ABCDEFG 8;
|
||||
Goto Spawn+1;
|
||||
Turn:
|
||||
#### # 6;
|
||||
PLYT A 0 A_JumpIf(!player||!player.cmd.yaw,"Spawn");
|
||||
PLYT A 6;
|
||||
PLYT A 0 A_JumpIf(!player||!player.cmd.yaw,"Spawn");
|
||||
PLYT A 6;
|
||||
PLYT B 0 A_JumpIf(!player||!player.cmd.yaw,"Spawn");
|
||||
PLYT B 6;
|
||||
PLYT B 0 A_JumpIf(!player||!player.cmd.yaw,"Spawn");
|
||||
PLYT B 6;
|
||||
Goto Turn+1;
|
||||
SpawnAir:
|
||||
#### # 5;
|
||||
PLYA A 50;
|
||||
PLYL A 50;
|
||||
Goto SpawnAir+1;
|
||||
SpawnSwim:
|
||||
#### # 5;
|
||||
PLYS ABCDEFG 6;
|
||||
Goto SpawnSwim+1;
|
||||
SpawnCrouch:
|
||||
#### # 5;
|
||||
PLYC A -1;
|
||||
Wait;
|
||||
See:
|
||||
#### # 5;
|
||||
PLAY HIJKL 4;
|
||||
Goto See+1;
|
||||
SeeAir:
|
||||
#### # 5;
|
||||
PLYA A 50;
|
||||
PLYL A 50;
|
||||
Goto SeeAir+1;
|
||||
SeeSwim:
|
||||
#### # 5;
|
||||
PLYS HIJKL 4;
|
||||
Goto SeeSwim+1;
|
||||
SeeCrouch:
|
||||
#### # 5;
|
||||
PLYC ABCDE 4;
|
||||
Goto SeeCrouch+1;
|
||||
Missile:
|
||||
#### # 2;
|
||||
PLAY MNOPQA 3;
|
||||
Goto Spawn;
|
||||
MissileRep:
|
||||
#### # 2;
|
||||
PLAY R 2;
|
||||
PLAY S 0 A_JumpIf(!player||!(player.buttons&(BT_ATTACK|BT_ALTATTACK)),"Spawn");
|
||||
PLAY S 2;
|
||||
PLAY T 0 A_JumpIf(!player||!(player.buttons&(BT_ATTACK|BT_ALTATTACK)),"Spawn");
|
||||
PLAY T 2;
|
||||
PLAY U 0 A_JumpIf(!player||!(player.buttons&(BT_ATTACK|BT_ALTATTACK)),"Spawn");
|
||||
PLAY U 2;
|
||||
PLAY V 0 A_JumpIf(!player||!(player.buttons&(BT_ATTACK|BT_ALTATTACK)),"Spawn");
|
||||
PLAY V 2;
|
||||
PLAY R 0 A_JumpIf(!player||!(player.buttons&(BT_ATTACK|BT_ALTATTACK)),"Spawn");
|
||||
Goto MissileRep+1;
|
||||
MissileRepStill:
|
||||
#### # 2;
|
||||
PLAY R 2;
|
||||
PLAY R 0 A_JumpIf(!player||!(player.buttons&(BT_ATTACK|BT_ALTATTACK)),"Spawn");
|
||||
Goto MissileRepStill+1;
|
||||
Reload:
|
||||
#### # 3;
|
||||
PLYR ABCDEFGH 4;
|
||||
Goto Spawn;
|
||||
Landing:
|
||||
#### # 4;
|
||||
PLYL A 3;
|
||||
Goto Spawn;
|
||||
Pain:
|
||||
#### # 0 A_Jump(256,1,3,5,7);
|
||||
#### # 2;
|
||||
PLAY W 3 A_Pain();
|
||||
Goto Spawn;
|
||||
#### # 2;
|
||||
PLAY Y 3 A_Pain();
|
||||
Goto Spawn;
|
||||
#### # 2;
|
||||
PLAY Z 3 A_Pain();
|
||||
Goto Spawn;
|
||||
Pain.Decapitated:
|
||||
#### # 2;
|
||||
PLAY X 3 A_Pain();
|
||||
Goto Spawn;
|
||||
Death.Decapitated:
|
||||
#### # 0 A_HeadPop();
|
||||
PLD4 A 3 A_PlayerScream();
|
||||
PLD4 B 3 A_NoBlocking();
|
||||
PLD4 CDEFGHIJKLMNO 3;
|
||||
PLD4 P 1 A_DMFade();
|
||||
Wait;
|
||||
Death:
|
||||
#### # 0 A_JumpIf(vel.length()>20,"Death11");
|
||||
#### # 0 A_JumpIf(vel.length()>10,"Death1");
|
||||
#### # 0 A_Jump(256,"Death2","Death3","Death7","Death8");
|
||||
Death11:
|
||||
#### # 3;
|
||||
PD11 A 3 A_PlayerScream();
|
||||
PD11 B 3 A_NoBlocking();
|
||||
PD11 CDEFGHIJKLMNOPQ 3;
|
||||
PD11 R 1 A_DMFade();
|
||||
Wait;
|
||||
Death.Zapped:
|
||||
#### # 3;
|
||||
PLD9 A 3 A_PlayerScream();
|
||||
PLD9 B 3 A_NoBlocking();
|
||||
PLD9 CDEFGHIJKLMNOPQRST 2;
|
||||
PD9B A 2 A_SetSize(-1,height*0.25); // reduce now
|
||||
PD9B BCDEFGHI 2;
|
||||
PD9B J 1 A_DMFade();
|
||||
Wait;
|
||||
Death8:
|
||||
#### # 3;
|
||||
PLD8 A 3 A_PlayerScream();
|
||||
PLD8 B 3 A_NoBlocking();
|
||||
PLD8 CDEFGHIJKLMNOPQ 3;
|
||||
PLD8 R 1 A_DMFade();
|
||||
Wait;
|
||||
Death7:
|
||||
#### # 3;
|
||||
PLD7 A 3 A_PlayerScream();
|
||||
PLD7 B 3 A_NoBlocking();
|
||||
PLD7 CDEFGHIJKLMNOPQRST 3;
|
||||
PLD7 U 1 A_DMFade();
|
||||
Wait;
|
||||
Death3:
|
||||
#### # 3;
|
||||
PLD3 A 3 A_PlayerScream();
|
||||
PLD3 B 3 A_NoBlocking();
|
||||
PLD3 CDEFGHIJKL 3;
|
||||
PLD3 M 1 A_DMFade();
|
||||
Wait;
|
||||
Death2:
|
||||
#### # 3;
|
||||
PLD2 A 3 A_PlayerScream();
|
||||
PLD2 B 3 A_NoBlocking();
|
||||
PLD2 CDEFGHIJKLMNO 3;
|
||||
PLD2 P 1 A_DMFade();
|
||||
Wait;
|
||||
Death1:
|
||||
#### # 3;
|
||||
PLD1 A 3 A_PlayerScream();
|
||||
PLD1 B 3 A_NoBlocking();
|
||||
PLD1 CDEFGHIJKL 3;
|
||||
PLD1 M 1 A_DMFade();
|
||||
Wait;
|
||||
XDeath:
|
||||
TNT1 A 350
|
||||
{
|
||||
A_XScream();
|
||||
A_NoBlocking();
|
||||
A_GibMe();
|
||||
}
|
||||
TNT1 A 1 A_CheckPlayerDone();
|
||||
Wait;
|
||||
Taunt1:
|
||||
#### # 5;
|
||||
PLT1 ABCDEFGHIJKLMNOPQRST 3;
|
||||
Goto Spawn;
|
||||
Taunt2:
|
||||
#### # 5;
|
||||
PLT2 ABCDEFGHIJKLMNOPQR 4;
|
||||
PLT2 R 8;
|
||||
PLAY A 3;
|
||||
Goto Spawn;
|
||||
Taunt3:
|
||||
#### # 5;
|
||||
PLT3 ABCDEFGHIJKLMNO 3;
|
||||
Goto Spawn;
|
||||
Taunt4:
|
||||
#### # 5;
|
||||
PLT4 ABCDEFGHIJKLMNO 3;
|
||||
Goto Spawn;
|
||||
}
|
||||
}
|
||||
|
||||
// these only exist for sound
|
||||
|
|
@ -621,26 +1135,120 @@ Class UTPlayerTMale2 : UTPlayer
|
|||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerTFemale1 : UTPlayer
|
||||
Class UTPlayerTFemale : UTPlayer
|
||||
{
|
||||
Default
|
||||
{
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
}
|
||||
|
||||
void A_LegPop()
|
||||
{
|
||||
leglessR = true;
|
||||
let a = Actor.Spawn("UTFemaleLegGibber",pos);
|
||||
a.vel = vel;
|
||||
a.Scale = Scale;
|
||||
a.A_SetSize(radius,height);
|
||||
UTGibber(a).Gibbed = self;
|
||||
}
|
||||
|
||||
States
|
||||
{
|
||||
Reload:
|
||||
#### # 3;
|
||||
PLYR ABCDEF 4;
|
||||
Goto Spawn;
|
||||
Taunt1:
|
||||
#### # 5;
|
||||
PLT1 ABCDEFGHIJKLMNO 3;
|
||||
Goto Spawn;
|
||||
Taunt2:
|
||||
#### # 5;
|
||||
PLT2 ABCDEFGHIJ 6;
|
||||
PLAY A 3;
|
||||
Goto Spawn;
|
||||
Death.Decapitated:
|
||||
#### # 0 A_HeadPop();
|
||||
PLD6 A 3 A_PlayerScream();
|
||||
PLD6 B 3 A_NoBlocking();
|
||||
PLD6 CDEFGHIJ 3;
|
||||
PLD6 K 1 A_DMFade();
|
||||
Wait;
|
||||
Death.Zapped:
|
||||
#### # 3;
|
||||
PLD9 A 3 A_PlayerScream();
|
||||
PLD9 B 3 A_NoBlocking();
|
||||
PLD9 CDEFGHIJKLMNOPQRST 2;
|
||||
PD9B A 2 A_SetSize(-1,height*0.25); // reduce now
|
||||
PD9B BCDEFGHIJ 2;
|
||||
PD9B K 1 A_DMFade();
|
||||
Wait;
|
||||
Death:
|
||||
#### # 0 A_JumpIf(vel.length()>20,"Death5");
|
||||
#### # 0 A_JumpIf(vel.length()>10,"Death2");
|
||||
#### # 0 A_Jump(256,"Death1","Death3","Death4","Death7");
|
||||
Death7:
|
||||
#### # 3;
|
||||
PLD7 A 3 A_PlayerScream();
|
||||
PLD7 B 3 A_NoBlocking();
|
||||
PLD7 CDEFGHIJ 3;
|
||||
PLD7 K 1 A_DMFade();
|
||||
Wait;
|
||||
Death5:
|
||||
#### # 0 A_LegPop();
|
||||
PLD5 A 3 A_PlayerScream();
|
||||
PLD5 B 3 A_NoBlocking();
|
||||
PLD5 CDEFGHIJKL 3;
|
||||
PLD5 M 1 A_DMFade();
|
||||
Wait;
|
||||
Death4:
|
||||
#### # 3;
|
||||
PLD4 A 3 A_PlayerScream();
|
||||
PLD4 B 3 A_NoBlocking();
|
||||
PLD4 CDEFGHIJKL 3;
|
||||
PLD4 M 1 A_DMFade();
|
||||
Wait;
|
||||
Death3:
|
||||
#### # 3;
|
||||
PLD3 A 3 A_PlayerScream();
|
||||
PLD3 B 3 A_NoBlocking();
|
||||
PLD3 CDEFGHIJKLMNO 3;
|
||||
PLD3 P 1 A_DMFade();
|
||||
Wait;
|
||||
Death2:
|
||||
#### # 3;
|
||||
PLD2 A 3 A_PlayerScream();
|
||||
PLD2 B 3 A_NoBlocking();
|
||||
PLD2 CDEFGHIJKLMNOPQ 3;
|
||||
PLD2 R 1 A_DMFade();
|
||||
Wait;
|
||||
Death1:
|
||||
#### # 3;
|
||||
PLD1 A 3 A_PlayerScream();
|
||||
PLD1 B 3 A_NoBlocking();
|
||||
PLD1 CDEFGHIJKLMNOPQRSTUV 3;
|
||||
PLD1 W 1 A_DMFade();
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
Class UTPlayerTFemale1 : UTPlayerTFemale
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "$N_TFEMALE1";
|
||||
Player.Portrait "Ivana";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
UTPlayer.VoiceType VOICE_FemaleOne;
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerTFemale2 : UTPlayer
|
||||
Class UTPlayerTFemale2 : UTPlayerTFemale
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "$N_TFEMALE2";
|
||||
Player.Portrait "Lauren";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
UTPlayer.VoiceType VOICE_FemaleTwo;
|
||||
-NOMENU;
|
||||
}
|
||||
|
|
@ -1341,6 +1949,8 @@ Class UTBlueKey : BlueCard
|
|||
Class ShredCorpseHitbox : Actor
|
||||
{
|
||||
int accdamage;
|
||||
Vector3 lastvel;
|
||||
bool wasonair;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -1348,6 +1958,7 @@ Class ShredCorpseHitbox : Actor
|
|||
-SOLID;
|
||||
+DONTSPLASH;
|
||||
+SHOOTABLE;
|
||||
+NOTELEPORT;
|
||||
Health int.max;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
|
|
@ -1363,23 +1974,44 @@ Class ShredCorpseHitbox : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( !flak_corpsedamage || !target || (target.Health > 0) || target.InStateSequence(target.CurState,target.FindState("XDeath")) )
|
||||
if ( (!(target is 'UTPlayer') && !flak_corpsedamage) || !target || (target.Health > 0) || target.InStateSequence(target.CurState,target.FindState("XDeath")) )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
SetOrigin(target.pos,true);
|
||||
A_SetSize(target.radius,target.height);
|
||||
if ( target.pos.z > target.floorz ) wasonair = true;
|
||||
else
|
||||
{
|
||||
if ( wasonair )
|
||||
{
|
||||
A_PlaySound("misc/corpsefall",CHAN_BODY,clamp(-lastvel.z*0.2,0.1,1.0));
|
||||
if ( lastvel.z < -20 ) DamageMobj(null,null,int.max,'Falling');
|
||||
}
|
||||
wasonair = false;
|
||||
}
|
||||
lastvel = target.vel;
|
||||
}
|
||||
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
|
||||
{
|
||||
if ( (target is 'UTPlayer') && (mod == 'Zapped') && (target.sprite == target.GetSpriteIndex('PLD9')) )
|
||||
{
|
||||
// keep the zapping action on
|
||||
target.SetState(target.FindState("Death.Zapped")+Random[ZapMe](2,8));
|
||||
damage /= 4;
|
||||
// push the corpse
|
||||
target.vel.xy += RotateVector((1,0),angle)*damage*0.1;
|
||||
// keep it afloat
|
||||
target.vel.z = max(0.1,target.vel.z+0.1);
|
||||
}
|
||||
accdamage -= damage;
|
||||
int gibhealth = (target.GibHealth==int.min)?-target.SpawnHealth():target.GibHealth;
|
||||
if ( accdamage < gibhealth )
|
||||
{
|
||||
// force gib (cheap ATM)
|
||||
State gib = target.FindState("XDeath");
|
||||
if ( !gib ) gib = target.FindState("Death.Extreme");
|
||||
State gib = target.FindState("XDeath",true);
|
||||
if ( !gib ) gib = target.FindState("Death.Extreme",true);
|
||||
if ( gib ) target.SetState(gib);
|
||||
Destroy();
|
||||
}
|
||||
|
|
@ -1466,8 +2098,8 @@ Class GenericFlash : HUDMessageBase
|
|||
}
|
||||
override bool Tick()
|
||||
{
|
||||
alpha -= 1./duration;
|
||||
return (alpha<=0);
|
||||
if ( duration > 0 ) alpha -= 1./duration;
|
||||
return (alpha<=0)||(!cam);
|
||||
}
|
||||
override void Draw( int bottom, int visibility )
|
||||
{
|
||||
|
|
@ -1945,6 +2577,27 @@ Class UTMainHandler : EventHandler
|
|||
for ( int i=0; i<MAXPLAYERS; i++ ) if ( playeringame[i] ) players[i].mo.TakeInventory("Translocator",1);
|
||||
}
|
||||
}
|
||||
else if ( e.Name ~== "uttaunt" )
|
||||
{
|
||||
if ( (e.player == -1) || !playeringame[e.player] || !players[e.player].mo ) return;
|
||||
let mo = players[e.player].mo;
|
||||
if ( (mo.Health <= 0) || !(mo is 'UTPlayer') ) return;
|
||||
switch ( e.Args[0] )
|
||||
{
|
||||
case 2:
|
||||
if ( mo.FindState("Taunt2") ) mo.SetStateLabel("Taunt2");
|
||||
break;
|
||||
case 3:
|
||||
if ( mo.FindState("Taunt3") ) mo.SetStateLabel("Taunt3");
|
||||
break;
|
||||
case 4:
|
||||
if ( mo.FindState("Taunt4") ) mo.SetStateLabel("Taunt4");
|
||||
break;
|
||||
default:
|
||||
if ( mo.FindState("Taunt1") ) mo.SetStateLabel("Taunt1");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override void WorldTick()
|
||||
|
|
@ -1990,14 +2643,10 @@ Class UTMainHandler : EventHandler
|
|||
{
|
||||
if ( e.Thing.bDONTGIB ) return;
|
||||
// gibbers
|
||||
if ( flak_gibs && !e.Thing.bNOBLOOD && (e.Thing.FindState("XDeath") || e.Thing.FindState("Death.Extreme")) && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.Thing.Health < e.Thing.GetGibHealth())) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) )
|
||||
if ( flak_gibs && !e.Thing.bNOBLOOD && (e.Thing.FindState("XDeath",true) || e.Thing.FindState("Death.Extreme",true)) && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.Thing.Health < e.Thing.GetGibHealth())) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) )
|
||||
{
|
||||
// players have special gibbing
|
||||
if ( e.Thing.player )
|
||||
{
|
||||
// TODO
|
||||
return;
|
||||
}
|
||||
// players use their own gibber
|
||||
if ( e.Thing is 'UTPlayer' ) return;
|
||||
// generic gibbing
|
||||
let a = Actor.Spawn("UTGibber",e.Thing.pos);
|
||||
a.vel = e.Thing.vel;
|
||||
|
|
@ -2013,7 +2662,7 @@ Class UTMainHandler : EventHandler
|
|||
return;
|
||||
}
|
||||
// attach damage accumulator for corpses
|
||||
if ( !flak_corpsedamage ) return;
|
||||
if ( !(e.Thing is 'UTPlayer') && !flak_corpsedamage ) return;
|
||||
let a = Actor.Spawn("ShredCorpseHitbox",e.Thing.pos);
|
||||
a.target = e.Thing;
|
||||
}
|
||||
|
|
@ -2044,7 +2693,9 @@ Class UTMainHandler : EventHandler
|
|||
double dist = max(1,dir.length());
|
||||
double damagescale = 1-max(0,(dist-a.radius)/ExplosionRadius);
|
||||
dir = dir/dist;
|
||||
a.vel += dir*damagescale*(MomentumTransfer/(Thinker.TICRATE*a.mass));
|
||||
if ( (a is 'ShredCorpseHitbox') && a.target )
|
||||
a.target.vel += dir*damagescale*(MomentumTransfer/(Thinker.TICRATE*a.target.mass));
|
||||
else a.vel += dir*damagescale*(MomentumTransfer/(Thinker.TICRATE*a.mass));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2052,7 +2703,9 @@ Class UTMainHandler : EventHandler
|
|||
static void DoKnockback( Actor Victim, Vector3 HitDirection, double MomentumTransfer )
|
||||
{
|
||||
if ( !Victim ) return;
|
||||
Victim.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.Mass));
|
||||
if ( (Victim is 'ShredCorpseHitbox') && Victim.target )
|
||||
Victim.target.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.target.Mass));
|
||||
else Victim.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.Mass));
|
||||
}
|
||||
|
||||
static void DoSwing( Actor target, Vector2 dir, double initial, double inc, int steps, int mode = 0, int delay = 0, double rmul = 1.0 )
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Class UTBloodDrop : Actor
|
|||
}
|
||||
void A_BloodDie()
|
||||
{
|
||||
// TODO
|
||||
// TODO leave decals
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -112,9 +112,12 @@ Class UTBloodSpurt : Actor
|
|||
str = FRandom[Blood](2.0,3.2)*args[0];
|
||||
int sz = 7*args[0];
|
||||
double ang, pt;
|
||||
if ( !flak_blood ) sz /= 3;
|
||||
for ( int i=0; i<sz; i++ )
|
||||
{
|
||||
let d = Spawn("UTBloodDrop",pos);
|
||||
Actor d;
|
||||
if ( flak_blood ) d = Spawn("UTBloodDrop",pos);
|
||||
else d = Spawn("Blood",pos,ALLOW_REPLACE);
|
||||
d.translation = translation;
|
||||
d.SetShade(fillcolor);
|
||||
ang = angle+FRandom[Blood](-3,3)*str;
|
||||
|
|
@ -160,9 +163,12 @@ Class UTBloodTrail : Actor
|
|||
if ( !target ) return;
|
||||
SetOrigin(target.pos,true);
|
||||
double ang, pt;
|
||||
for ( int i=0; i<3; i++ )
|
||||
int max = flak_blood?3:Random[Blood](-2,1);
|
||||
for ( int i=0; i<max; i++ )
|
||||
{
|
||||
let d = Spawn("UTBloodDrop",pos);
|
||||
Actor d;
|
||||
if ( flak_blood ) d = Spawn("UTBloodDrop",pos);
|
||||
else d = Spawn("Blood",pos,ALLOW_REPLACE);
|
||||
d.translation = translation;
|
||||
d.SetShade(fillcolor);
|
||||
ang = FRandom[Blood](0,360);
|
||||
|
|
@ -232,18 +238,18 @@ Class UTGibber : Actor
|
|||
bool dummy;
|
||||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
let a = Spawn(gibcls[Random[Blod](0,3)],pos+(FRandom[Blod](-0.5,0.5)*radius,FRandom[Blod](-0.5,0.5)*radius,FRandom[Blod](0.2,0.8)*height));
|
||||
let a = Spawn(gibcls[Random[Blod](0,3)],Vec3Offset(FRandom[Blod](-0.5,0.5)*radius,FRandom[Blod](-0.5,0.5)*radius,FRandom[Blod](0.2,0.8)*height));
|
||||
a.translation = translation;
|
||||
a.SetShade(fillcolor);
|
||||
a.scale *= FRandom[Blod](1.7,2.3)*scale.x;
|
||||
ang = FRandom[Blod](0,360);
|
||||
pt = FRandom[Blod](-90,90);
|
||||
dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
|
||||
a.vel = rvel*0.6+dir*FRandom[Blod](8.0,12.0);
|
||||
a.vel = rvel*0.6+dir*FRandom[Blod](3.0,6.0);
|
||||
}
|
||||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
let a = Spawn("UTBloodPuff",pos+(FRandom[Blod](-0.8,0.8)*radius,FRandom[Blod](-0.8,0.8)*radius,FRandom[Blod](0.1,0.9)*height));
|
||||
let a = Spawn("UTBloodPuff",Vec3Offset(FRandom[Blod](-12,12),FRandom[Blod](-12,12),FRandom[Blod](0.1,0.9)*height));
|
||||
a.translation = translation;
|
||||
a.SetShade(fillcolor);
|
||||
a.scale *= FRandom[Blod](1.8,2.3)*scale.x;
|
||||
|
|
@ -268,6 +274,7 @@ Class UTGibber : Actor
|
|||
{
|
||||
+NOCLIP;
|
||||
+NOGRAVITY;
|
||||
+NOTELEPORT;
|
||||
Radius 32;
|
||||
Height 16;
|
||||
}
|
||||
|
|
@ -281,6 +288,158 @@ Class UTGibber : Actor
|
|||
}
|
||||
}
|
||||
|
||||
Class UTFemaleLegGibber : UTGibber
|
||||
{
|
||||
bool firstgib;
|
||||
|
||||
override void BurstGibs()
|
||||
{
|
||||
static const class<Actor> parts[] = {"UTFemaleFoot","UTThigh"};
|
||||
static const double partofsy[] = {9,8};
|
||||
static const double partofsz[] = {9,20};
|
||||
Actor a;
|
||||
double ang, pt;
|
||||
Vector3 dir;
|
||||
if ( !firstgib )
|
||||
{
|
||||
firstgib = true;
|
||||
for ( int i=0; i<2; i++ )
|
||||
{
|
||||
Actor a = Spawn(parts[i],Vec3Offset(-partofsy[i]*sin(angle),partofsy[i]*cos(angle),partofsz[i]));
|
||||
ang = FRandom[Blod](0,360);
|
||||
pt = FRandom[Blod](-90,90);
|
||||
dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
|
||||
a.vel = rvel*0.6+dir*FRandom[Blod](3.0,6.0);
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
Vector3 box = (FRandom[Blod](-8,8),FRandom[Blod](7,12),FRandom[Blod](5,18));
|
||||
let a = Spawn("UTBloodPuff",Vec3Offset(box.x*cos(angle)-box.y*sin(angle),box.x*sin(angle)+box.y*cos(angle),box.z));
|
||||
ang = FRandom[Blod](0,360);
|
||||
pt = FRandom[Blod](-90,90);
|
||||
dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
|
||||
a.vel = rvel*0.2+dir*FRandom[Blod](1.5,3.0);
|
||||
}
|
||||
A_CountDown();
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
gibsize = 3;
|
||||
reactiontime = 5;
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TNT1 A 0 NoDelay; // no sound, done by player
|
||||
TNT1 A 1 BurstGibs();
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
||||
Class UTPlayerGibber : UTGibber
|
||||
{
|
||||
bool firstgib;
|
||||
|
||||
override void BurstGibs()
|
||||
{
|
||||
static const class<Actor> bossparts[] = {"UTBossArm","UTBossArm","UTBossFoot","UTBossFoot","UTMaleTorso","UTHeadBoss"};
|
||||
static const class<Actor> maleparts[] = {"UTMaleArm","UTMaleArm","UTMaleFoot","UTMaleFoot","UTMaleTorso","UTHeadMale"};
|
||||
static const class<Actor> femaleparts[] = {"UTFemaleArm","UTFemaleArm","UTFemaleFoot","UTFemaleFoot","UTFemaleTorso","UTHeadFemale"};
|
||||
static const class<Actor> extraparts[] = {"UTThigh","UTThigh","UTHeart","UTLiver","UTStomach"};
|
||||
static const double partofsy[] =
|
||||
{
|
||||
14,
|
||||
-14,
|
||||
9,
|
||||
-9,
|
||||
0,
|
||||
0,
|
||||
8,
|
||||
-8,
|
||||
-2,
|
||||
5,
|
||||
-3
|
||||
};
|
||||
static const double partofsz[] =
|
||||
{
|
||||
36,
|
||||
36,
|
||||
9,
|
||||
9,
|
||||
32,
|
||||
48,
|
||||
20,
|
||||
20,
|
||||
40,
|
||||
32,
|
||||
35
|
||||
};
|
||||
Actor a;
|
||||
double ang, pt;
|
||||
Vector3 dir;
|
||||
if ( !firstgib )
|
||||
{
|
||||
firstgib = true;
|
||||
for ( int i=0; i<11; i++ )
|
||||
{
|
||||
if ( (i == 5) && UTPlayer(Gibbed).headless ) continue;
|
||||
if ( (i == 0) && UTPlayer(Gibbed).armlessR ) continue;
|
||||
if ( (i == 1) && UTPlayer(Gibbed).armlessL ) continue;
|
||||
if ( ((i == 2) || (i == 6)) && UTPlayer(Gibbed).leglessR ) continue;
|
||||
if ( ((i == 3) || (i == 7)) && UTPlayer(Gibbed).leglessL ) continue;
|
||||
if ( ((i == 4) || (i > 7)) && UTPlayer(Gibbed).torsoless ) continue;
|
||||
Actor a;
|
||||
if ( i < 6 )
|
||||
{
|
||||
if ( UTPlayer(Gibbed).DollType == UTPlayer.DOLL_Boss )
|
||||
a = Spawn(bossparts[i],Vec3Offset(-partofsy[i]*sin(angle),partofsy[i]*cos(angle),partofsz[i]));
|
||||
else if ( UTPlayer(Gibbed).DollType == UTPlayer.DOLL_Female )
|
||||
a = Spawn(femaleparts[i],Vec3Offset(-partofsy[i]*sin(angle),partofsy[i]*cos(angle),partofsz[i]));
|
||||
else a = Spawn(maleparts[i],Vec3Offset(-partofsy[i]*sin(angle),partofsy[i]*cos(angle),partofsz[i]));
|
||||
}
|
||||
else a = Spawn(extraparts[i-6],Vec3Offset(-partofsy[i]*sin(angle),partofsy[i]*cos(angle),partofsz[i]));
|
||||
ang = FRandom[Blod](0,360);
|
||||
pt = FRandom[Blod](-90,90);
|
||||
if ( a is 'UTHead' )
|
||||
{
|
||||
pt = FRandom[Blod](-90,-15);
|
||||
if ( UTPlayer(Gibbed).player )
|
||||
{
|
||||
UTPlayer(Gibbed).player.Camera = a;
|
||||
UTHead(a).headowner = UTPlayer(Gibbed).player;
|
||||
}
|
||||
}
|
||||
dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
|
||||
a.vel = rvel*0.6+dir*FRandom[Blod](3.0,6.0);
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
let a = Spawn("UTBloodPuff",Vec3Offset(FRandom[Blod](-0.8,0.8)*radius,FRandom[Blod](-0.8,0.8)*radius,FRandom[Blod](0.1,0.9)*height));
|
||||
ang = FRandom[Blod](0,360);
|
||||
pt = FRandom[Blod](-90,90);
|
||||
dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
|
||||
a.vel = rvel*0.2+dir*FRandom[Blod](1.5,3.0);
|
||||
}
|
||||
A_CountDown();
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
gibsize = 3;
|
||||
reactiontime = 5;
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TNT1 A 0 NoDelay; // no sound, done by player
|
||||
TNT1 A 1 BurstGibs();
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
||||
// Chunks
|
||||
Class UTGib : Actor
|
||||
{
|
||||
|
|
@ -301,6 +460,7 @@ Class UTGib : Actor
|
|||
+MISSILE;
|
||||
+THRUACTORS;
|
||||
+USEBOUNCESTATE;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -310,9 +470,9 @@ Class UTGib : Actor
|
|||
if ( bloodcolor ) tracer.SetShade(bloodcolor);
|
||||
else tracer.SetShade(gameinfo.defaultbloodcolor);
|
||||
tracer.translation = bloodtranslation;
|
||||
rollvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1);
|
||||
anglevel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1);
|
||||
pitchvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1);
|
||||
rollvel = FRandom[Blod](3,6)*RandomPick[Blod](-1,1);
|
||||
anglevel = FRandom[Blod](3,6)*RandomPick[Blod](-1,1);
|
||||
pitchvel = FRandom[Blod](3,6)*RandomPick[Blod](-1,1);
|
||||
}
|
||||
void A_HandleBounce()
|
||||
{
|
||||
|
|
@ -331,9 +491,12 @@ Class UTGib : Actor
|
|||
else if ( spd > 20 ) vel *= 0.8;
|
||||
A_PlaySound("misc/gibp");
|
||||
double ang, pt;
|
||||
for ( int i=0; i<6; i++ )
|
||||
int max = flak_blood?6:2;
|
||||
for ( int i=0; i<max; i++ )
|
||||
{
|
||||
let d = Spawn("UTBloodDrop",pos);
|
||||
Actor d;
|
||||
if ( flak_blood ) d = Spawn("UTBloodDrop",pos);
|
||||
else d = Spawn("Blood",pos,ALLOW_REPLACE);
|
||||
d.translation = bloodtranslation;
|
||||
if ( bloodcolor ) d.SetShade(bloodcolor);
|
||||
else d.SetShade(gameinfo.defaultbloodcolor);
|
||||
|
|
@ -344,9 +507,9 @@ Class UTGib : Actor
|
|||
d.vel = dir*FRandom[Blood](0.8,1.2);
|
||||
d.scale *= 0.75*FRandom[Blood](0.6,1.4);
|
||||
}
|
||||
rollvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1);
|
||||
anglevel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1);
|
||||
pitchvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1);
|
||||
rollvel = FRandom[Blod](3,6)*RandomPick[Blod](-1,1);
|
||||
anglevel = FRandom[Blod](3,6)*RandomPick[Blod](-1,1);
|
||||
pitchvel = FRandom[Blod](3,6)*RandomPick[Blod](-1,1);
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -378,25 +541,71 @@ Class UTFemaleTorso : UTGib {}
|
|||
Class UTMaleArm : UTGib {}
|
||||
Class UTMaleFoot : UTGib {}
|
||||
Class UTMaleTorso : UTGib {}
|
||||
Class UTBossArm : UTGib {}
|
||||
Class UTBossFoot : UTGib {}
|
||||
Class UTBossTorso : UTGib {}
|
||||
Class UTHeart : UTGib
|
||||
{
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
UGIB ABCDEF 2;
|
||||
UGIB ABCDEF 1
|
||||
{
|
||||
roll += rollvel;
|
||||
angle += anglevel;
|
||||
pitch += pitchvel;
|
||||
}
|
||||
Loop;
|
||||
Bounce:
|
||||
UGIB A 0;
|
||||
Goto Spawn;
|
||||
Death:
|
||||
UGIB ABCDEFABCDEFABCDEF 2;
|
||||
UGIB ABCDEFABCDEF 4;
|
||||
UGIB ABCDEF 8;
|
||||
UGIB A -1;
|
||||
Stop;
|
||||
UGIB A 1 A_SetTics(Random[Blod](12,18)*15);
|
||||
UGIB A 1 A_FadeOut(0.05);
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
Class UTLiver : UTGib {}
|
||||
Class UTStomach : UTGib {}
|
||||
Class UTHeadFemale : UTGib {}
|
||||
Class UTHeadMale : UTGib {}
|
||||
Class UTHead : UTGib
|
||||
{
|
||||
PlayerInfo headowner;
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
UTMainHandler.DoFlash(self,Color(128,255,0,0),150);
|
||||
UTMainHandler.DoFlash(self,Color(96,255,0,0),0);
|
||||
}
|
||||
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( headowner && headowner.mo && (headowner.mo.Health > 0) && (headowner.Camera == self) )
|
||||
{
|
||||
headowner.Camera = headowner.mo;
|
||||
headowner = null;
|
||||
}
|
||||
}
|
||||
|
||||
override void OnDestroy()
|
||||
{
|
||||
if ( headowner && (headowner.Camera == self) && headowner.mo )
|
||||
{
|
||||
headowner.Camera = headowner.mo;
|
||||
headowner = null;
|
||||
}
|
||||
Super.OnDestroy();
|
||||
}
|
||||
States
|
||||
{
|
||||
Death:
|
||||
UGIB A 1 A_SetTics(Random[Blod](12,18)*15);
|
||||
UGIB A 0 A_JumpIf(headowner,"Death");
|
||||
UGIB A 1 A_FadeOut(0.05);
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
Class UTHeadFemale : UTHead {}
|
||||
Class UTHeadMale : UTHead {}
|
||||
Class UTHeadBoss : UTHead {}
|
||||
|
|
|
|||
|
|
@ -716,11 +716,11 @@ Class UTHud : BaseStatusBar
|
|||
Inventory itm;
|
||||
for ( itm=CPlayer.mo.InvFirst; (itm && (i < 5)); itm=itm.NextInv() )
|
||||
{
|
||||
CurX = BaseX+2*hudsize*HScale;
|
||||
CurY = BaseY+2*hudsize*HScale;
|
||||
// if item doesn't fit 60x60, scale
|
||||
// scale to fit
|
||||
Vector2 scl = TexMan.GetScaledSize(itm.Icon);
|
||||
double mscl = max(scl.x,scl.y)/60.;
|
||||
double mscl = 56./max(scl.x,scl.y);
|
||||
CurX = BaseX+(4+(56.-scl.x*mscl)/2.)*hudsize*HScale;
|
||||
CurY = BaseY+4*hudsize*HScale;
|
||||
UTDrawTintedTex(itm.Icon,hudsize*mscl);
|
||||
// amount if >1
|
||||
if ( itm.Amount > 1 )
|
||||
|
|
@ -763,10 +763,11 @@ Class UTHud : BaseStatusBar
|
|||
UTDrawTintedTex(ItemBox,hudsize);
|
||||
if ( artiflashtick )
|
||||
{
|
||||
// scale to fit
|
||||
Vector2 scl = TexMan.GetScaledSize(LastItem);
|
||||
double mscl = max(scl.x,scl.y)/60.;
|
||||
CurX += 2*hudsize*HScale;
|
||||
CurY += 2*hudsize*HScale;
|
||||
double mscl = 56./max(scl.x,scl.y);
|
||||
CurX += (4+(56.-scl.x*mscl)/2.)*hudsize*HScale;
|
||||
CurY += 4*hudsize*HScale;
|
||||
UTDrawTintedTex(LastItem,hudsize*mscl);
|
||||
if ( LastAmount <= 1 ) return;
|
||||
CurX = 32*hudsize*HScale;
|
||||
|
|
@ -776,11 +777,11 @@ Class UTHud : BaseStatusBar
|
|||
return;
|
||||
}
|
||||
if ( !CPlayer.mo.InvSel ) return;
|
||||
// if item doesn't fit 60x60, scale
|
||||
// scale to fit
|
||||
Vector2 scl = TexMan.GetScaledSize(CPlayer.mo.InvSel.Icon);
|
||||
double mscl = max(scl.x,scl.y)/60.;
|
||||
CurX += 2*hudsize*HScale;
|
||||
CurY += 2*hudsize*HScale;
|
||||
double mscl = 56./max(scl.x,scl.y);
|
||||
CurX += (4+(56.-scl.x*mscl)/2.)*hudsize*HScale;
|
||||
CurY += 4*hudsize*HScale;
|
||||
UTDrawTintedTex(CPlayer.mo.InvSel.Icon,hudsize*mscl);
|
||||
// amount if >1
|
||||
if ( CPlayer.mo.InvSel.Amount <= 1 ) return;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ Class ShockWave : Actor
|
|||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -94,6 +95,7 @@ Class WarheadSubExplosion : Actor
|
|||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+FORCEXYBILLBOARD;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -119,6 +121,7 @@ Class WarheadHitbox : Actor
|
|||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOBLOOD;
|
||||
+NOTELEPORT;
|
||||
}
|
||||
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
|
||||
{
|
||||
|
|
@ -207,6 +210,7 @@ Class WarheadTrail : Actor
|
|||
+FORCEXYBILLBOARD;
|
||||
+ROLLSPRITE;
|
||||
+ROLLCENTER;
|
||||
+NOTELEPORT;
|
||||
Scale 0.2;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue