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; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+NOBLOOD; +NOBLOOD;
+NOTELEPORT;
} }
override void PostBeginPlay() override void PostBeginPlay()
{ {

View file

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

View file

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

View file

@ -47,6 +47,7 @@ Class BulletImpact : Actor
+NOGRAVITY; +NOGRAVITY;
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+NOTELEPORT;
Scale 0.25; Scale 0.25;
} }
override void PostBeginPlay() override void PostBeginPlay()
@ -102,6 +103,7 @@ Class UTCasing : Actor
+THRUACTORS; +THRUACTORS;
+USEBOUNCESTATE; +USEBOUNCESTATE;
+INTERPOLATEANGLES; +INTERPOLATEANGLES;
+NOTELEPORT;
Mass 1; Mass 1;
Gravity 0.35; Gravity 0.35;
BounceType "Hexen"; BounceType "Hexen";

View file

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

View file

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

View file

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

View file

@ -289,6 +289,7 @@ Class PulseBoltCap : Actor
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+NOTELEPORT;
Scale 0.3; Scale 0.3;
} }
States States
@ -327,6 +328,7 @@ Class PulseBoltHit : Actor
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+NOTELEPORT;
Scale 0.3; Scale 0.3;
} }
States States
@ -490,6 +492,7 @@ Class PulseBolt : Actor
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+INTERPOLATEANGLES; +INTERPOLATEANGLES;
+NOTELEPORT;
} }
States States
{ {

View file

@ -68,6 +68,7 @@ Class ShockRifleWave : Actor
+NOBLOCKMAP; +NOBLOCKMAP;
+NOGRAVITY; +NOGRAVITY;
+DONTSPLASH; +DONTSPLASH;
+NOTELEPORT;
} }
override void Tick() override void Tick()
{ {
@ -95,6 +96,7 @@ Class SuperShockRifleWave : Actor
+NOBLOCKMAP; +NOBLOCKMAP;
+NOGRAVITY; +NOGRAVITY;
+DONTSPLASH; +DONTSPLASH;
+NOTELEPORT;
} }
override void Tick() override void Tick()
{ {
@ -123,6 +125,7 @@ Class ShockBeamRing : Actor
+NOBLOCKMAP; +NOBLOCKMAP;
+NOGRAVITY; +NOGRAVITY;
+DONTSPLASH; +DONTSPLASH;
+NOTELEPORT;
} }
override void Tick() override void Tick()
{ {
@ -150,6 +153,7 @@ Class SuperShockBeamRing : Actor
+NOBLOCKMAP; +NOBLOCKMAP;
+NOGRAVITY; +NOGRAVITY;
+DONTSPLASH; +DONTSPLASH;
+NOTELEPORT;
} }
override void Tick() override void Tick()
{ {
@ -283,6 +287,7 @@ Class ShockBeam : Actor
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+FORCERADIUSDMG; +FORCERADIUSDMG;
+NODAMAGETHRUST; +NODAMAGETHRUST;
+NOTELEPORT;
} }
override void PostBeginPlay() override void PostBeginPlay()
{ {
@ -510,6 +515,7 @@ Class SuperShockBeam : Actor
+FORCERADIUSDMG; +FORCERADIUSDMG;
+EXTREMEDEATH; +EXTREMEDEATH;
+NODAMAGETHRUST; +NODAMAGETHRUST;
+NOTELEPORT;
} }
override void PostBeginPlay() override void PostBeginPlay()
{ {
@ -812,6 +818,7 @@ Class ShockHitbox : Actor
+NOGRAVITY; +NOGRAVITY;
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+NOTELEPORT;
} }
override void Tick() override void Tick()
{ {

View file

@ -9,6 +9,7 @@ Class ModuleHitbox : Actor
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+NOBLOOD; +NOBLOOD;
+NOTELEPORT;
} }
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle ) override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
{ {
@ -100,6 +101,7 @@ Class TranslocatorGlow : Actor
+NOGRAVITY; +NOGRAVITY;
+DONTSPLASH; +DONTSPLASH;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+NOTELEPORT;
RenderStyle "AddShaded"; RenderStyle "AddShaded";
StencilColor "FFFFFF"; StencilColor "FFFFFF";
Scale 0.5; Scale 0.5;

View file

@ -11,6 +11,8 @@ Class UTPlayer : DoomPlayer
int last_tap_fm, last_tap_sm; int last_tap_fm, last_tap_sm;
int last_jump_held; int last_jump_held;
int tempslide;
int dolltype, voicetype; int dolltype, voicetype;
Property DollType : dolltype; Property DollType : dolltype;
@ -240,6 +242,11 @@ Class UTPlayer : DoomPlayer
} }
else forcefootstep = true; 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)) ) 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; double vol = abs(vel.xy.length())*0.03;
@ -321,11 +328,20 @@ Class UTPlayer : DoomPlayer
last_sm = sm; last_sm = sm;
if ( !bNoGravity && player.onground && (waterlevel < 2) ) 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; if ( level.IsJumpingAllowed() )
else vel += dodge.unit()*(groundspeed*1.5)/TICRATE; {
vel.z += dodgez/TICRATE; 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; bOnMobj = false;
if ( !(player.cheats&CF_PREDICTING) ) if ( !(player.cheats&CF_PREDICTING) )
A_PlaySound("*jump",CHAN_BODY); A_PlaySound("*jump",CHAN_BODY);
@ -339,12 +355,13 @@ Class UTPlayer : DoomPlayer
} }
else else
{ {
if ( flak_nowalkdrop ) if ( flak_nowalkdrop && !tempslide )
bNODROPOFF = ((acceleration.length() > double.epsilon) && (cmd.buttons&BT_SPEED)); bNODROPOFF = ((acceleration.length() > double.epsilon) && (cmd.buttons&BT_SPEED));
// Hook in Unreal physics // Hook in Unreal physics
Vector2 dir = (0,0); Vector2 dir = (0,0);
if ( vel.xy.length() > double.epsilon ) dir = vel.xy.unit(); if ( vel.xy.length() > double.epsilon ) dir = vel.xy.unit();
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0); double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
if ( tempslide ) friction *= 0;
if ( acceleration.length() <= double.epsilon ) if ( acceleration.length() <= double.epsilon )
{ {
Vector2 oldvel = vel.xy; Vector2 oldvel = vel.xy;
@ -369,7 +386,8 @@ Class UTPlayer : DoomPlayer
if ( acceleration.length() <= double.epsilon ) PlayIdle(); if ( acceleration.length() <= double.epsilon ) PlayIdle();
else PlayRunning(); else PlayRunning();
} }
player.vel = vel.xy; if ( tempslide ) player.vel *= 0;
else player.vel = vel.xy;
} }
} }
else if ( !bNoGravity && (waterlevel < 2) ) else if ( !bNoGravity && (waterlevel < 2) )
@ -1348,6 +1366,7 @@ Class ShredCorpseHitbox : Actor
-SOLID; -SOLID;
+DONTSPLASH; +DONTSPLASH;
+SHOOTABLE; +SHOOTABLE;
+NOTELEPORT;
Health int.max; Health int.max;
} }
override void PostBeginPlay() override void PostBeginPlay()

View file

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

View file

@ -38,6 +38,7 @@ Class ShockWave : Actor
+NOBLOCKMAP; +NOBLOCKMAP;
+NOGRAVITY; +NOGRAVITY;
+DONTSPLASH; +DONTSPLASH;
+NOTELEPORT;
} }
override void PostBeginPlay() override void PostBeginPlay()
{ {
@ -94,6 +95,7 @@ Class WarheadSubExplosion : Actor
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+NOTELEPORT;
} }
override void PostBeginPlay() override void PostBeginPlay()
{ {
@ -119,6 +121,7 @@ Class WarheadHitbox : Actor
+NOCLIP; +NOCLIP;
+DONTSPLASH; +DONTSPLASH;
+NOBLOOD; +NOBLOOD;
+NOTELEPORT;
} }
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle ) override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
{ {
@ -207,6 +210,7 @@ Class WarheadTrail : Actor
+FORCEXYBILLBOARD; +FORCEXYBILLBOARD;
+ROLLSPRITE; +ROLLSPRITE;
+ROLLCENTER; +ROLLCENTER;
+NOTELEPORT;
Scale 0.2; Scale 0.2;
} }