Made visual recoil toggleable (and with configurable strength, too).
Cleaned up some code (mostly related to server CVars). Proper angle interpolation. Snap player to floor when walking down steps like UE does (looks kinda twitchy due to lack of view height smoothing).
This commit is contained in:
parent
e232912edd
commit
957f976b29
14 changed files with 80 additions and 75 deletions
|
|
@ -28,3 +28,5 @@ server bool flak_doomaircontrol = false; // keep Doom's limited air control when
|
||||||
server bool flak_nobosstelefrag = false; // disable telefragging of boss monsters (useful when translocator is enabled)
|
server bool flak_nobosstelefrag = false; // disable telefragging of boss monsters (useful when translocator is enabled)
|
||||||
server bool flak_nowalkdrop = false; // don't drop off ledges while holding walk key (glitchy)
|
server bool flak_nowalkdrop = false; // don't drop off ledges while holding walk key (glitchy)
|
||||||
server bool flak_corpsedamage = false; // [WIP/EXPERIMENTAL] allow corpses to take damage and be gibbed, currently just causes a jump to XDeath until gore system is implemented
|
server bool flak_corpsedamage = false; // [WIP/EXPERIMENTAL] allow corpses to take damage and be gibbed, currently just causes a jump to XDeath until gore system is implemented
|
||||||
|
server bool flak_swingers = true; // weapon recoil that affects player view
|
||||||
|
server float flak_swingerstrength = 0.5; // strength of visual recoil
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ OptionMenu "UTOptionMenu"
|
||||||
Option "Redeemer View Shader", "flak_deemershader", "YesNo"
|
Option "Redeemer View Shader", "flak_deemershader", "YesNo"
|
||||||
Option "No Redeemer Autoswitch", "flak_noswitchdeemer", "YesNo"
|
Option "No Redeemer Autoswitch", "flak_noswitchdeemer", "YesNo"
|
||||||
Option "Classic Enh. Shock Rifle", "flak_classicsshock", "YesNo"
|
Option "Classic Enh. Shock Rifle", "flak_classicsshock", "YesNo"
|
||||||
|
Option "Visual Recoil", "flak_swingers", "YesNo"
|
||||||
|
Slider "Visual Recoil Strength", "flak_swingerstrength", 0.0, 1.0, 0.1, 1
|
||||||
StaticText " "
|
StaticText " "
|
||||||
StaticText "Translocator (Potentially Game-Breaking)", "Gold"
|
StaticText "Translocator (Potentially Game-Breaking)", "Gold"
|
||||||
Option "Prevent Boss Telefrag", "flak_nobosstelefrag", "YesNo"
|
Option "Prevent Boss Telefrag", "flak_nobosstelefrag", "YesNo"
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ Model "Razor2"
|
||||||
Scale 0.18 0.18 0.216
|
Scale 0.18 0.18 0.216
|
||||||
AngleOffset 90
|
AngleOffset 90
|
||||||
USEACTORPITCH
|
USEACTORPITCH
|
||||||
USEACTORROLL
|
|
||||||
|
|
||||||
FrameIndex RAZB A 0 0
|
FrameIndex RAZB A 0 0
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +47,6 @@ Model "Razor2Trail"
|
||||||
Scale 0.36 0.18 0.216
|
Scale 0.36 0.18 0.216
|
||||||
AngleOffset 90
|
AngleOffset 90
|
||||||
USEACTORPITCH
|
USEACTORPITCH
|
||||||
USEACTORROLL
|
|
||||||
DONTCULLBACKFACES
|
DONTCULLBACKFACES
|
||||||
|
|
||||||
FrameIndex RAZB A 0 0
|
FrameIndex RAZB A 0 0
|
||||||
|
|
|
||||||
|
|
@ -216,9 +216,9 @@ Class BioGel : Actor
|
||||||
if ( globalfreeze || level.frozen ) return;
|
if ( globalfreeze || level.frozen ) return;
|
||||||
if ( !bNOGRAVITY )
|
if ( !bNOGRAVITY )
|
||||||
{
|
{
|
||||||
A_SetRoll(roll+rollvel,SPF_INTERPOLATE);
|
roll += rollvel;
|
||||||
A_SetPitch(pitch+pitchvel,SPF_INTERPOLATE);
|
pitch += pitchvel;
|
||||||
A_SetPitch(pitch+yawvel,SPF_INTERPOLATE);
|
pitch += yawvel;
|
||||||
if ( waterlevel > 0 )
|
if ( waterlevel > 0 )
|
||||||
{
|
{
|
||||||
vel.xy *= 0.98;
|
vel.xy *= 0.98;
|
||||||
|
|
@ -288,6 +288,7 @@ Class BioGel : Actor
|
||||||
// align self to what surface was hit, currently does not support 3d floors + slopes properly
|
// align self to what surface was hit, currently does not support 3d floors + slopes properly
|
||||||
virtual void AlignSelf()
|
virtual void AlignSelf()
|
||||||
{
|
{
|
||||||
|
bINTERPOLATEANGLES = false;
|
||||||
bHITOWNER = true;
|
bHITOWNER = true;
|
||||||
A_NoGravity();
|
A_NoGravity();
|
||||||
A_Stop();
|
A_Stop();
|
||||||
|
|
@ -538,6 +539,7 @@ Class BioGel : Actor
|
||||||
+MOVEWITHSECTOR;
|
+MOVEWITHSECTOR;
|
||||||
+NODAMAGETHRUST;
|
+NODAMAGETHRUST;
|
||||||
+HITTRACER;
|
+HITTRACER;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ Class UTRocket : Actor
|
||||||
+SEEKERMISSILE;
|
+SEEKERMISSILE;
|
||||||
+FORCERADIUSDMG;
|
+FORCERADIUSDMG;
|
||||||
+NODAMAGETHRUST;
|
+NODAMAGETHRUST;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
}
|
}
|
||||||
override void PostBeginPlay()
|
override void PostBeginPlay()
|
||||||
{
|
{
|
||||||
|
|
@ -184,7 +185,7 @@ Class UTRocket : Actor
|
||||||
Spawn:
|
Spawn:
|
||||||
RCKT B 1
|
RCKT B 1
|
||||||
{
|
{
|
||||||
A_SetRoll(roll+30,SPF_INTERPOLATE);
|
roll += 30;
|
||||||
if ( invoker.ticcnt++ > 3 )
|
if ( invoker.ticcnt++ > 3 )
|
||||||
{
|
{
|
||||||
invoker.ticcnt = 0;
|
invoker.ticcnt = 0;
|
||||||
|
|
@ -194,8 +195,8 @@ Class UTRocket : Actor
|
||||||
if ( vel.length() > 45. ) vel = Vel.unit()*45.;
|
if ( vel.length() > 45. ) vel = Vel.unit()*45.;
|
||||||
Vector3 dir = vel.unit();
|
Vector3 dir = vel.unit();
|
||||||
if ( waterlevel <= 0 ) vel = dir*min(vel.length()+1,32);
|
if ( waterlevel <= 0 ) vel = dir*min(vel.length()+1,32);
|
||||||
A_SetAngle(atan2(dir.y,dir.x),SPF_INTERPOLATE);
|
angle = atan2(dir.y,dir.x);
|
||||||
A_SetPitch(asin(-dir.z),SPF_INTERPOLATE);
|
pitch = asin(-dir.z);
|
||||||
for ( int i=0; i<3; i++ )
|
for ( int i=0; i<3; i++ )
|
||||||
{
|
{
|
||||||
let s = Spawn("UTSmoke",pos);
|
let s = Spawn("UTSmoke",pos);
|
||||||
|
|
@ -242,9 +243,9 @@ Class UTGrenade : UTRocket
|
||||||
Spawn:
|
Spawn:
|
||||||
RCKT A 1
|
RCKT A 1
|
||||||
{
|
{
|
||||||
A_SetAngle(angle+anglevel,SPF_INTERPOLATE);
|
angle += anglevel;
|
||||||
A_SetPitch(pitch+pitchvel,SPF_INTERPOLATE);
|
pitch += pitchvel;
|
||||||
A_SetRoll(roll+rollvel,SPF_INTERPOLATE);
|
roll += rollvel;
|
||||||
A_Countdown();
|
A_Countdown();
|
||||||
}
|
}
|
||||||
Wait;
|
Wait;
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ Class UTCasing : Actor
|
||||||
+MOVEWITHSECTOR;
|
+MOVEWITHSECTOR;
|
||||||
+THRUACTORS;
|
+THRUACTORS;
|
||||||
+USEBOUNCESTATE;
|
+USEBOUNCESTATE;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
BounceType "Doom";
|
BounceType "Doom";
|
||||||
BounceFactor 0.65;
|
BounceFactor 0.65;
|
||||||
BounceSound "bullet/casing";
|
BounceSound "bullet/casing";
|
||||||
|
|
@ -133,8 +134,8 @@ Class UTCasing : Actor
|
||||||
Spawn:
|
Spawn:
|
||||||
PCAS A 1
|
PCAS A 1
|
||||||
{
|
{
|
||||||
A_SetAngle(angle+anglevel,SPF_INTERPOLATE);
|
angle += anglevel;
|
||||||
A_SetPitch(pitch+pitchvel,SPF_INTERPOLATE);
|
pitch += pitchvel;
|
||||||
}
|
}
|
||||||
Loop;
|
Loop;
|
||||||
Bounce:
|
Bounce:
|
||||||
|
|
@ -148,8 +149,8 @@ Class UTCasing : Actor
|
||||||
Death:
|
Death:
|
||||||
PCAS A -1
|
PCAS A -1
|
||||||
{
|
{
|
||||||
A_SetPitch(0);
|
pitch = 0;
|
||||||
A_SetRoll(FRandom[Junk](0,360));
|
roll = FRandom[Junk](0,360);
|
||||||
}
|
}
|
||||||
Stop;
|
Stop;
|
||||||
}
|
}
|
||||||
|
|
@ -166,7 +167,7 @@ Class Enforcer : UTWeapon
|
||||||
|
|
||||||
override void PostRender( double lbottom )
|
override void PostRender( double lbottom )
|
||||||
{
|
{
|
||||||
if ( !CVar.GetCVar('flak_enforcerreload').GetBool() ) return;
|
if ( !flak_enforcerreload ) return;
|
||||||
if ( Amount > 1 ) Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight()*2,String.Format("L Clip: %2d / 20\nR Clip: %2d / 20",slaveclipcount,clipcount));
|
if ( Amount > 1 ) Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight()*2,String.Format("L Clip: %2d / 20\nR Clip: %2d / 20",slaveclipcount,clipcount));
|
||||||
else Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 20",clipcount));
|
else Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 20",clipcount));
|
||||||
}
|
}
|
||||||
|
|
@ -209,7 +210,7 @@ Class Enforcer : UTWeapon
|
||||||
if ( !weap || !player ) return;
|
if ( !weap || !player ) return;
|
||||||
if ( slave )
|
if ( slave )
|
||||||
{
|
{
|
||||||
if ( CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.slaveclipcount < 5) ) A_PlaySound("enforcer/click",CHAN_6);
|
if ( flak_enforcerreload && (invoker.slaveclipcount < 5) ) A_PlaySound("enforcer/click",CHAN_6);
|
||||||
if ( (invoker.slaveclipcount <= 0) || (weap.Ammo1.Amount <= 0) )
|
if ( (invoker.slaveclipcount <= 0) || (weap.Ammo1.Amount <= 0) )
|
||||||
{
|
{
|
||||||
invoker.slaverefire = 0;
|
invoker.slaverefire = 0;
|
||||||
|
|
@ -236,7 +237,7 @@ Class Enforcer : UTWeapon
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.clipcount < 5) ) A_PlaySound("enforcer/click",CHAN_WEAPON);
|
if ( flak_enforcerreload && (invoker.clipcount < 5) ) A_PlaySound("enforcer/click",CHAN_WEAPON);
|
||||||
if ( (invoker.clipcount <= 0) || (weap.Ammo1.Amount <= 0) )
|
if ( (invoker.clipcount <= 0) || (weap.Ammo1.Amount <= 0) )
|
||||||
{
|
{
|
||||||
A_ClearRefire();
|
A_ClearRefire();
|
||||||
|
|
@ -273,12 +274,12 @@ Class Enforcer : UTWeapon
|
||||||
if ( slave )
|
if ( slave )
|
||||||
{
|
{
|
||||||
invoker.slaveclipcount--;
|
invoker.slaveclipcount--;
|
||||||
if ( !CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.slaveclipcount <=0) ) invoker.slaveclipcount = (weap.Ammo1.Amount>0)?Min(20,weap.Ammo1.Amount):20;
|
if ( !flak_enforcerreload && (invoker.slaveclipcount <=0) ) invoker.slaveclipcount = (weap.Ammo1.Amount>0)?Min(20,weap.Ammo1.Amount):20;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
invoker.clipcount--;
|
invoker.clipcount--;
|
||||||
if ( !CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.clipcount <=0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(20,weap.Ammo1.Amount):20;
|
if ( !flak_enforcerreload && (invoker.clipcount <=0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(20,weap.Ammo1.Amount):20;
|
||||||
}
|
}
|
||||||
invoker.FireEffect();
|
invoker.FireEffect();
|
||||||
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
|
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
|
||||||
|
|
@ -441,7 +442,7 @@ Class Enforcer : UTWeapon
|
||||||
TNT1 A 1
|
TNT1 A 1
|
||||||
{
|
{
|
||||||
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) A_Overlay(PSP_WEAPON,"Reload");
|
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) A_Overlay(PSP_WEAPON,"Reload");
|
||||||
else if ( CVar.GetCVar('flak_enforcerreload').GetBool() && ((invoker.clipcount < min(20,invoker.Ammo1.Amount)) || (invoker.slaveclipcount < min(20,invoker.Ammo1.Amount))) ) A_WeaponReady(WRF_ALLOWRELOAD);
|
else if ( flak_enforcerreload && ((invoker.clipcount < min(20,invoker.Ammo1.Amount)) || (invoker.slaveclipcount < min(20,invoker.Ammo1.Amount))) ) A_WeaponReady(WRF_ALLOWRELOAD);
|
||||||
else A_WeaponReady();
|
else A_WeaponReady();
|
||||||
if ( !invoker.slaveactive && (CountInv("Enforcer") > 1) ) A_Overlay(2,"LeftReady");
|
if ( !invoker.slaveactive && (CountInv("Enforcer") > 1) ) A_Overlay(2,"LeftReady");
|
||||||
}
|
}
|
||||||
|
|
@ -454,7 +455,7 @@ Class Enforcer : UTWeapon
|
||||||
invoker.slaveactive = false;
|
invoker.slaveactive = false;
|
||||||
A_Overlay(2,"LeftDeselect");
|
A_Overlay(2,"LeftDeselect");
|
||||||
}
|
}
|
||||||
else if ( CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.slavereload || (invoker.slaveclipcount < 0)) ) A_Overlay(2,"LeftReload");
|
else if ( flak_enforcerreload && (invoker.slavereload || (invoker.slaveclipcount < 0)) ) A_Overlay(2,"LeftReload");
|
||||||
else if ( invoker.slavedown ) A_Overlay(2,"LeftDeselect");
|
else if ( invoker.slavedown ) A_Overlay(2,"LeftDeselect");
|
||||||
else A_LeftWeaponReady();
|
else A_LeftWeaponReady();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,7 @@ Class FlakChunk : Actor
|
||||||
-BOUNCEAUTOOFF;
|
-BOUNCEAUTOOFF;
|
||||||
+CANBOUNCEWATER;
|
+CANBOUNCEWATER;
|
||||||
+SKYEXPLODE;
|
+SKYEXPLODE;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
Scale 0.3;
|
Scale 0.3;
|
||||||
}
|
}
|
||||||
override void PostBeginPlay()
|
override void PostBeginPlay()
|
||||||
|
|
@ -224,9 +225,9 @@ Class FlakChunk : Actor
|
||||||
}
|
}
|
||||||
if ( trail ) trail.alpha = max(0,11-frame)/11.;
|
if ( trail ) trail.alpha = max(0,11-frame)/11.;
|
||||||
if ( InStateSequence(CurState,FindState("Death")) ) return;
|
if ( InStateSequence(CurState,FindState("Death")) ) return;
|
||||||
A_SetRoll(roll+rollvel,SPF_INTERPOLATE);
|
roll += rollvel;
|
||||||
A_SetPitch(pitch+pitchvel,SPF_INTERPOLATE);
|
pitch += pitchvel;
|
||||||
A_SetAngle(angle+pitchvel,SPF_INTERPOLATE);
|
angle += pitchvel;
|
||||||
}
|
}
|
||||||
action void A_HandleBounce()
|
action void A_HandleBounce()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ Class MinigunTracer : Actor
|
||||||
+NOCLIP;
|
+NOCLIP;
|
||||||
+NOGRAVITY;
|
+NOGRAVITY;
|
||||||
+DONTSPLASH;
|
+DONTSPLASH;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
}
|
}
|
||||||
override void Tick()
|
override void Tick()
|
||||||
{
|
{
|
||||||
|
|
@ -55,9 +56,9 @@ Class MinigunTracer : Actor
|
||||||
}
|
}
|
||||||
dir = dir.unit();
|
dir = dir.unit();
|
||||||
SetOrigin(Vec3Offset(dir.x*160,dir.y*160,dir.z*160),true);
|
SetOrigin(Vec3Offset(dir.x*160,dir.y*160,dir.z*160),true);
|
||||||
A_SetAngle(atan2(dir.y,dir.x),SPF_INTERPOLATE);
|
angle = atan2(dir.y,dir.x);
|
||||||
A_SetPitch(asin(-dir.z),SPF_INTERPOLATE);
|
pitch = asin(-dir.z);
|
||||||
A_SetRoll(roll+60,SPF_INTERPOLATE);
|
roll += 60;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -268,8 +268,7 @@ Class UTInvisibilityX : Actor
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SetOrigin(target.pos,true);
|
Warp(target,flags:WARPF_COPYINTERPOLATION|WARPF_NOCHECKPOSITION);
|
||||||
A_SetAngle(target.angle,SPF_INTERPOLATE);
|
|
||||||
bInvisible = target.bInvisible;
|
bInvisible = target.bInvisible;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
|
|
|
||||||
|
|
@ -538,7 +538,7 @@ Class PulseGun : UTWeapon
|
||||||
|
|
||||||
override void PostRender( double lbottom )
|
override void PostRender( double lbottom )
|
||||||
{
|
{
|
||||||
if ( !CVar.GetCVar('flak_pulsereload').GetBool() ) return;
|
if ( !flak_pulsereload ) return;
|
||||||
Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 50",clipcount));
|
Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 50",clipcount));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -556,7 +556,7 @@ Class PulseGun : UTWeapon
|
||||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
if ( weap.Ammo1.Amount <= 0 ) return;
|
||||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
||||||
invoker.clipcount--;
|
invoker.clipcount--;
|
||||||
if ( !CVar.GetCVar('flak_pulsereload').GetBool() && (invoker.clipcount <= 0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(50,weap.Ammo1.Amount):50;
|
if ( !flak_pulsereload && (invoker.clipcount <= 0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(50,weap.Ammo1.Amount):50;
|
||||||
invoker.FireEffect();
|
invoker.FireEffect();
|
||||||
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
|
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.1,-0.02,3,SWING_Spring,0,2);
|
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.1,-0.02,3,SWING_Spring,0,2);
|
||||||
|
|
@ -617,7 +617,7 @@ Class PulseGun : UTWeapon
|
||||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
if ( weap.Ammo1.Amount <= 0 ) return;
|
||||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
||||||
invoker.clipcount--;
|
invoker.clipcount--;
|
||||||
if ( !CVar.GetCVar('flak_pulsereload').GetBool() && (invoker.clipcount <=0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(50,weap.Ammo1.Amount):50;
|
if ( !flak_pulsereload && (invoker.clipcount <=0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(50,weap.Ammo1.Amount):50;
|
||||||
invoker.FireEffect();
|
invoker.FireEffect();
|
||||||
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
|
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.3,-0.1,2,SWING_Spring,0,3);
|
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.3,-0.1,2,SWING_Spring,0,3);
|
||||||
|
|
@ -715,7 +715,7 @@ Class PulseGun : UTWeapon
|
||||||
PGNI A 1
|
PGNI A 1
|
||||||
{
|
{
|
||||||
A_CheckReload();
|
A_CheckReload();
|
||||||
if ( CVar.GetCVar('flak_pulsereload').GetBool() )
|
if ( flak_pulsereload )
|
||||||
{
|
{
|
||||||
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) return A_Jump(255,"Reload");
|
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) return A_Jump(255,"Reload");
|
||||||
A_WeaponReady(WRF_ALLOWRELOAD);
|
A_WeaponReady(WRF_ALLOWRELOAD);
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,8 @@ Class Razor2Trail : Actor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SetOrigin(target.pos,true);
|
SetOrigin(target.pos,true);
|
||||||
A_SetAngle(target.angle,SPF_INTERPOLATE);
|
angle = target.angle;
|
||||||
A_SetPitch(target.pitch,SPF_INTERPOLATE);
|
pitch = target.pitch;
|
||||||
A_SetRoll(target.roll,SPF_INTERPOLATE);
|
|
||||||
alpha = target.vel.length()/target.speed;
|
alpha = target.vel.length()/target.speed;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
|
|
|
||||||
|
|
@ -625,7 +625,7 @@ Class SuperShockBeam : Actor
|
||||||
action void A_BeamExplode()
|
action void A_BeamExplode()
|
||||||
{
|
{
|
||||||
Spawn("SuperShockBeamLight",pos);
|
Spawn("SuperShockBeamLight",pos);
|
||||||
if ( !CVar.GetCVar('flak_classicsshock').GetBool() )
|
if ( !flak_classicsshock )
|
||||||
{
|
{
|
||||||
UTMainHandler.DoBlast(self,50,60000);
|
UTMainHandler.DoBlast(self,50,60000);
|
||||||
A_Explode(Random[ASMD](500,800),50);
|
A_Explode(Random[ASMD](500,800),50);
|
||||||
|
|
@ -1297,7 +1297,7 @@ Class EnhancedShockRifle : UTWeapon
|
||||||
ASMF BCDEFGHIJJ 2;
|
ASMF BCDEFGHIJJ 2;
|
||||||
Goto Idle;
|
Goto Idle;
|
||||||
AltFire:
|
AltFire:
|
||||||
ASMI A 0 A_JumpIf(CVar.GetCVar('flak_classicsshock').GetBool(),"Fire");
|
ASMI A 0 A_JumpIf(flak_classicsshock,"Fire");
|
||||||
ASMI A 0 A_JumpIfNoAmmo("DryFire");
|
ASMI A 0 A_JumpIfNoAmmo("DryFire");
|
||||||
ASMA A 1 A_SShockAlt();
|
ASMA A 1 A_SShockAlt();
|
||||||
ASMA BCDFGHIJ 2;
|
ASMA BCDFGHIJ 2;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ Class UTPlayer : DoomPlayer
|
||||||
bool lastground;
|
bool lastground;
|
||||||
int lastgroundtic;
|
int lastgroundtic;
|
||||||
double lastvelz, prevvelz;
|
double lastvelz, prevvelz;
|
||||||
transient CVar footsteps, utmovement, doomspeed, doomaircontrol, nowalkdrop;
|
transient CVar footsteps;
|
||||||
Vector2 acceleration;
|
Vector2 acceleration;
|
||||||
Vector3 acceleration3;
|
Vector3 acceleration3;
|
||||||
int last_fm, last_sm;
|
int last_fm, last_sm;
|
||||||
|
|
@ -183,7 +183,7 @@ Class UTPlayer : DoomPlayer
|
||||||
override void Tick()
|
override void Tick()
|
||||||
{
|
{
|
||||||
Super.Tick();
|
Super.Tick();
|
||||||
if ( !player ) return;
|
if ( !player || (player.mo != self) ) return;
|
||||||
if ( !footsteps ) footsteps = CVar.GetCVar('flak_footsteps',players[consoleplayer]);
|
if ( !footsteps ) footsteps = CVar.GetCVar('flak_footsteps',players[consoleplayer]);
|
||||||
if ( !footsteps.GetBool() ) return;
|
if ( !footsteps.GetBool() ) return;
|
||||||
double ang = level.time/(20*TICRATE/35.)*360.;
|
double ang = level.time/(20*TICRATE/35.)*360.;
|
||||||
|
|
@ -220,16 +220,12 @@ Class UTPlayer : DoomPlayer
|
||||||
|
|
||||||
override void MovePlayer()
|
override void MovePlayer()
|
||||||
{
|
{
|
||||||
if ( !utmovement ) utmovement = CVar.GetCVar('flak_utmovement');
|
if ( !flak_utmovement || !player || (player.mo != self) )
|
||||||
if ( !doomspeed ) doomspeed = CVar.GetCVar('flak_doomspeed');
|
|
||||||
if ( !doomaircontrol ) doomaircontrol = CVar.GetCVar('flak_doomaircontrol');
|
|
||||||
if ( !nowalkdrop ) nowalkdrop = CVar.GetCVar('flak_nowalkdrop');
|
|
||||||
bNODROPOFF = false;
|
|
||||||
if ( !utmovement.GetBool() )
|
|
||||||
{
|
{
|
||||||
Super.MovePlayer();
|
Super.MovePlayer();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
bNODROPOFF = false;
|
||||||
UserCmd cmd = player.cmd;
|
UserCmd cmd = player.cmd;
|
||||||
if ( player.turnticks )
|
if ( player.turnticks )
|
||||||
{
|
{
|
||||||
|
|
@ -239,10 +235,14 @@ Class UTPlayer : DoomPlayer
|
||||||
else Angle += cmd.yaw*(360./65536.);
|
else Angle += cmd.yaw*(360./65536.);
|
||||||
player.onground = (pos.z <= floorz) || bOnMobj || bMBFBouncer || (player.cheats & CF_NOCLIP2);
|
player.onground = (pos.z <= floorz) || bOnMobj || bMBFBouncer || (player.cheats & CF_NOCLIP2);
|
||||||
if ( player.onground ) lastgroundtic = gametic;
|
if ( player.onground ) lastgroundtic = gametic;
|
||||||
if ( (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) ) player.onground = true;
|
if ( !player.onground && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) )
|
||||||
|
{
|
||||||
|
SetOrigin(Vec2OffsetZ(0,0,floorz),true);
|
||||||
|
player.onground = true;
|
||||||
|
}
|
||||||
double friction = FrictionToUnreal();
|
double friction = FrictionToUnreal();
|
||||||
double fs = TweakSpeeds(1.0,0.0);
|
double fs = TweakSpeeds(1.0,0.0);
|
||||||
if ( !doomspeed.GetBool() )
|
if ( !flak_doomspeed )
|
||||||
{
|
{
|
||||||
if ( cmd.buttons&BT_SPEED ) fs *= walkfactor;
|
if ( cmd.buttons&BT_SPEED ) fs *= walkfactor;
|
||||||
}
|
}
|
||||||
|
|
@ -281,7 +281,7 @@ Class UTPlayer : DoomPlayer
|
||||||
{
|
{
|
||||||
if ( !waterlevel && (dodge.length() > 0) )
|
if ( !waterlevel && (dodge.length() > 0) )
|
||||||
{
|
{
|
||||||
if ( doomspeed.GetBool() ) vel += dodge.unit()*(groundspeed_doomish*1.5)/TICRATE;
|
if ( flak_doomspeed ) vel += dodge.unit()*(groundspeed_doomish*1.5)/TICRATE;
|
||||||
else vel += dodge.unit()*(groundspeed*1.5)/TICRATE;
|
else vel += dodge.unit()*(groundspeed*1.5)/TICRATE;
|
||||||
vel.z += dodgez/TICRATE;
|
vel.z += dodgez/TICRATE;
|
||||||
bOnMobj = false;
|
bOnMobj = false;
|
||||||
|
|
@ -297,7 +297,7 @@ Class UTPlayer : DoomPlayer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( nowalkdrop.GetBool() )
|
if ( flak_nowalkdrop )
|
||||||
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);
|
||||||
|
|
@ -317,7 +317,7 @@ Class UTPlayer : DoomPlayer
|
||||||
}
|
}
|
||||||
vel.xy = vel.xy + acceleration/TICRATE;
|
vel.xy = vel.xy + acceleration/TICRATE;
|
||||||
double maxvel;
|
double maxvel;
|
||||||
if ( doomspeed.GetBool() ) maxvel = groundspeed_doomish/TICRATE;
|
if ( flak_doomspeed ) maxvel = groundspeed_doomish/TICRATE;
|
||||||
else maxvel = groundspeed/TICRATE;
|
else maxvel = groundspeed/TICRATE;
|
||||||
maxvel *= fs*doomfriction;
|
maxvel *= fs*doomfriction;
|
||||||
if ( vel.xy.length() > maxvel ) vel.xy = vel.xy.unit()*maxvel;
|
if ( vel.xy.length() > maxvel ) vel.xy = vel.xy.unit()*maxvel;
|
||||||
|
|
@ -344,9 +344,9 @@ Class UTPlayer : DoomPlayer
|
||||||
Vector2 acceldir = acceleration.unit();
|
Vector2 acceldir = acceleration.unit();
|
||||||
acceleration = acceldir * Min(acceleration.length(), accelrate/TICRATE);
|
acceleration = acceldir * Min(acceleration.length(), accelrate/TICRATE);
|
||||||
}
|
}
|
||||||
acceleration *= doomaircontrol.GetBool()?level.aircontrol:utaircontrol;
|
acceleration *= flak_doomaircontrol?level.aircontrol:utaircontrol;
|
||||||
double maxvel;
|
double maxvel;
|
||||||
if ( doomspeed.GetBool() ) maxvel = (groundspeed_doomish*fs)/TICRATE;
|
if ( flak_doomspeed ) maxvel = (groundspeed_doomish*fs)/TICRATE;
|
||||||
else maxvel = (groundspeed*fs)/TICRATE;
|
else maxvel = (groundspeed*fs)/TICRATE;
|
||||||
// if new velocity is higher than ground speed, steer but don't increase it
|
// if new velocity is higher than ground speed, steer but don't increase it
|
||||||
if ( (vel.xy+acceleration/TICRATE).length() > maxvel )
|
if ( (vel.xy+acceleration/TICRATE).length() > maxvel )
|
||||||
|
|
@ -403,9 +403,7 @@ Class UTPlayer : DoomPlayer
|
||||||
}
|
}
|
||||||
override void CheckJump()
|
override void CheckJump()
|
||||||
{
|
{
|
||||||
if ( !utmovement ) utmovement = CVar.GetCVar('flak_utmovement');
|
if ( !flak_utmovement || !player || (player.mo != self) )
|
||||||
if ( !doomspeed ) doomspeed = CVar.GetCVar('flak_doomspeed');
|
|
||||||
if ( !utmovement.GetBool() )
|
|
||||||
{
|
{
|
||||||
Super.CheckJump();
|
Super.CheckJump();
|
||||||
return;
|
return;
|
||||||
|
|
@ -418,7 +416,7 @@ Class UTPlayer : DoomPlayer
|
||||||
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) )
|
||||||
{
|
{
|
||||||
double jumpvelz;
|
double jumpvelz;
|
||||||
if ( doomspeed.GetBool() ) jumpvelz = jumpz;
|
if ( flak_doomspeed ) jumpvelz = jumpz;
|
||||||
else jumpvelz = utjumpz/TICRATE;
|
else jumpvelz = utjumpz/TICRATE;
|
||||||
double jumpfac = 0;
|
double jumpfac = 0;
|
||||||
for ( let p = Inv; p != null; p = p.Inv )
|
for ( let p = Inv; p != null; p = p.Inv )
|
||||||
|
|
@ -772,6 +770,7 @@ Class UTChip : Actor
|
||||||
+THRUACTORS;
|
+THRUACTORS;
|
||||||
+NOTELEPORT;
|
+NOTELEPORT;
|
||||||
+DONTSPLASH;
|
+DONTSPLASH;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
BounceType "Doom";
|
BounceType "Doom";
|
||||||
BounceFactor 0.3;
|
BounceFactor 0.3;
|
||||||
Gravity 0.7;
|
Gravity 0.7;
|
||||||
|
|
@ -803,9 +802,9 @@ Class UTChip : Actor
|
||||||
Spawn:
|
Spawn:
|
||||||
CHIP # 1
|
CHIP # 1
|
||||||
{
|
{
|
||||||
A_SetAngle(angle+anglevel,SPF_INTERPOLATE);
|
angle += anglevel;
|
||||||
A_SetPitch(pitch+pitchvel,SPF_INTERPOLATE);
|
pitch += pitchvel;
|
||||||
A_SetRoll(roll+rollvel,SPF_INTERPOLATE);
|
roll += rollvel;
|
||||||
}
|
}
|
||||||
Loop;
|
Loop;
|
||||||
Bounce:
|
Bounce:
|
||||||
|
|
@ -1184,8 +1183,8 @@ Class Swinger : Thinker
|
||||||
switch ( cstate )
|
switch ( cstate )
|
||||||
{
|
{
|
||||||
case STATE_Initial:
|
case STATE_Initial:
|
||||||
target.A_SetAngle(target.angle+dir.x*str,SPF_INTERPOLATE);
|
target.A_SetAngle(target.angle+dir.x*str*flak_swingerstrength,SPF_INTERPOLATE);
|
||||||
target.A_SetPitch(target.pitch+dir.y*str,SPF_INTERPOLATE);
|
target.A_SetPitch(target.pitch+dir.y*str*flak_swingerstrength,SPF_INTERPOLATE);
|
||||||
str += inc;
|
str += inc;
|
||||||
if ( ++cnt >= steps )
|
if ( ++cnt >= steps )
|
||||||
{
|
{
|
||||||
|
|
@ -1203,8 +1202,8 @@ Class Swinger : Thinker
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case STATE_Return:
|
case STATE_Return:
|
||||||
target.A_SetAngle(target.angle-dir.x*str/rmul,SPF_INTERPOLATE);
|
target.A_SetAngle(target.angle-dir.x*(str/rmul)*flak_swingerstrength,SPF_INTERPOLATE);
|
||||||
target.A_SetPitch(target.pitch-dir.y*str/rmul,SPF_INTERPOLATE);
|
target.A_SetPitch(target.pitch-dir.y*(str/rmul)*flak_swingerstrength,SPF_INTERPOLATE);
|
||||||
if ( ++cnt >= steps*rmul )
|
if ( ++cnt >= steps*rmul )
|
||||||
{
|
{
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
|
|
@ -1257,7 +1256,6 @@ Class UTMainHandler : StaticEventHandler
|
||||||
{
|
{
|
||||||
ui TextureID tex;
|
ui TextureID tex;
|
||||||
Array<QueuedFlash> flashes;
|
Array<QueuedFlash> flashes;
|
||||||
transient CVar nobosstelefrag;
|
|
||||||
|
|
||||||
override void CheckReplacement( ReplaceEvent e )
|
override void CheckReplacement( ReplaceEvent e )
|
||||||
{
|
{
|
||||||
|
|
@ -1487,8 +1485,7 @@ Class UTMainHandler : StaticEventHandler
|
||||||
|
|
||||||
override void WorldThingSpawned( WorldEvent e )
|
override void WorldThingSpawned( WorldEvent e )
|
||||||
{
|
{
|
||||||
if ( !nobosstelefrag ) nobosstelefrag = CVar.GetCVar('flak_nobosstelefrag');
|
if ( flak_nobosstelefrag && e.Thing.bBOSS ) e.Thing.bNOTELEFRAG = true;
|
||||||
if ( nobosstelefrag.GetBool() && e.Thing.bBOSS ) e.Thing.bNOTELEFRAG = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ui void StartMenu()
|
ui void StartMenu()
|
||||||
|
|
@ -1513,12 +1510,12 @@ Class UTMainHandler : StaticEventHandler
|
||||||
|
|
||||||
override void PlayerEntered( PlayerEvent e )
|
override void PlayerEntered( PlayerEvent e )
|
||||||
{
|
{
|
||||||
if ( CVar.GetCVar('flak_translocator').GetBool() )
|
if ( flak_translocator )
|
||||||
players[e.playernumber].mo.GiveInventory("Translocator",1);
|
players[e.playernumber].mo.GiveInventory("Translocator",1);
|
||||||
}
|
}
|
||||||
override void PlayerRespawned( PlayerEvent e )
|
override void PlayerRespawned( PlayerEvent e )
|
||||||
{
|
{
|
||||||
if ( CVar.GetCVar('flak_translocator').GetBool() )
|
if ( flak_translocator )
|
||||||
players[e.playernumber].mo.GiveInventory("Translocator",1);
|
players[e.playernumber].mo.GiveInventory("Translocator",1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1526,7 +1523,7 @@ Class UTMainHandler : StaticEventHandler
|
||||||
{
|
{
|
||||||
if ( e.Name ~== "refreshtrans" )
|
if ( e.Name ~== "refreshtrans" )
|
||||||
{
|
{
|
||||||
if ( CVar.GetCVar('flak_translocator').GetBool() )
|
if ( flak_translocator )
|
||||||
{
|
{
|
||||||
for ( int i=0; i<MAXPLAYERS; i++ ) if ( playeringame[i] ) players[i].mo.GiveInventory("Translocator",1);
|
for ( int i=0; i<MAXPLAYERS; i++ ) if ( playeringame[i] ) players[i].mo.GiveInventory("Translocator",1);
|
||||||
}
|
}
|
||||||
|
|
@ -1577,7 +1574,7 @@ Class UTMainHandler : StaticEventHandler
|
||||||
{
|
{
|
||||||
if ( e.Thing.bDONTGIB ) return;
|
if ( e.Thing.bDONTGIB ) return;
|
||||||
// attach damage accumulator for corpses
|
// attach damage accumulator for corpses
|
||||||
if ( !CVar.GetCVar('flak_corpsedamage').GetBool() ) return;
|
if ( !flak_corpsedamage ) return;
|
||||||
let a = Actor.Spawn("ShredCorpseHitbox",e.Thing.pos);
|
let a = Actor.Spawn("ShredCorpseHitbox",e.Thing.pos);
|
||||||
a.target = e.Thing;
|
a.target = e.Thing;
|
||||||
}
|
}
|
||||||
|
|
@ -1616,6 +1613,7 @@ Class UTMainHandler : StaticEventHandler
|
||||||
|
|
||||||
static void DoSwing( Actor target, Vector2 dir, double initial, double inc, int steps, int mode = 0, int delay = 0, double rmul = 1.0 )
|
static void DoSwing( Actor target, Vector2 dir, double initial, double inc, int steps, int mode = 0, int delay = 0, double rmul = 1.0 )
|
||||||
{
|
{
|
||||||
|
if ( !flak_swingers ) return;
|
||||||
let s = new("Swinger");
|
let s = new("Swinger");
|
||||||
s.ChangeStatNum(Thinker.STAT_USER);
|
s.ChangeStatNum(Thinker.STAT_USER);
|
||||||
s.target = target;
|
s.target = target;
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,7 @@ Class WarShell : Actor
|
||||||
+SKYEXPLODE;
|
+SKYEXPLODE;
|
||||||
+FORCERADIUSDMG;
|
+FORCERADIUSDMG;
|
||||||
+EXPLODEONWATER;
|
+EXPLODEONWATER;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
}
|
}
|
||||||
override void PostBeginPlay()
|
override void PostBeginPlay()
|
||||||
{
|
{
|
||||||
|
|
@ -402,9 +403,9 @@ Class GuidedWarShell : WarShell
|
||||||
orient = orient.qmul(angles);
|
orient = orient.qmul(angles);
|
||||||
double npitch, nangle, nroll;
|
double npitch, nangle, nroll;
|
||||||
[npitch, nangle, nroll] = orient.to_euler();
|
[npitch, nangle, nroll] = orient.to_euler();
|
||||||
A_SetAngle(nangle,SPF_INTERPOLATE);
|
angle = nangle;
|
||||||
A_SetPitch(npitch,SPF_INTERPOLATE);
|
pitch = npitch;
|
||||||
A_SetRoll(nroll,SPF_INTERPOLATE);
|
roll = nroll;
|
||||||
vel = (vel+(cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch))*0.8).unit()*11;
|
vel = (vel+(cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch))*0.8).unit()*11;
|
||||||
}
|
}
|
||||||
lagangle2 = lagangle2*0.95+lagangle*0.05;
|
lagangle2 = lagangle2*0.95+lagangle*0.05;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue