Changed double tap dodge behavior when jumping is disallowed.

Added NOTELEPORT flag to many actors that might need it.
This commit is contained in:
Marisa the Magician 2019-07-20 14:05:59 +02:00
commit 640231d920
13 changed files with 52 additions and 6 deletions

View file

@ -91,6 +91,7 @@ Class BioHitbox : Actor
+NOCLIP;
+DONTSPLASH;
+NOBLOOD;
+NOTELEPORT;
}
override void PostBeginPlay()
{

View file

@ -7,6 +7,7 @@ Class SawImpact : Actor
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
+NOTELEPORT;
}
override void PostBeginPlay()
{

View file

@ -67,6 +67,7 @@ Class UTRocketTrail : Actor
+NOGRAVITY;
+DONTSPLASH;
+FORCEXYBILLBOARD;
+NOTELEPORT;
Scale 0.7;
}
override void PostBeginPlay()

View file

@ -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";

View file

@ -74,6 +74,7 @@ Class ChunkTrail : Actor
+NOGRAVITY;
+DONTSPLASH;
+FORCEXYBILLBOARD;
+NOTELEPORT;
Scale 0.2;
}
override void PostBeginPlay()
@ -364,6 +365,7 @@ Class SlugSmoke : Actor
+NOBLOCKMAP;
+NOGRAVITY;
+DONTSPLASH;
+NOTELEPORT;
}
override void PostBeginPlay()
{

View file

@ -7,6 +7,7 @@ Class HammerImpact : Actor
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
+NOTELEPORT;
}
override void PostBeginPlay()
{

View file

@ -43,6 +43,7 @@ Class MinigunTracer : Actor
+NOGRAVITY;
+DONTSPLASH;
+INTERPOLATEANGLES;
+NOTELEPORT;
}
override void Tick()
{

View file

@ -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
@ -490,6 +492,7 @@ Class PulseBolt : Actor
+NOCLIP;
+DONTSPLASH;
+INTERPOLATEANGLES;
+NOTELEPORT;
}
States
{

View file

@ -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()
{
@ -510,6 +515,7 @@ Class SuperShockBeam : Actor
+FORCERADIUSDMG;
+EXTREMEDEATH;
+NODAMAGETHRUST;
+NOTELEPORT;
}
override void PostBeginPlay()
{
@ -812,6 +818,7 @@ Class ShockHitbox : Actor
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
+NOTELEPORT;
}
override void Tick()
{

View file

@ -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;

View file

@ -11,6 +11,8 @@ Class UTPlayer : DoomPlayer
int last_tap_fm, last_tap_sm;
int last_jump_held;
int tempslide;
int dolltype, voicetype;
Property DollType : dolltype;
@ -240,6 +242,11 @@ Class UTPlayer : DoomPlayer
}
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;
@ -321,11 +328,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 +355,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 +386,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) )
@ -1348,6 +1366,7 @@ Class ShredCorpseHitbox : Actor
-SOLID;
+DONTSPLASH;
+SHOOTABLE;
+NOTELEPORT;
Health int.max;
}
override void PostBeginPlay()

View file

@ -268,6 +268,7 @@ Class UTGibber : Actor
{
+NOCLIP;
+NOGRAVITY;
+NOTELEPORT;
Radius 32;
Height 16;
}
@ -301,6 +302,7 @@ Class UTGib : Actor
+MISSILE;
+THRUACTORS;
+USEBOUNCESTATE;
+NOTELEPORT;
}
override void PostBeginPlay()
{

View file

@ -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;
}