Add separate player classes for separate sounds and whatnot.
Fully implement UT movement for all modes (walk, swim, fly).
|
|
@ -3,7 +3,7 @@
|
|||
What began as a test for importing UT vertex meshes has turned into an actual
|
||||
full UT weapon and item mod.
|
||||
|
||||
This mod requires a recent GZDoom devbuild (g3.6pre-31-gd965c9aa7 or later).
|
||||
This mod requires GZDoom 3.7.0 or later.
|
||||
|
||||
## Currently implemented
|
||||
|
||||
|
|
@ -48,6 +48,7 @@ This mod requires a recent GZDoom devbuild (g3.6pre-31-gd965c9aa7 or later).
|
|||
- Visual recoil affecting aim (improved A_Swing from Soundless Mound, can be
|
||||
toggled)
|
||||
- UT-like weapon dropping style
|
||||
- UT player classes (sound only, no models yet)
|
||||
|
||||
## In progress
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ user float flak_hudsize = 1.0; // 0.2 <-> 1.0 in steps of 0.2 (default 1.0)
|
|||
user float flak_weaponsize = 0.8; // 0.2 <-> 1.0 in steps of 0.2 (default 0.8)
|
||||
user float flak_statussize = 1.0; // 0.5 <-> 1.5 in steps of 0.1 (default 1.0)
|
||||
user bool flak_footsteps = true; // players make footstep sounds
|
||||
user bool flak_bossfootsteps = false; // boss players play mechanic footsteps (unlike in vanilla UT)
|
||||
server bool flak_translocator = false; // translocator is enabled (hello, sequence breaking)
|
||||
server bool flak_transloc2k4 = false; // translocator has recharging ammo like in UT2k4 and up
|
||||
user bool flak_noswitchdeemer = true; // don't switch to redeemer when out of ammo
|
||||
|
|
@ -34,4 +35,4 @@ server bool flak_swingers = true; // weapon recoil that affects player view
|
|||
server float flak_swingerstrength = 0.5; // strength of visual recoil
|
||||
server bool flak_radboots = true; // jump boots protect against damaging floors (this is to account for the lack of a radsuit)
|
||||
server bool flak_blood = true; // [WIP] use doom tournament blood (disable if using another gore mod)
|
||||
server bool flak_gibs = false; // [WIP/UNSTABLE] use doom tournament gibbing (disable if using another gore mod)
|
||||
server bool flak_gibs = false; // [WIP/UNSTABLE] use doom tournament gibbing (disable if using another gore mod)
|
||||
BIN
graphics/Blake.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
graphics/Brock.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
graphics/Ivana.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
graphics/Lauren.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
graphics/Xan.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
graphics/hud/Boss.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
graphics/hud/BossArm.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
graphics/hud/BossBlt.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
graphics/hud/BossBot.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
graphics/hud/BossPad.png
Normal file
|
After Width: | Height: | Size: 879 B |
|
|
@ -60,6 +60,7 @@ OptionMenu "UTOptionMenu"
|
|||
StaticText " "
|
||||
StaticText "Misc Options", "Gold"
|
||||
Option "UT Footsteps", "flak_footsteps", "YesNo"
|
||||
Option "Use Boss Class Footsteps", "flak_bossfootsteps", "YesNo"
|
||||
Option "UT Blood", "flak_blood", "YesNo"
|
||||
Option "[WIP] UT Gibbing", "flak_gibs", "YesNo"
|
||||
Option "[WIP] Corpses Take Damage", "flak_corpsedamage", "YesNo"
|
||||
|
|
|
|||
150
sndinfo.txt
|
|
@ -16,8 +16,11 @@ ut/malepain3 injurm04
|
|||
ut/malepain4 injurh5
|
||||
ut/land land1
|
||||
ut/malegrunt land10
|
||||
ut/malegrunt1 mland3
|
||||
ut/malejump jump1
|
||||
ut/malejump1 tmjump3
|
||||
ut/malehump land01
|
||||
ut/malehump1 mland3
|
||||
ut/malesurf gasp02
|
||||
ut/malegasp hgasp1
|
||||
ut/maledrowned1 uwinjr41
|
||||
|
|
@ -25,27 +28,54 @@ ut/drowned uwinjr42
|
|||
$random ut/maledrowned { ut/maledrowned1 ut/drowned }
|
||||
ut/maledrowning drownm02
|
||||
|
||||
$playeralias player male *death ut/maledie
|
||||
$playeralias player male *xdeath ut/malexdie
|
||||
$playeralias player male *gibbed ut/gibp
|
||||
$playeralias player male *pain100 ut/malepain1
|
||||
$playeralias player male *pain75 ut/malepain2
|
||||
$playeralias player male *pain50 ut/malepain3
|
||||
$playeralias player male *pain25 ut/malepain4
|
||||
$playeralias player male *grunt ut/malegrunt
|
||||
$playeralias player male *land DSEMPTY
|
||||
$playeralias player male *uland ut/land
|
||||
$playeralias player male *jump ut/malejump
|
||||
$playeralias player male *usefail ut/malehump
|
||||
$playeralias player male *surface ut/malesurface
|
||||
$playeralias player male *gasp ut/malegasp
|
||||
// hotfix for a doom glitch
|
||||
$playeralias player male *land DSEMPTY
|
||||
$playeralias player female *land DSEMPTY
|
||||
$playeralias player other *land DSEMPTY
|
||||
|
||||
$playeralias player male *death-drowning ut/maledrowned
|
||||
$playeralias player male *xdeath-drowning ut/maledrowned
|
||||
$playeralias player male *pain100-drowning ut/maledrowning
|
||||
$playeralias player male *pain75-drowning ut/maledrowning
|
||||
$playeralias player male *pain50-drowning ut/maledrowning
|
||||
$playeralias player male *pain25-drowning ut/maledrowning
|
||||
$playeralias tmale1 neutral *death ut/maledie
|
||||
$playeralias tmale1 neutral *xdeath ut/malexdie
|
||||
$playeralias tmale1 neutral *gibbed ut/gibp
|
||||
$playeralias tmale1 neutral *pain100 ut/malepain1
|
||||
$playeralias tmale1 neutral *pain75 ut/malepain2
|
||||
$playeralias tmale1 neutral *pain50 ut/malepain3
|
||||
$playeralias tmale1 neutral *pain25 ut/malepain4
|
||||
$playeralias tmale1 neutral *grunt ut/malegrunt
|
||||
$playeralias tmale1 neutral *land DSEMPTY
|
||||
$playeralias tmale1 neutral *uland ut/land1
|
||||
$playeralias tmale1 neutral *jump ut/malejump1
|
||||
$playeralias tmale1 neutral *usefail ut/malehump1
|
||||
$playeralias tmale1 neutral *surface ut/malesurface
|
||||
$playeralias tmale1 neutral *gasp ut/malegasp
|
||||
|
||||
$playeralias tmale1 neutral *death-drowning ut/maledrowned
|
||||
$playeralias tmale1 neutral *xdeath-drowning ut/maledrowned
|
||||
$playeralias tmale1 neutral *pain100-drowning ut/maledrowning
|
||||
$playeralias tmale1 neutral *pain75-drowning ut/maledrowning
|
||||
$playeralias tmale1 neutral *pain50-drowning ut/maledrowning
|
||||
$playeralias tmale1 neutral *pain25-drowning ut/maledrowning
|
||||
|
||||
$playeralias tmale2 neutral *death ut/maledie
|
||||
$playeralias tmale2 neutral *xdeath ut/malexdie
|
||||
$playeralias tmale2 neutral *gibbed ut/gibp
|
||||
$playeralias tmale2 neutral *pain100 ut/malepain1
|
||||
$playeralias tmale2 neutral *pain75 ut/malepain2
|
||||
$playeralias tmale2 neutral *pain50 ut/malepain3
|
||||
$playeralias tmale2 neutral *pain25 ut/malepain4
|
||||
$playeralias tmale2 neutral *grunt ut/malegrunt
|
||||
$playeralias tmale2 neutral *land DSEMPTY
|
||||
$playeralias tmale2 neutral *uland ut/land
|
||||
$playeralias tmale2 neutral *jump ut/malejump
|
||||
$playeralias tmale2 neutral *usefail ut/malehump
|
||||
$playeralias tmale2 neutral *surface ut/malesurface
|
||||
$playeralias tmale2 neutral *gasp ut/malegasp
|
||||
|
||||
$playeralias tmale2 neutral *death-drowning ut/maledrowned
|
||||
$playeralias tmale2 neutral *xdeath-drowning ut/maledrowned
|
||||
$playeralias tmale2 neutral *pain100-drowning ut/maledrowning
|
||||
$playeralias tmale2 neutral *pain75-drowning ut/maledrowning
|
||||
$playeralias tmale2 neutral *pain50-drowning ut/maledrowning
|
||||
$playeralias tmale2 neutral *pain25-drowning ut/maledrowning
|
||||
|
||||
ut/femaledie1 decap01
|
||||
ut/femaledie2 death1d
|
||||
|
|
@ -67,33 +97,73 @@ ut/femaledrowned1 uwhit01
|
|||
$random ut/femaledrowned { ut/femaledroenwd1 ut/drowned }
|
||||
ut/femaledrowning mdrown2f
|
||||
|
||||
$playeralias player female *death ut/femaledie
|
||||
$playeralias player female *xdeath ut/femalexdie
|
||||
$playeralias player female *gibbed ut/gibp
|
||||
$playeralias player female *pain100 ut/femalepain1
|
||||
$playeralias player female *pain75 ut/femalepain2
|
||||
$playeralias player female *pain50 ut/femalepain3
|
||||
$playeralias player female *pain25 ut/femalepain4
|
||||
$playeralias player female *grunt ut/femalegrunt
|
||||
$playeralias player female *land DSEMPTY
|
||||
$playeralias player female *uland ut/land
|
||||
$playeralias player female *jump ut/femalejump
|
||||
$playeralias player female *usefail ut/femalegrunt
|
||||
$playeralias player female *surface ut/femalesurf
|
||||
$playeralias player female *gasp ut/femalegasp
|
||||
$playeralias tfemale neutral *death ut/femaledie
|
||||
$playeralias tfemale neutral *xdeath ut/femalexdie
|
||||
$playeralias tfemale neutral *gibbed ut/gibp
|
||||
$playeralias tfemale neutral *pain100 ut/femalepain1
|
||||
$playeralias tfemale neutral *pain75 ut/femalepain2
|
||||
$playeralias tfemale neutral *pain50 ut/femalepain3
|
||||
$playeralias tfemale neutral *pain25 ut/femalepain4
|
||||
$playeralias tfemale neutral *grunt ut/femalegrunt
|
||||
$playeralias tfemale neutral *land DSEMPTY
|
||||
$playeralias tfemale neutral *uland ut/land
|
||||
$playeralias tfemale neutral *jump ut/femalejump
|
||||
$playeralias tfemale neutral *usefail ut/femalegrunt
|
||||
$playeralias tfemale neutral *surface ut/femalesurf
|
||||
$playeralias tfemale neutral *gasp ut/femalegasp
|
||||
|
||||
$playeralias player female *death-drowning ut/femaledrowned
|
||||
$playeralias player female *xdeath-drowning ut/femaledrowned
|
||||
$playeralias player female *pain100-drowning ut/femaledrowning
|
||||
$playeralias player female *pain75-drowning ut/femaledrowning
|
||||
$playeralias player female *pain50-drowning ut/femaledrowning
|
||||
$playeralias player female *pain25-drowning ut/femaledrowning
|
||||
$playeralias tfemale neutral *death-drowning ut/femaledrowned
|
||||
$playeralias tfemale neutral *xdeath-drowning ut/femaledrowned
|
||||
$playeralias tfemale neutral *pain100-drowning ut/femaledrowning
|
||||
$playeralias tfemale neutral *pain75-drowning ut/femaledrowning
|
||||
$playeralias tfemale neutral *pain50-drowning ut/femaledrowning
|
||||
$playeralias tfemale neutral *pain25-drowning ut/femaledrowning
|
||||
|
||||
ut/bossdie1 bdeath1
|
||||
ut/bossdie2 bdeath2
|
||||
ut/bossdie3 bdeath3
|
||||
$random ut/bossdie { ut/bossdie1 ut/bossdie2 ut/bossdie3 }
|
||||
ut/bossxdie1 bdeath4
|
||||
ut/bossxdie2 bdeath3
|
||||
$random ut/bossxdie { ut/bossxdie1 ut/bossxdie2 }
|
||||
ut/gibpboss bnewgib
|
||||
ut/bosspain1 binjur1
|
||||
ut/bosspain2 binjur2
|
||||
ut/bosspain3 binjur3
|
||||
ut/bosspain4 binjur4
|
||||
ut/bossgrunt bland01
|
||||
ut/bossjump bjump1
|
||||
ut/bosshump bjump1
|
||||
|
||||
$playeralias tboss neutral *death ut/bossdie
|
||||
$playeralias tboss neutral *xdeath ut/bossxdie
|
||||
$playeralias tboss neutral *gibbed ut/gibpboss
|
||||
$playeralias tboss neutral *pain100 ut/bosspain1
|
||||
$playeralias tboss neutral *pain75 ut/bosspain2
|
||||
$playeralias tboss neutral *pain50 ut/bosspain3
|
||||
$playeralias tboss neutral *pain25 ut/bosspain4
|
||||
$playeralias tboss neutral *grunt ut/bossgrunt
|
||||
$playeralias tboss neutral *land DSEMPTY
|
||||
$playeralias tboss neutral *uland ut/land
|
||||
$playeralias tboss neutral *jump ut/bossjump
|
||||
$playeralias tboss neutral *usefail ut/bosshump
|
||||
$playeralias tboss neutral *surface ut/malesurf
|
||||
$playeralias tboss neutral *gasp ut/malegasp
|
||||
|
||||
$playeralias tboss neutral *death-drowning ut/maledrowned
|
||||
$playeralias tboss neutral *xdeath-drowning ut/maledrowned
|
||||
$playeralias tboss neutral *pain100-drowning ut/maledrowning
|
||||
$playeralias tboss neutral *pain75-drowning ut/maledrowning
|
||||
$playeralias tboss neutral *pain50-drowning ut/maledrowning
|
||||
$playeralias tboss neutral *pain25-drowning ut/maledrowning
|
||||
|
||||
ut/playerfootstep1 stone02
|
||||
ut/playerfootstep2 stone04
|
||||
ut/playerfootstep3 stone05
|
||||
$random ut/playerfootstep { ut/playerfootstep1 ut/playerfootstep2 ut/playerfootstep3 }
|
||||
|
||||
ut/bossfootstep bfootstep
|
||||
|
||||
ut/playerfootstepwet lsplash
|
||||
ut/wetsplash dsplash
|
||||
|
||||
|
|
|
|||
BIN
sounds/BFootstep.ogg
Normal file
BIN
sounds/MLand3.ogg
Normal file
BIN
sounds/TMJump3.ogg
Normal file
|
|
@ -1,7 +1,7 @@
|
|||
GameInfo
|
||||
{
|
||||
AddEventHandlers = "RedeemerHUDHandler", "UTMainHandler"
|
||||
PlayerClasses = "UTPlayer"
|
||||
PlayerClasses = "UTPlayerTMale1", "UTPlayerTMale2", "UTPlayerTFemale1", "UTPlayerTFemale2", "UTPlayerTBoss"
|
||||
StatusBarClass = "UTHud"
|
||||
BackpackType = "UTBackpack"
|
||||
BorderFlat = "TEMPBG"
|
||||
|
|
|
|||
|
|
@ -11,14 +11,29 @@ Class UTPlayer : DoomPlayer
|
|||
int last_tap_fm, last_tap_sm;
|
||||
int last_jump_held;
|
||||
|
||||
int dolltype;
|
||||
|
||||
Property DollType : dolltype;
|
||||
|
||||
enum EDollType
|
||||
{
|
||||
DOLL_Male,
|
||||
DOLL_Female,
|
||||
DOLL_Boss
|
||||
};
|
||||
|
||||
const groundspeed = 400.;
|
||||
const swimspeed = 200.;
|
||||
const baseaccelrate = 2048.;
|
||||
const walkfactor = 0.3;
|
||||
const utaircontrol = 0.35;
|
||||
const swimspeed_doomish = 400.;
|
||||
const groundspeed_doomish = 600.;
|
||||
const terminalvelocity = 2500.;
|
||||
const dodgez = 210.;
|
||||
const utjumpz = 325.;
|
||||
const groundfriction = 8.;
|
||||
const fluidfriction = 1.2;
|
||||
const terminalvelocity = 2500.;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -28,6 +43,12 @@ Class UTPlayer : DoomPlayer
|
|||
Player.DamageScreenColor "FF 00 00";
|
||||
Player.ViewHeight 46;
|
||||
Player.GruntSpeed 20;
|
||||
MaxDropoffHeight 18;
|
||||
MaxStepHeight 18;
|
||||
+NOFRICTION;
|
||||
+NOFRICTIONBOUNCE;
|
||||
+NOMENU;
|
||||
UTPlayer.DollType DOLL_Male;
|
||||
}
|
||||
|
||||
// Have to modify the give cheat to handle UT armor
|
||||
|
|
@ -188,7 +209,7 @@ Class UTPlayer : DoomPlayer
|
|||
if ( !footsteps.GetBool() ) return;
|
||||
double ang = level.time/(20*TICRATE/35.)*360.;
|
||||
bool forcefootstep = false;
|
||||
if ( player.onground && !bNoGravity && !lastground && (waterlevel < 3) )
|
||||
if ( player.onground && !bNoGravity && !lastground && (waterlevel < 2) )
|
||||
{
|
||||
player.jumptics = 0;
|
||||
if ( lastvelz < -8 )
|
||||
|
|
@ -199,16 +220,17 @@ Class UTPlayer : DoomPlayer
|
|||
}
|
||||
else forcefootstep = true;
|
||||
}
|
||||
if ( forcefootstep || ((abs(sin(ang)) >= 1.0) && player.onground && lastground && (player.jumptics == 0) && (player.cmd.forwardmove || player.cmd.sidemove) && (waterlevel < 3)) )
|
||||
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;
|
||||
if ( forcefootstep ) vol = clamp(-lastvelz*0.05,0.01,1.0);
|
||||
if ( (waterlevel > 0) || GetFloorTerrain().IsLiquid && !bOnMobj ) A_PlaySound("ut/playerfootstepwet",CHAN_5,vol);
|
||||
else A_PlaySound("ut/playerfootstep",CHAN_5,vol);
|
||||
else PlayFootstep(vol);
|
||||
}
|
||||
lastground = player.onground;
|
||||
lastvelz = prevvelz;
|
||||
prevvelz = vel.z;
|
||||
// TODO exit/entry sounds for water
|
||||
}
|
||||
|
||||
double FrictionToUnreal()
|
||||
|
|
@ -235,7 +257,7 @@ Class UTPlayer : DoomPlayer
|
|||
else Angle += cmd.yaw*(360./65536.);
|
||||
player.onground = (pos.z <= floorz) || bOnMobj || bMBFBouncer || (player.cheats & CF_NOCLIP2);
|
||||
if ( player.onground ) lastgroundtic = gametic;
|
||||
if ( !player.onground && !bNoGravity && (waterlevel < 3) && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) )
|
||||
if ( !player.onground && !bNoGravity && (waterlevel < 2) && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) && (vel.z < 0) )
|
||||
{
|
||||
SetOrigin(Vec2OffsetZ(0,0,floorz),true);
|
||||
player.onground = true;
|
||||
|
|
@ -277,7 +299,7 @@ Class UTPlayer : DoomPlayer
|
|||
}
|
||||
}
|
||||
last_sm = sm;
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 3) )
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
{
|
||||
if ( dodge.length() > 0 )
|
||||
{
|
||||
|
|
@ -329,7 +351,7 @@ Class UTPlayer : DoomPlayer
|
|||
player.vel = vel.xy;
|
||||
}
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 3) )
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
{
|
||||
// air acceleration when falling
|
||||
float maxaccel = accelrate/TICRATE;
|
||||
|
|
@ -348,6 +370,7 @@ Class UTPlayer : DoomPlayer
|
|||
double maxvel;
|
||||
if ( flak_doomspeed ) maxvel = (groundspeed_doomish*fs)/TICRATE;
|
||||
else maxvel = (groundspeed*fs)/TICRATE;
|
||||
// TODO attempt to replicate walk on ice velocity increase glitch
|
||||
// if new velocity is higher than ground speed, steer but don't increase it
|
||||
if ( (vel.xy+acceleration/TICRATE).length() > maxvel )
|
||||
{
|
||||
|
|
@ -359,41 +382,70 @@ Class UTPlayer : DoomPlayer
|
|||
player.vel *= 0;
|
||||
player.jumptics = -2;
|
||||
}
|
||||
else if ( bFly || (player.cheats&CF_NOCLIP2) )
|
||||
{
|
||||
// fly cheat has infinite friction (player stops moving when movement keys are released)
|
||||
Vector3 dir = (0,0,0);
|
||||
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
||||
Vector3 x, y;
|
||||
[x, y] = dt_Matrix4.GetAxes(pitch,angle,0);
|
||||
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
||||
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
||||
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
||||
if ( acceleration3.length() <= double.epsilon ) vel *= 0;
|
||||
else
|
||||
{
|
||||
Vector3 acceldir = acceleration3.unit();
|
||||
acceleration3 = acceldir*Min(acceleration3.length(),accelrate/TICRATE);
|
||||
vel = vel-(dir-acceldir)*vel.length();
|
||||
}
|
||||
vel = vel+acceleration3/TICRATE;
|
||||
double maxvel;
|
||||
if ( flak_doomspeed ) maxvel = groundspeed_doomish/TICRATE;
|
||||
else maxvel = groundspeed/TICRATE;
|
||||
maxvel *= fs;
|
||||
if ( vel.length() > maxvel ) vel = vel.unit()*maxvel;
|
||||
player.vel *= 0;
|
||||
player.jumptics = -2;
|
||||
if ( !(player.cheats & CF_PREDICTING) ) PlayIdle();
|
||||
}
|
||||
else
|
||||
{
|
||||
// swimming uses standard physics, otherwise things break
|
||||
double forwardmove, sidemove;
|
||||
double bobfactor;
|
||||
double friction, movefactor;
|
||||
double fm, sm;
|
||||
[friction, movefactor] = GetFriction();
|
||||
bobfactor = (friction<ORIG_FRICTION)?movefactor:ORIG_FRICTION_FACTOR;
|
||||
fm = cmd.forwardmove;
|
||||
sm = cmd.sidemove;
|
||||
[fm, sm] = TweakSpeeds(fm,sm);
|
||||
fm *= Speed/256;
|
||||
sm *= Speed/256;
|
||||
if ( CanCrouch() && (player.crouchfactor != 1) )
|
||||
// swimming is pretty much like ground movement, but with much reduced friction and lower speed
|
||||
friction *= fluidfriction/groundfriction;
|
||||
Vector3 dir = (0,0,0);
|
||||
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
||||
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
|
||||
Vector3 x, y;
|
||||
[x, y] = dt_Matrix4.GetAxes(pitch,angle,0);
|
||||
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
||||
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
||||
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
||||
if ( acceleration3.length() <= double.epsilon )
|
||||
{
|
||||
fm *= player.crouchfactor;
|
||||
sm *= player.crouchfactor;
|
||||
bobfactor *= player.crouchfactor;
|
||||
Vector3 oldvel = vel;
|
||||
vel = vel-(2*dir)*vel.length()*friction/TICRATE;
|
||||
if ( oldvel dot vel < 0.0 ) vel *= 0;
|
||||
}
|
||||
forwardmove = fm*movefactor*(35/TICRATE);
|
||||
sidemove = sm*movefactor*(35/TICRATE);
|
||||
if ( forwardmove )
|
||||
else
|
||||
{
|
||||
Bob(Angle, cmd.forwardmove*bobfactor/256.,true);
|
||||
ForwardThrust(forwardmove,Angle);
|
||||
Vector3 acceldir = acceleration3.unit();
|
||||
acceleration3 = acceldir*Min(acceleration3.length(),accelrate/TICRATE);
|
||||
vel = vel-(dir-acceldir)*vel.length()*friction/TICRATE;
|
||||
}
|
||||
if ( sidemove )
|
||||
vel = vel+acceleration3/TICRATE;
|
||||
double maxvel;
|
||||
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;
|
||||
player.jumptics = -2;
|
||||
if ( !(player.cheats & CF_PREDICTING) )
|
||||
{
|
||||
let a = Angle-90;
|
||||
Bob(a,cmd.sidemove*bobfactor/256.,false);
|
||||
Thrust(sidemove,a);
|
||||
if ( acceleration3.length() <= double.epsilon ) PlayIdle();
|
||||
else PlayRunning();
|
||||
}
|
||||
if ( !(player.cheats&CF_PREDICTING) && ((forwardmove != 0) || (sidemove != 0)) )
|
||||
PlayRunning();
|
||||
}
|
||||
if ( player.cheats & CF_REVERTPLEASE )
|
||||
{
|
||||
|
|
@ -401,6 +453,30 @@ Class UTPlayer : DoomPlayer
|
|||
player.camera = player.mo;
|
||||
}
|
||||
}
|
||||
override void CheckCrouch( bool totallyfrozen )
|
||||
{
|
||||
if ( !flak_utmovement || !player || (player.mo != self) )
|
||||
{
|
||||
Super.CheckCrouch(totallyfrozen);
|
||||
return;
|
||||
}
|
||||
if ( player.cmd.buttons&BT_JUMP ) player.cmd.buttons &= ~BT_CROUCH;
|
||||
if ( CanCrouch() && (player.health > 0) && level.IsCrouchingAllowed() && player.onground ) // in UT you can't crouch unless you're on the ground
|
||||
{
|
||||
if ( !totallyfrozen )
|
||||
{
|
||||
int crouchdir = player.crouching;
|
||||
if ( !crouchdir ) crouchdir = (player.cmd.buttons&BT_CROUCH)?-1:1;
|
||||
else if ( player.cmd.buttons&BT_CROUCH ) player.crouching = 0;
|
||||
if ( (crouchdir == 1) && (player.crouchfactor < 1) && (pos.Z+height < ceilingz) )
|
||||
CrouchMove(1);
|
||||
else if ( (crouchdir == -1) && (player.crouchfactor > 0.5 ))
|
||||
CrouchMove(-1);
|
||||
}
|
||||
}
|
||||
else player.Uncrouch();
|
||||
player.crouchoffset = -(ViewHeight)*(1-player.crouchfactor);
|
||||
}
|
||||
override void CheckJump()
|
||||
{
|
||||
if ( !flak_utmovement || !player || (player.mo != self) )
|
||||
|
|
@ -411,9 +487,7 @@ Class UTPlayer : DoomPlayer
|
|||
if ( player.cmd.buttons&BT_JUMP )
|
||||
{
|
||||
if ( player.crouchoffset ) player.crouching = 1;
|
||||
else if ( waterlevel >= 2 ) Vel.z = 4*Speed;
|
||||
else if ( bNoGravity ) Vel.z = 3.;
|
||||
else if ( level.IsJumpingAllowed() && player.onground && (player.jumpTics == 0) && (last_jump_held < gametic-1) )
|
||||
else if ( level.IsJumpingAllowed() && player.onground && (player.jumpTics == 0) && (last_jump_held < gametic-1) && !bNoGravity && (waterlevel < 2) && !(player.cheats&(CF_FLY|CF_NOCLIP2)) )
|
||||
{
|
||||
double jumpvelz;
|
||||
if ( flak_doomspeed ) jumpvelz = jumpz;
|
||||
|
|
@ -438,6 +512,76 @@ Class UTPlayer : DoomPlayer
|
|||
if ( !player.onground || player.jumptics )
|
||||
last_jump_held = gametic;
|
||||
}
|
||||
|
||||
virtual void PlayFootstep( double vol )
|
||||
{
|
||||
A_PlaySound("ut/playerfootstep",CHAN_5,vol);
|
||||
}
|
||||
}
|
||||
|
||||
// these only exist for sound
|
||||
// female classes have identical sounds, so they use the same soundclass here
|
||||
Class UTPlayerTMale1 : UTPlayer
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tmale1";
|
||||
Player.DisplayName "M Commando";
|
||||
Player.Portrait "Blake";
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerTMale2 : UTPlayer
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tmale2";
|
||||
Player.DisplayName "M Soldier";
|
||||
Player.Portrait "Brock";
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerTFemale1 : UTPlayer
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "F Commando";
|
||||
Player.Portrait "Ivana";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerTFemale2 : UTPlayer
|
||||
{
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "F Soldier";
|
||||
Player.Portrait "Lauren";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
-NOMENU;
|
||||
}
|
||||
}
|
||||
Class UTPlayerTBoss : UTPlayer
|
||||
{
|
||||
transient CVar bossfootsteps;
|
||||
Default
|
||||
{
|
||||
Player.SoundClass "tboss";
|
||||
Player.DisplayName "Boss";
|
||||
Player.Portrait "Xan";
|
||||
UTPlayer.DollType DOLL_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);
|
||||
}
|
||||
}
|
||||
|
||||
Class UTWeapon : Weapon
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Class ViewTracer : LineTracer
|
|||
|
||||
Class UTHud : BaseStatusBar
|
||||
{
|
||||
TextureID AmmoBar, Boxes[4], Keys[5], BigNum[12], Flash, Slots[10], Icons[14], Uses[14], Man[5], Woman[5], WeaponBox, IconTloc2, UseTloc2;
|
||||
TextureID AmmoBar, Boxes[4], Keys[5], BigNum[12], Flash, Slots[10], Icons[14], Uses[14], Man[5], Woman[5], Boss[5], WeaponBox, IconTloc2, UseTloc2;
|
||||
Class<Weapon> IconClasses[14];
|
||||
double HScale;
|
||||
Color tintcolor, bgcolor;
|
||||
|
|
@ -142,6 +142,11 @@ Class UTHud : BaseStatusBar
|
|||
Woman[2] = TexMan.CheckForTexture("WomanPad",TexMan.Type_Any);
|
||||
Woman[3] = TexMan.CheckForTexture("WomanBot",TexMan.Type_Any);
|
||||
Woman[4] = TexMan.CheckForTexture("WomanBlt",TexMan.Type_Any);
|
||||
Boss[0] = TexMan.CheckForTexture("Boss",TexMan.Type_Any);
|
||||
Boss[1] = TexMan.CheckForTexture("BossArm",TexMan.Type_Any);
|
||||
Boss[2] = TexMan.CheckForTexture("BossPad",TexMan.Type_Any);
|
||||
Boss[3] = TexMan.CheckForTexture("BossBot",TexMan.Type_Any);
|
||||
Boss[4] = TexMan.CheckForTexture("BossBlt",TexMan.Type_Any);
|
||||
WeaponBox = TexMan.CheckForTexture("WpSel",TexMan.Type_Any);
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +335,22 @@ Class UTHud : BaseStatusBar
|
|||
d = DamageAmplifier(CPlayer.mo.FindInventory("DamageAmplifier"));
|
||||
j = UTJumpBoots(CPlayer.mo.FindInventory("UTJumpBoots"));
|
||||
if ( d && !d.isBlinking() ) dollcolor = d.BlendColor;
|
||||
if ( CPlayer.GetGender() == 1 )
|
||||
int dolltype = 0;
|
||||
if ( CPlayer.mo is 'UTPlayer' ) dolltype = UTPlayer(CPlayer.mo).DollType;
|
||||
else
|
||||
{
|
||||
// female doll for female, male doll for male/neutral, boss doll for object
|
||||
dolltype = (CPlayer.GetGender()==3)?UTPlayer.DOLL_Boss:(CPlayer.GetGender()==1)?UTPlayer.DOLL_Female:UTPlayer.DOLL_Male;
|
||||
}
|
||||
if ( dolltype == UTPlayer.DOLL_Boss )
|
||||
{
|
||||
UTDrawTintedTex(Boss[0],hudsize*statussize,min(opacity,15),dollcolor);
|
||||
if ( a ) UTDrawTintedTex(Boss[1],hudsize*statussize,int(min(opacity,15)*(a.Amount/double(a.MaxAmount))),dollcolor);
|
||||
if ( t ) UTDrawTintedTex(Boss[2],hudsize*statussize,int(min(opacity,15)*(t.Amount/double(t.MaxAmount))),dollcolor);
|
||||
if ( j ) UTDrawTintedTex(Boss[3],hudsize*statussize,int(min(opacity,15)*(j.Amount/double(j.MaxAmount))),dollcolor);
|
||||
if ( s ) UTDrawTintedTex(Boss[4],hudsize*statussize,int(min(opacity,15)*(s.Amount/double(s.MaxAmount))),GoldColor);
|
||||
}
|
||||
else if ( dolltype == UTPlayer.DOLL_Female )
|
||||
{
|
||||
UTDrawTintedTex(Woman[0],hudsize*statussize,min(opacity,15),dollcolor);
|
||||
if ( a ) UTDrawTintedTex(Woman[1],hudsize*statussize,int(min(opacity,15)*(a.Amount/double(a.MaxAmount))),dollcolor);
|
||||
|
|
|
|||