1.0.1 release:
- Prevent the hacky player select See state from being used ingame. - Increase armor bonus amount per pickup to 5, like in Doomreal. - Add BasicArmor amount to HUD, for compatibility in case it's ever used. - Replacements now respect IsFinal. - Fix alignment of custom usable item icons in HUD. - Revert to vanilla physics if player is frozen/totallyfrozen. - Correct water level checks for swimming physics. - Allow crouch-jumping and crouching while swimming. This goes against vanilla behaviour but it would break a lot of maps otherwise.
This commit is contained in:
parent
1dcaef4c9d
commit
d45dd3f5bb
4 changed files with 37 additions and 30 deletions
|
|
@ -61,7 +61,7 @@ This mod requires GZDoom 4.2.3 or later.
|
|||
|
||||
## In progress
|
||||
|
||||
- N/A, this is the 1.0 release
|
||||
- N/A, this is the 1.0.1 release
|
||||
|
||||
## Planned
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ Class UTArmorBonus : UTArmor
|
|||
{
|
||||
Tag "$T_ARMORBONUS";
|
||||
+COUNTITEM;
|
||||
Inventory.Amount 1;
|
||||
Inventory.Amount 5;
|
||||
Inventory.MaxAmount 50;
|
||||
Inventory.InterHubAmount 50;
|
||||
UTArmor.ArmorAbsorption 25;
|
||||
|
|
|
|||
|
|
@ -238,6 +238,8 @@ Class UTPlayer : DoomPlayer
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( InStateSequence(CurState,FindState("See",true)) )
|
||||
SetStateLabel("See2");
|
||||
if ( !player || (player.mo != self) ) return;
|
||||
if ( flak_utmovement )
|
||||
{
|
||||
|
|
@ -386,7 +388,7 @@ Class UTPlayer : DoomPlayer
|
|||
|
||||
override void MovePlayer()
|
||||
{
|
||||
if ( !flak_utmovement || !player || (player.mo != self) )
|
||||
if ( !flak_utmovement || !player || (player.mo != self) || (player.cheats&(CF_FROZEN|CF_TOTALLYFROZEN)) )
|
||||
{
|
||||
Super.MovePlayer();
|
||||
return;
|
||||
|
|
@ -457,7 +459,7 @@ Class UTPlayer : DoomPlayer
|
|||
}
|
||||
}
|
||||
last_sm = sm;
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 3) )
|
||||
{
|
||||
if ( flak_tapdodge && (dodge.length() > 0) && !tempslide )
|
||||
{
|
||||
|
|
@ -521,7 +523,7 @@ Class UTPlayer : DoomPlayer
|
|||
else player.vel = vel.xy;
|
||||
}
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
else if ( !bNoGravity && (waterlevel < 1) )
|
||||
{
|
||||
// air acceleration when falling
|
||||
float maxaccel = accelrate/TICRATE;
|
||||
|
|
@ -639,7 +641,9 @@ Class UTPlayer : DoomPlayer
|
|||
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
|
||||
// in UT you can't crouch unless you're on the ground
|
||||
// however for the sake of compatibility with a whole lot of maps, crouch-jumping will be a thing here
|
||||
if ( CanCrouch() && (player.health > 0) && level.IsCrouchingAllowed() )
|
||||
{
|
||||
if ( !totallyfrozen )
|
||||
{
|
||||
|
|
@ -694,10 +698,10 @@ Class UTPlayer : DoomPlayer
|
|||
override void DeathThink()
|
||||
{
|
||||
Super.DeathThink();
|
||||
if ( !flak_utmovement ) return;
|
||||
if ( !flak_utmovement || !player || (player.mo != self) || (player.cheats&(CF_FROZEN|CF_TOTALLYFROZEN)) ) return;
|
||||
// unreal physics while dead
|
||||
double friction = FrictionToUnreal();
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 3) )
|
||||
{
|
||||
// Hook in Unreal physics
|
||||
Vector2 dir = (0,0);
|
||||
|
|
@ -713,7 +717,7 @@ Class UTPlayer : DoomPlayer
|
|||
if ( vel.xy.length() > maxvel ) vel.xy = vel.xy.unit()*maxvel;
|
||||
player.vel *= 0;
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
else if ( !bNoGravity && (waterlevel < 1) )
|
||||
{
|
||||
// air acceleration when falling
|
||||
Vector2 dir = (0,0);
|
||||
|
|
@ -820,13 +824,7 @@ Class UTPlayer : DoomPlayer
|
|||
override void PlayIdle()
|
||||
{
|
||||
if ( player.Health <= 0 ) return;
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) )
|
||||
{
|
||||
// Crouching
|
||||
if ( !InStateSequence(CurState,FindState("SpawnCrouch")) )
|
||||
SetStateLabel("SpawnCrouch");
|
||||
}
|
||||
else if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 3) )
|
||||
{
|
||||
// Ground
|
||||
if ( (player && (player.mo == self)) && player.cmd.yaw )
|
||||
|
|
@ -841,6 +839,12 @@ Class UTPlayer : DoomPlayer
|
|||
|| InStateSequence(CurState,FindState("Spawn")+1) )
|
||||
SetStateLabel("Turn");
|
||||
}
|
||||
else if ( player.crouchdir == -1 )
|
||||
{
|
||||
// Crouching
|
||||
if ( !InStateSequence(CurState,FindState("SpawnCrouch")) )
|
||||
SetStateLabel("SpawnCrouch");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( InStateSequence(CurState,FindState("See2"))
|
||||
|
|
@ -853,7 +857,7 @@ Class UTPlayer : DoomPlayer
|
|||
SetStateLabel("Spawn");
|
||||
}
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
else if ( !bNoGravity && (waterlevel < 1) )
|
||||
{
|
||||
// Falling
|
||||
if ( InStateSequence(CurState,FindState("See2"))
|
||||
|
|
@ -884,16 +888,16 @@ Class UTPlayer : DoomPlayer
|
|||
override void PlayRunning()
|
||||
{
|
||||
if ( player.Health <= 0 ) return;
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) )
|
||||
{
|
||||
// Crouching
|
||||
if ( !InStateSequence(CurState,FindState("SeeCrouch")) )
|
||||
SetStateLabel("SeeCrouch");
|
||||
}
|
||||
else if ( !bNoGravity && player.onground && (waterlevel < 2) )
|
||||
if ( !bNoGravity && player.onground && (waterlevel < 3) )
|
||||
{
|
||||
// Ground
|
||||
if ( InStateSequence(CurState,FindState("Spawn"))
|
||||
if ( player.crouchdir == -1 )
|
||||
{
|
||||
// Crouching
|
||||
if ( !InStateSequence(CurState,FindState("SeeCrouch")) )
|
||||
SetStateLabel("SeeCrouch");
|
||||
}
|
||||
else if ( InStateSequence(CurState,FindState("Spawn"))
|
||||
|| InStateSequence(CurState,FindState("SpawnAir"))
|
||||
|| InStateSequence(CurState,FindState("SpawnSwim"))
|
||||
|| InStateSequence(CurState,FindState("SpawnCrouch"))
|
||||
|
|
@ -903,7 +907,7 @@ Class UTPlayer : DoomPlayer
|
|||
|| InStateSequence(CurState,FindState("Turn")) )
|
||||
SetStateLabel("See2");
|
||||
}
|
||||
else if ( !bNoGravity && (waterlevel < 2) )
|
||||
else if ( !bNoGravity && (waterlevel < 1) )
|
||||
{
|
||||
// Falling
|
||||
if ( InStateSequence(CurState,FindState("Spawn"))
|
||||
|
|
@ -1268,7 +1272,7 @@ Class UTUnderSound : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( !target )
|
||||
if ( !target || !target.player || (target.waterlevel < 3) )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
|
|
@ -2838,6 +2842,7 @@ Class UTMainHandler : EventHandler
|
|||
|
||||
override void CheckReplacement( ReplaceEvent e )
|
||||
{
|
||||
if ( e.IsFinal ) return;
|
||||
if ( (e.Replacee == 'Chainsaw') || (e.Replacee == 'Gauntlets') )
|
||||
{
|
||||
if ( Random[Replacements](0,1) ) e.Replacement = 'UTChainsaw';
|
||||
|
|
|
|||
|
|
@ -497,6 +497,8 @@ Class UTHud : BaseStatusBar
|
|||
if ( a ) allarmor += a.amount;
|
||||
if ( t ) allarmor += t.amount;
|
||||
if ( s ) allarmor += s.amount;
|
||||
let ba = CPlayer.mo.FindInventory("BasicArmor");
|
||||
if ( ba ) allarmor += ba.amount;
|
||||
CurX += 8*hudsize*HScale;
|
||||
CurY += 14*hudsize*HScale;
|
||||
if ( !showstatus && b ) DrawColor = GoldColor;
|
||||
|
|
@ -748,7 +750,7 @@ Class UTHud : BaseStatusBar
|
|||
Vector2 scl = TexMan.GetScaledSize(itm.Icon);
|
||||
double mscl = 56./max(scl.x,scl.y);
|
||||
CurX = BaseX+(4+(56.-scl.x*mscl)/2.)*hudsize*HScale;
|
||||
CurY = BaseY+4*hudsize*HScale;
|
||||
CurY = BaseY+(4+(56.-scl.y*mscl)/2.)*hudsize*HScale;
|
||||
UTDrawTintedTex(itm.Icon,hudsize*mscl);
|
||||
// amount if >1
|
||||
if ( itm.Amount > 1 )
|
||||
|
|
@ -795,7 +797,7 @@ Class UTHud : BaseStatusBar
|
|||
Vector2 scl = TexMan.GetScaledSize(LastItem);
|
||||
double mscl = 56./max(scl.x,scl.y);
|
||||
CurX += (4+(56.-scl.x*mscl)/2.)*hudsize*HScale;
|
||||
CurY += 4*hudsize*HScale;
|
||||
CurY += (4+(56.-scl.y*mscl)/2.)*hudsize*HScale;
|
||||
UTDrawTintedTex(LastItem,hudsize*mscl);
|
||||
if ( LastAmount <= 1 ) return;
|
||||
CurX = 32*hudsize*HScale;
|
||||
|
|
@ -809,7 +811,7 @@ Class UTHud : BaseStatusBar
|
|||
Vector2 scl = TexMan.GetScaledSize(CPlayer.mo.InvSel.Icon);
|
||||
double mscl = 56./max(scl.x,scl.y);
|
||||
CurX += (4+(56.-scl.x*mscl)/2.)*hudsize*HScale;
|
||||
CurY += 4*hudsize*HScale;
|
||||
CurY += (4+(56.-scl.y*mscl)/2.)*hudsize*HScale;
|
||||
UTDrawTintedTex(CPlayer.mo.InvSel.Icon,hudsize*mscl);
|
||||
// amount if >1
|
||||
if ( CPlayer.mo.InvSel.Amount <= 1 ) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue