Razorjack implemented, along with a couple extra features.
Adjust SCUBA Gear autouse behaviour so it works properly with manual use. Add 3D floor handling code on various things. Increased size of Eightball explosions to match original game. Fix invisibility playing no sound when activated.
This commit is contained in:
parent
2587d6c505
commit
3e169dfde6
16 changed files with 538 additions and 33 deletions
|
|
@ -3,7 +3,7 @@
|
|||
The Unreal 1 counterpart to Doom Tournament. Adds Unreal 1 weapons and items
|
||||
(including dummied out stuff and others).
|
||||
|
||||
This mod requires GZDoom g4.3pre-64-g37fa2e1b6 or later, and runs on top of
|
||||
This mod requires GZDoom g4.3pre-79-gbcef44051 or later, and runs on top of
|
||||
Doom Tournament (currently the devel branch is required).
|
||||
|
||||
## Currently Implemented
|
||||
|
|
@ -19,6 +19,9 @@ Doom Tournament (currently the devel branch is required).
|
|||
- Single rocket mode for Eightball
|
||||
- "Hold up to 2 seconds" feature from Unreal Bible
|
||||
- Flak Cannon (slot 6) (replaces rocket launcher)
|
||||
- Razorjack (slot 7) (replaces chaingun)
|
||||
- Razorjack hold fire to increase blade speed (from Unreal Bible)
|
||||
- Make Razorjack altfire actually seek where player is aiming (toggleable)
|
||||
- SMP 7243 (slot 0) (replaces bfg9000)
|
||||
- Backpack (replaces backpack, identical to Doom Tournament version)
|
||||
- Unreal 1 HUD
|
||||
|
|
@ -52,7 +55,6 @@ Doom Tournament (currently the devel branch is required).
|
|||
|
||||
## In progress
|
||||
|
||||
- Razorjack (slot 7) (replaces chaingun)
|
||||
- GES Bio Rifle (slot 8) (replaces plasma rifle)
|
||||
- Rifle (slot 9) (replaces plasma rifle)
|
||||
- Minigun (slot 0) (replaces chaingun)
|
||||
|
|
@ -60,13 +62,11 @@ Doom Tournament (currently the devel branch is required).
|
|||
## Planned
|
||||
|
||||
- Unreal Bible & prototype build behaviour restoration
|
||||
- Razorjack hold fire to increase blade speed
|
||||
- Rifle restored rapid fire
|
||||
- Rifle restored flashlight
|
||||
- Biorifle "Hold up to 2 seconds" feature from Unreal Bible
|
||||
|
||||
- QOL improvements
|
||||
- Make Razorjack altfire actually seek where player is aiming
|
||||
- Biorifle splashes like UT (toggleable)
|
||||
|
||||
- Stunner (slot 4) (replaces chainsaw)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ server bool sting_riflel = false; // old rifle flashlight
|
|||
// you know... a scope
|
||||
server bool sting_razor = false; // razorjack blade charging
|
||||
// hold primary fire to increase the
|
||||
// spin up to 3x
|
||||
// spin up to 3 levels
|
||||
server bool sting_flamet = false; // use flamethrower model based on old
|
||||
// design and texture rather than the
|
||||
// modern redesign
|
||||
|
|
@ -84,3 +84,6 @@ server bool sting_ehold = false; // eightball can be held fully loaded
|
|||
// for up to 2 seconds
|
||||
server bool sting_bhold = false; // biorifle can be held fully loaded
|
||||
// for up to 2 seconds
|
||||
server bool sting_razoraim = false; // razorjack alt follows aim instead of
|
||||
// being steered by player rotation
|
||||
server bool sting_biosplash = false; // biorifle alt splashes like in ut
|
||||
|
|
|
|||
|
|
@ -235,6 +235,8 @@ STING_MSENTRY = "Enable new Minigun Sentry";
|
|||
STING_DUBIOUS = "Enable Demolisher, Razorclaw and Autocannon";
|
||||
STING_QOPTS = "Convenience features";
|
||||
STING_AUTOSCUBA = "Automatic SCUBA Gear toggling";
|
||||
STING_RAZORAIM = "Razorjack altfire follows the crosshair";
|
||||
STING_BIOSPLASH = "Biorifle altfire splashes like in UT";
|
||||
STING_MCREDS = "Unreal Credits";
|
||||
STING_CDR = "Doomreal";
|
||||
STING_CLEAD = "Development Lead:";
|
||||
|
|
@ -463,6 +465,8 @@ STING_MSENTRY = "Habilitar nueva Torreta";
|
|||
STING_DUBIOUS = "Habilitar Demoledor, Garra y Autocañón";
|
||||
STING_QOPTS = "Características de comodidad";
|
||||
STING_AUTOSCUBA = "Uso automático de Kit de Buceo";
|
||||
STING_RAZORAIM = "El fuego alt. del Razorjack sigue el punto de mira";
|
||||
STING_BIOSPLASH = "El fuego alt. del Biorifle salpica como en UT";
|
||||
STING_MCREDS = "Créditos de Unreal";
|
||||
STING_CDR = "Doomreal";
|
||||
STING_CLEAD = "Desarrolladora Jefe:";
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ OptionMenu "UnrealOptionMenu"
|
|||
StaticText " "
|
||||
StaticText "$STING_QOPTS", "Gold"
|
||||
Option "$STING_AUTOSCUBA", "sting_autoscuba", "YesNo"
|
||||
Option "$STING_RAZORAIM", "sting_razoraim", "YesNo"
|
||||
Option "$STING_BIOSPLASH", "sting_biosplash", "YesNo"
|
||||
}
|
||||
|
||||
AddOptionMenu "OptionsMenu"
|
||||
|
|
|
|||
|
|
@ -3,13 +3,48 @@ Model "RazorAmmo"
|
|||
Path "models"
|
||||
Model 0 "RazorAmmoMesh_d.3d"
|
||||
Skin 0 "JPickup21.png"
|
||||
ZOffset 8
|
||||
ZOffset 5
|
||||
Scale 0.1 0.1 0.12
|
||||
|
||||
FrameIndex BHOP A 0 0
|
||||
FrameIndex BHOP B 0 1
|
||||
}
|
||||
|
||||
Model "RazorBlade"
|
||||
{
|
||||
Path "models"
|
||||
Model 0 "razorb_d.3d"
|
||||
SurfaceSkin 0 1 "JRazor1.png"
|
||||
USEACTORPITCH
|
||||
USEACTORROLL
|
||||
ROTATING
|
||||
AngleOffset 90
|
||||
Scale 0.08 0.08 0.096
|
||||
|
||||
Rotation-Speed 15
|
||||
FrameIndex RAZB A 0 0
|
||||
Rotation-Speed 25
|
||||
FrameIndex RAZB B 0 0
|
||||
Rotation-Speed 35
|
||||
FrameIndex RAZB C 0 0
|
||||
Rotation-Speed 45
|
||||
FrameIndex RAZB D 0 0
|
||||
}
|
||||
|
||||
Model "RazorBladeTrail"
|
||||
{
|
||||
Path "models"
|
||||
Model 0 "razorb_d.3d"
|
||||
SurfaceSkin 0 0 "FireEffect54.png"
|
||||
DONTCULLBACKFACES
|
||||
USEACTORPITCH
|
||||
USEACTORROLL
|
||||
AngleOffset 90
|
||||
Scale 0.08 0.08 0.096
|
||||
|
||||
FrameIndex RAZB A 0 0
|
||||
}
|
||||
|
||||
Model "Razorjack"
|
||||
{
|
||||
Path "models"
|
||||
|
|
@ -26,3 +61,124 @@ Model "Razorjack"
|
|||
ROTATING
|
||||
FrameIndex RZRP A 1 0
|
||||
}
|
||||
|
||||
Model "Razorjack"
|
||||
{
|
||||
Path "models"
|
||||
Model 0 "Razor_d.3d"
|
||||
Skin 0 "JRazor1.png"
|
||||
Scale 0.1 -0.1 0.1
|
||||
//Offset 0 -18.7 -8
|
||||
Offset 0 -10 -4.5
|
||||
AngleOffset -90
|
||||
RollOffset -11.25
|
||||
|
||||
// Select
|
||||
FrameIndex RZRS A 0 0
|
||||
FrameIndex RZRS B 0 1
|
||||
FrameIndex RZRS C 0 2
|
||||
FrameIndex RZRS D 0 3
|
||||
FrameIndex RZRS E 0 4
|
||||
FrameIndex RZRS F 0 5
|
||||
FrameIndex RZRS G 0 6
|
||||
FrameIndex RZRS H 0 7
|
||||
FrameIndex RZRS I 0 8
|
||||
FrameIndex RZRS J 0 9
|
||||
FrameIndex RZRS K 0 10
|
||||
FrameIndex RZRS L 0 11
|
||||
FrameIndex RZRS M 0 12
|
||||
FrameIndex RZRS N 0 13
|
||||
FrameIndex RZRS O 0 14
|
||||
FrameIndex RZRS P 0 15
|
||||
FrameIndex RZRS Q 0 16
|
||||
FrameIndex RZRS R 0 17
|
||||
FrameIndex RZRS S 0 18
|
||||
FrameIndex RZRS T 0 19
|
||||
FrameIndex RZRS U 0 20
|
||||
FrameIndex RZRS V 0 21
|
||||
FrameIndex RZRS W 0 22
|
||||
FrameIndex RZRS X 0 23
|
||||
FrameIndex RZRS Y 0 24
|
||||
FrameIndex RZRS Z 0 25
|
||||
FrameIndex RZS2 A 0 26
|
||||
FrameIndex RZS2 B 0 27
|
||||
FrameIndex RZS2 C 0 28
|
||||
FrameIndex RZS2 D 0 29
|
||||
// Fire
|
||||
FrameIndex RZRF A 0 30
|
||||
FrameIndex RZRF B 0 31
|
||||
FrameIndex RZRF C 0 32
|
||||
FrameIndex RZRF D 0 33
|
||||
FrameIndex RZRF E 0 34
|
||||
FrameIndex RZRF F 0 35
|
||||
// Load
|
||||
FrameIndex RZRF G 0 36
|
||||
FrameIndex RZRF H 0 37
|
||||
FrameIndex RZRF I 0 38
|
||||
FrameIndex RZRF J 0 39
|
||||
// Idle
|
||||
FrameIndex RZRI A 0 40
|
||||
FrameIndex RZRI B 0 41
|
||||
FrameIndex RZRI C 0 42
|
||||
FrameIndex RZRI D 0 43
|
||||
FrameIndex RZRI E 0 44
|
||||
FrameIndex RZRI F 0 45
|
||||
FrameIndex RZRI G 0 46
|
||||
FrameIndex RZRI H 0 47
|
||||
FrameIndex RZRI I 0 48
|
||||
FrameIndex RZRI J 0 49
|
||||
FrameIndex RZRI K 0 50
|
||||
FrameIndex RZRI L 0 51
|
||||
FrameIndex RZRI M 0 52
|
||||
FrameIndex RZRI N 0 53
|
||||
FrameIndex RZRI O 0 54
|
||||
FrameIndex RZRI P 0 55
|
||||
FrameIndex RZRI Q 0 56
|
||||
FrameIndex RZRI R 0 57
|
||||
FrameIndex RZRI S 0 58
|
||||
FrameIndex RZRI T 0 59
|
||||
FrameIndex RZRI U 0 60
|
||||
FrameIndex RZRI V 0 61
|
||||
FrameIndex RZRI W 0 62
|
||||
FrameIndex RZRI X 0 63
|
||||
FrameIndex RZRI Y 0 64
|
||||
FrameIndex RZRI Z 0 65
|
||||
FrameIndex RZI2 A 0 66
|
||||
FrameIndex RZI2 B 0 67
|
||||
FrameIndex RZI2 C 0 68
|
||||
FrameIndex RZI2 D 0 69
|
||||
FrameIndex RZI2 E 0 70
|
||||
// AltFire1
|
||||
FrameIndex RZRA A 0 71
|
||||
FrameIndex RZRA B 0 72
|
||||
FrameIndex RZRA C 0 73
|
||||
FrameIndex RZRA D 0 74
|
||||
FrameIndex RZRA E 0 75
|
||||
FrameIndex RZRA F 0 76
|
||||
FrameIndex RZRA G 0 77
|
||||
FrameIndex RZRA H 0 78
|
||||
FrameIndex RZRA I 0 79
|
||||
FrameIndex RZRA J 0 80
|
||||
FrameIndex RZRA K 0 81
|
||||
FrameIndex RZRA L 0 82
|
||||
// AltFire2
|
||||
FrameIndex RZRA M 0 83
|
||||
FrameIndex RZRA N 0 84
|
||||
FrameIndex RZRA O 0 85
|
||||
FrameIndex RZRA P 0 86
|
||||
FrameIndex RZRA Q 0 87
|
||||
// AltFire3
|
||||
FrameIndex RZRA R 0 88
|
||||
FrameIndex RZRA S 0 89
|
||||
FrameIndex RZRA T 0 90
|
||||
FrameIndex RZRA U 0 91
|
||||
// Down
|
||||
FrameIndex RZRD A 0 92
|
||||
FrameIndex RZRD B 0 93
|
||||
FrameIndex RZRD C 0 94
|
||||
FrameIndex RZRD D 0 95
|
||||
FrameIndex RZRD E 0 96
|
||||
FrameIndex RZRD F 0 97
|
||||
FrameIndex RZRD G 0 98
|
||||
FrameIndex RZRD H 0 99
|
||||
}
|
||||
|
|
|
|||
BIN
models/FireEffect54.png
Normal file
BIN
models/FireEffect54.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
|
|
@ -174,6 +174,8 @@ stinger/flesh chunkhit
|
|||
|
||||
flak/click click
|
||||
|
||||
eightball/fly brocket
|
||||
|
||||
asmd/vapour vapour
|
||||
|
||||
dampener/on dampsnd
|
||||
|
|
|
|||
|
|
@ -361,10 +361,31 @@ Class ASMDBall : Actor
|
|||
if ( BlockingLine ) HitNormal = (-BlockingLine.delta.y,BlockingLine.delta.x,0).unit();
|
||||
else if ( BlockingFloor )
|
||||
{
|
||||
HitNormal = BlockingFloor.floorplane.Normal;
|
||||
// find closest 3d floor for its normal
|
||||
F3DFloor ff = null;
|
||||
for ( int i=0; i<BlockingFloor.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(BlockingFloor.Get3DFloor(i).top.ZAtPoint(pos.xy) ~== floorz) ) continue;
|
||||
ff = BlockingFloor.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.top.Normal;
|
||||
else HitNormal = BlockingFloor.floorplane.Normal;
|
||||
r.SetOrigin(r.Vec3Offset(0,0,2),false);
|
||||
}
|
||||
else if ( BlockingCeiling ) HitNormal = BlockingCeiling.ceilingplane.Normal;
|
||||
else if ( BlockingCeiling )
|
||||
{
|
||||
// find closest 3d floor for its normal
|
||||
F3DFloor ff = null;
|
||||
for ( int i=0; i<BlockingCeiling.Get3DFloorCount(); i++ )
|
||||
{
|
||||
if ( !(BlockingCeiling.Get3DFloor(i).bottom.ZAtPoint(pos.xy) ~== ceilingz) ) continue;
|
||||
ff = BlockingCeiling.Get3DFloor(i);
|
||||
break;
|
||||
}
|
||||
if ( ff ) HitNormal = -ff.bottom.Normal;
|
||||
else HitNormal = BlockingCeiling.ceilingplane.Normal;
|
||||
}
|
||||
r.angle = atan2(HitNormal.y,HitNormal.x);
|
||||
r.pitch = asin(-HitNormal.z);
|
||||
r.scale *= 1.5;
|
||||
|
|
@ -589,9 +610,15 @@ Class ASMDBeam : Actor
|
|||
if ( t.Results.Side == 0 ) HitNormal *= -1;
|
||||
}
|
||||
else if ( t.Results.HitType == TRACE_HitFloor )
|
||||
HitNormal = t.Results.HitSector.floorplane.Normal;
|
||||
{
|
||||
if ( t.Results.ffloor ) HitNormal = -t.Results.ffloor.top.Normal;
|
||||
else HitNormal = t.Results.HitSector.floorplane.Normal;
|
||||
}
|
||||
else if ( t.Results.HitType == TRACE_HitCeiling )
|
||||
HitNormal = t.Results.HitSector.ceilingplane.Normal;
|
||||
{
|
||||
if ( t.Results.ffloor ) HitNormal = -t.Results.ffloor.bottom.Normal;
|
||||
else HitNormal = t.Results.HitSector.ceilingplane.Normal;
|
||||
}
|
||||
double mult = Amplifier.GetMult(target,100);
|
||||
BeamExplode(mult>1.5);
|
||||
Actor r;
|
||||
|
|
|
|||
|
|
@ -196,8 +196,16 @@ Class Automag : UnrealWeapon
|
|||
else if ( d.HitType != TRACE_HitNone )
|
||||
{
|
||||
Vector3 hitnormal = -d.HitDir;
|
||||
if ( d.HitType == TRACE_HitFloor ) hitnormal = d.HitSector.floorplane.Normal;
|
||||
else if ( d.HitType == TRACE_HitCeiling ) hitnormal = d.HitSector.ceilingplane.Normal;
|
||||
if ( d.HitType == TRACE_HitFloor )
|
||||
{
|
||||
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.top.Normal;
|
||||
else hitnormal = d.HitSector.floorplane.Normal;
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitCeiling )
|
||||
{
|
||||
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.bottom.Normal;
|
||||
else hitnormal = d.HitSector.ceilingplane.Normal;
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitWall )
|
||||
{
|
||||
hitnormal = (-d.HitLine.delta.y,d.HitLine.delta.x,0).unit();
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ Class DispersionPistol : UnrealWeapon
|
|||
A_WeaponOffset(0,32);
|
||||
invoker.bCharging = false;
|
||||
if ( self is 'UTPlayer' )
|
||||
UTPlayer(self).PlayAttacking();
|
||||
UTPlayer(self).PlayAttacking3();
|
||||
DefaultAmmo(weap.Ammo1).rechargephase = 0;
|
||||
A_PlaySound("dpistol/fire",CHAN_WEAPON,Dampener.Active(self)?.4:1.);
|
||||
double mult = Amplifier.GetMult(self,int(invoker.ChargeSize*50)+50);
|
||||
|
|
|
|||
|
|
@ -1444,7 +1444,28 @@ Class SentryItem : UnrealInventory
|
|||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
else
|
||||
{
|
||||
// TODO replace
|
||||
let r = Spawn("Berserk",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
}
|
||||
Destroy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,13 +38,9 @@ Class OLSMPAmmo : Ammo
|
|||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
else Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
Default
|
||||
{
|
||||
|
|
@ -187,8 +183,16 @@ Class OLSMP : UnrealWeapon
|
|||
else if ( d.HitType != TRACE_HitNone )
|
||||
{
|
||||
Vector3 hitnormal = -d.HitDir;
|
||||
if ( d.HitType == TRACE_HitFloor ) hitnormal = d.HitSector.floorplane.Normal;
|
||||
else if ( d.HitType == TRACE_HitCeiling ) hitnormal = d.HitSector.ceilingplane.Normal;
|
||||
if ( d.HitType == TRACE_HitFloor )
|
||||
{
|
||||
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.top.Normal;
|
||||
else hitnormal = d.HitSector.floorplane.Normal;
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitCeiling )
|
||||
{
|
||||
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.bottom.Normal;
|
||||
else hitnormal = d.HitSector.ceilingplane.Normal;
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitWall )
|
||||
{
|
||||
hitnormal = (-d.HitLine.delta.y,d.HitLine.delta.x,0).unit();
|
||||
|
|
|
|||
|
|
@ -26,19 +26,222 @@ Class RazorAmmo : Ammo
|
|||
|
||||
Class RazorBlade : Actor
|
||||
{
|
||||
Vector3 gvel, accel;
|
||||
double oldgangle, gangle, oldgpitch, gpitch;
|
||||
|
||||
Default
|
||||
{
|
||||
Radius 2;
|
||||
Height 2;
|
||||
Speed 25;
|
||||
DamageFunction (int((30+special1*5)*((DamageType=='Decapitated')?3.5:1.0)));
|
||||
DamageType 'Shredded';
|
||||
Obituary "$O_RAZORJACK";
|
||||
BounceType "Hexen";
|
||||
ReactionTime 5;
|
||||
BounceFactor 1.0;
|
||||
WallBounceFactor 1.0;
|
||||
PROJECTILE;
|
||||
+USEBOUNCESTATE;
|
||||
+SKYEXPLODE;
|
||||
+CANBOUNCEWATER;
|
||||
+NODAMAGETHRUST;
|
||||
+DONTBOUNCEONSHOOTABLES;
|
||||
+ROLLSPRITE;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
let t = Spawn("RazorBladeTrail",pos);
|
||||
t.target = self;
|
||||
frame = special1;
|
||||
if ( special1 > 0 )
|
||||
{
|
||||
vel *= 1.+.06+special1;
|
||||
A_PlaySound("ripper/hum",CHAN_VOICE,1.0,true,3.0,pitch:3.125+special1*.2);
|
||||
}
|
||||
else A_PlaySound("ripper/hum",CHAN_VOICE,1.0,true,3.0,pitch:3.125);
|
||||
Vector3 dir = vel.unit();
|
||||
A_SetAngle(atan2(dir.y,dir.x));
|
||||
A_SetPitch(asin(-dir.z));
|
||||
frame = 0;
|
||||
gvel = vel;
|
||||
oldgangle = gangle = angle;
|
||||
oldgpitch = gpitch = pitch;
|
||||
}
|
||||
override int SpecialMissileHit( Actor victim )
|
||||
{
|
||||
if ( pos.z > victim.pos.z+victim.height*0.81 ) DamageType = 'Decapitated';
|
||||
return -1;
|
||||
}
|
||||
override int DoSpecialDamage( Actor target, int damage, Name damagetype )
|
||||
{
|
||||
if ( !target.bNOBLOOD )
|
||||
{
|
||||
target.SpawnBlood(pos,AngleTo(target),damage);
|
||||
A_PlaySound("ripper/flesh");
|
||||
A_AlertMonsters();
|
||||
}
|
||||
UTMainHandler.DoKnockback(target,vel.unit(),15000);
|
||||
return damage;
|
||||
}
|
||||
void A_RazorAltOrient()
|
||||
{
|
||||
if ( !bAMBUSH || !target || !target.player || (target.Health <= 0) ) return;
|
||||
if ( sting_razoraim )
|
||||
{
|
||||
FLineTraceData d;
|
||||
target.LineTrace(target.angle,10000,target.pitch,0,target.player.viewheight,data:d);
|
||||
Vector3 SeekingDir = level.Vec3Diff(pos,d.HitLocation).unit();
|
||||
double MagnitudeVel = Vel.length();
|
||||
SeekingDir = (SeekingDir*0.1*MagnitudeVel+Vel).unit();
|
||||
vel = MagnitudeVel * SeekingDir;
|
||||
accel = SeekingDir * 25.;
|
||||
vel += accel/TICRATE;
|
||||
vel = vel.unit()*clamp(MagnitudeVel,10,15);
|
||||
}
|
||||
else
|
||||
{
|
||||
double dangle, dpitch;
|
||||
dangle = deltaangle(oldgangle,target.angle);
|
||||
dpitch = deltaangle(oldgpitch,target.pitch);
|
||||
gangle += dangle;
|
||||
gpitch += dpitch;
|
||||
vel += (cos(gangle)*cos(gpitch),sin(gangle)*cos(gpitch),-sin(gpitch))*15./TICRATE;
|
||||
double spd = vel.length();
|
||||
vel = vel*clamp(spd,10,15)/spd;
|
||||
gvel = vel;
|
||||
oldgangle = target.angle;
|
||||
oldgpitch = target.pitch;
|
||||
}
|
||||
Vector3 dir = vel.unit();
|
||||
A_SetAngle(atan2(dir.y,dir.x));
|
||||
A_SetPitch(asin(-dir.z));
|
||||
}
|
||||
action void A_RazorHit()
|
||||
{
|
||||
A_PlaySound("ripper/hit");
|
||||
A_AlertMonsters();
|
||||
A_SprayDecal("WallCrack",-20);
|
||||
int numpt = Random[Ripper](5,10);
|
||||
Vector3 x = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (-x+(FRandom[Ripper](-.8,.8),FRandom[Ripper](-.8,.8),FRandom[Ripper](-.8,.8))).unit()*FRandom[Ripper](0.1,1.2);
|
||||
let s = Spawn("UTSmoke",pos);
|
||||
s.vel = pvel;
|
||||
s.SetShade(Color(1,1,1)*Random[Ripper](128,192));
|
||||
}
|
||||
numpt = Random[Ripper](4,12);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[Ripper](-1,1),FRandom[Ripper](-1,1),FRandom[Ripper](-1,1)).unit()*FRandom[Ripper](2,8);
|
||||
let s = Spawn("UTSpark",pos);
|
||||
s.vel = pvel;
|
||||
}
|
||||
numpt = Random[Ripper](4,8);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[Ripper](-1,1),FRandom[Ripper](-1,1),FRandom[Ripper](-1,1)).unit()*FRandom[Ripper](2,8);
|
||||
let s = Spawn("UTChip",pos);
|
||||
s.vel = pvel;
|
||||
}
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
RAZB # 1 A_RazorAltOrient();
|
||||
Wait;
|
||||
Bounce:
|
||||
RAZB # 0
|
||||
{
|
||||
bHITOWNER = true; // technically the Unreal version sets this 0.2 seconds after being fired, but this works better
|
||||
Vector3 dir = vel.unit();
|
||||
A_SetAngle(atan2(dir.y,dir.x));
|
||||
A_SetPitch(asin(-dir.z));
|
||||
A_RazorHit();
|
||||
A_CountDown();
|
||||
}
|
||||
Goto Spawn;
|
||||
Death:
|
||||
TNT1 A 1 A_StopSound(CHAN_VOICE);
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
Class RazorBladeAlt : RazorBlade
|
||||
Class RazorBladeTrail : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
RenderStyle "Add";
|
||||
+NOGRAVITY;
|
||||
+NOCLIP;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
Radius 0.1;
|
||||
Height 0;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
if ( !target || target.InStateSequence(target.CurState,target.ResolveState("Death")) )
|
||||
{
|
||||
A_RemoveLight('RazorLight');
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
SetOrigin(target.pos,true);
|
||||
angle = target.angle;
|
||||
pitch = target.pitch;
|
||||
roll = target.roll;
|
||||
alpha = min(target.vel.length()/target.speed,1.);
|
||||
A_AttachLight('RazorLight',DynamicLight.PointLight,Color(2,0,3)*int(80*alpha),80,80);
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
RAZB A -1 Bright;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
Class Razorjack : UnrealWeapon
|
||||
{
|
||||
action void A_RazorFire( bool bAlt = false )
|
||||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
||||
A_PlaySound("ripper/fire",CHAN_WEAPON,pitch:bAlt?1.:(1.+invoker.special1*.1));
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(16,255,0,255),1);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
|
||||
if ( bAlt ) UTMainHandler.DoSwing(self,(FRandom[Ripper](-0.6,-0.3),FRandom[Ripper](0.2,0.4)),1,-0.3,2,SWING_Spring,2,2);
|
||||
else UTMainHandler.DoSwing(self,(FRandom[Ripper](-0.3,0.3),FRandom[Ripper](0.2,0.6)),1,-0.3,2,SWING_Spring,2,2);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz);
|
||||
if ( bAlt ) origin = level.Vec3Offset(origin,x*10-y*4-z*5);
|
||||
else origin = level.Vec3Offset(origin,x*10-z*9);
|
||||
Actor p;
|
||||
p = Spawn("RazorBlade",origin);
|
||||
if ( bAlt )
|
||||
{
|
||||
p.roll = 70;
|
||||
p.bAMBUSH = true;
|
||||
}
|
||||
else p.special1 = invoker.special1;
|
||||
p.angle = angle;
|
||||
p.pitch = BulletSlope();
|
||||
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
|
||||
p.target = self;
|
||||
}
|
||||
Default
|
||||
{
|
||||
Tag "$T_RAZORJACK";
|
||||
Inventory.PickupMessage "$I_RAZORJACK";
|
||||
Weapon.UpSound "razorjack/select";
|
||||
Weapon.UpSound "ripper/select";
|
||||
Weapon.SlotNumber 7;
|
||||
Weapon.SelectionOrder 7;
|
||||
Weapon.AmmoType "RazorAmmo";
|
||||
|
|
@ -55,5 +258,56 @@ Class Razorjack : UnrealWeapon
|
|||
Stop;
|
||||
RZRP B -1;
|
||||
Stop;
|
||||
Select:
|
||||
RZRS A 1 A_Raise(int.max);
|
||||
Wait;
|
||||
Ready:
|
||||
RZRS ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_WeaponReady(WRF_NOFIRE);
|
||||
RZS2 ABCD 1 A_WeaponReady(WRF_NOFIRE);
|
||||
Idle:
|
||||
RZRI ABCDEFGHIJKLMNOPQRSUVWXYZ 2
|
||||
{
|
||||
A_CheckReload();
|
||||
A_WeaponReady();
|
||||
}
|
||||
RZI2 ABCDE 2
|
||||
{
|
||||
A_CheckReload();
|
||||
A_WeaponReady();
|
||||
}
|
||||
Loop;
|
||||
Fire:
|
||||
RZRI A 0
|
||||
{
|
||||
invoker.special1 = 0;
|
||||
return A_JumpIf(sting_razor,"ChargeUp");
|
||||
}
|
||||
Release:
|
||||
RZRF A 0 A_RazorFire();
|
||||
RZRF ABCDEFGH 2;
|
||||
Goto Idle;
|
||||
ChargeUp:
|
||||
RZRI ABCDEFGHIJKLMNOPQRSUVWXYZ 1 A_JumpIf(!(player.cmd.buttons&BT_ATTACK),"Release");
|
||||
RZI2 ABCDE 1 A_JumpIf(!(player.cmd.buttons&BT_ATTACK),"Release");
|
||||
RZRI A 0 { invoker.special1 = 1; }
|
||||
RZRI ACEGIKMOQSVXZ 1 A_JumpIf(!(player.cmd.buttons&BT_ATTACK),"Release");
|
||||
RZI2 BD 1 A_JumpIf(!(player.cmd.buttons&BT_ATTACK),"Release");
|
||||
RZRI A 0 { invoker.special1 = 2; }
|
||||
RZRI ADGJMPSWZ 1 A_JumpIf(!(player.cmd.buttons&BT_ATTACK),"Release");
|
||||
RZI2 C 1 A_JumpIf(!(player.cmd.buttons&BT_ATTACK),"Release");
|
||||
RZRI A 0 { invoker.special1 = 3; }
|
||||
Goto Release;
|
||||
AltFire:
|
||||
RZRA ABCDEFGHIJKL 1;
|
||||
AltHold:
|
||||
RZRA M 0 A_RazorFire(true);
|
||||
RZRA MNOP 4;
|
||||
RZRA Q 0 A_ReFire("AltHold");
|
||||
RZRA QRSTU 2;
|
||||
Goto Idle;
|
||||
Deselect:
|
||||
RZRD ABCDEF 1;
|
||||
RZRD F 1 A_Lower(int.max);
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ Class URocket : Actor
|
|||
A_SetRenderStyle(1.0,STYLE_Add);
|
||||
A_SprayDecal("RocketBlast",50);
|
||||
A_NoGravity();
|
||||
A_SetScale(FRandomPick[ExploS](-1.5,1.5),FRandomPick[ExploS](-1.5,1.5));
|
||||
A_SetScale(FRandomPick[ExploS](-2.5,2.5),FRandomPick[ExploS](-2.5,2.5));
|
||||
UTMainHandler.DoBlast(self,rad,80000);
|
||||
A_Explode(dmg,rad);
|
||||
A_QuakeEx(3,3,3,8,0,rad+50,"",QF_RELATIVE|QF_SCALEDOWN,falloff:rad,rollIntensity:0.2);
|
||||
|
|
|
|||
|
|
@ -228,10 +228,21 @@ Class UPlayer : UTPlayer
|
|||
// no animation if crouched
|
||||
if ( (player && (player.mo == self)) && (player.crouchdir == -1) ) return;
|
||||
// check weapon type
|
||||
if ( ((player.ReadyWeapon is 'URifle') && !sting_rifle && (player.buttons&BT_ALTATTACK)) || ((player.ReadyWeapon is 'Peacemaker') && player.buttons&BT_ALTATTACK) )
|
||||
return;
|
||||
let psp = player.FindPSprite(PSP_WEAPON);
|
||||
if ( ((player.ReadyWeapon is 'Stinger') && psp
|
||||
&& psp.CurState.InStateSequence(player.ReadyWeapon.FindState("Hold")))
|
||||
if ( ((player.ReadyWeapon is 'UBioRifle') && (player.buttons&BT_ALTATTACK))
|
||||
|| (player.ReadyWeapon is 'Eightball')
|
||||
|| ((player.ReadyWeapon is 'DispersionPistol') && DispersionPistol(player.ReadyWeapon).bCharging) )
|
||||
{
|
||||
if ( !InStateSequence(CurState,FindState("MissileRepStill")) )
|
||||
SetStateLabel("MissileRepStill");
|
||||
}
|
||||
else if ( ((player.ReadyWeapon is 'Stinger') && psp
|
||||
&& psp.CurState.InStateSequence(player.ReadyWeapon.FindState("Hold")))
|
||||
|| (player.ReadyWeapon is 'UFlamethrower') || (player.ReadyWeapon is 'UMinigun')
|
||||
|| ((player.ReadyWeapon is 'Bonesaw') && player.buttons&BT_ATTACK)
|
||||
|| ((player.ReadyWeapon is 'Impaler') && psp.CurState.InStateSequence(player.ReadyWeapon.FindState("AltHold"))) )
|
||||
{
|
||||
if ( !InStateSequence(CurState,FindState("MissileRep")) )
|
||||
SetStateLabel("MissileRep");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Class UInvisibility : UnrealInventory
|
|||
bActive = !bActive;
|
||||
if ( bActive )
|
||||
{
|
||||
Owner.A_PlaySound("uinvis/toggle",CHAN_ITEM);
|
||||
Owner.A_PlaySound("invis/pickup",CHAN_ITEM);
|
||||
Owner.GiveInventory("PowerUInvisibility",1);
|
||||
}
|
||||
else Owner.TakeInventory("PowerUInvisibility",1);
|
||||
|
|
@ -244,12 +244,11 @@ Class UJumpBoots : UnrealInventory
|
|||
{
|
||||
Sector s = level.Sectors[i];
|
||||
if ( s.MoreFlags&(Sector.SECMF_UNDERWATER|Sector.SECMF_FORCEDUNDERWATER) ) foundswim = true;
|
||||
for ( int i=0; i<s.Get3DFloorCount(); i++ )
|
||||
if ( s.Get3DFloor(i).flags&F3DFloor.FF_SWIMMABLE ) foundswim = true;
|
||||
if ( !s.DamageInterval || !s.DamageAmount ) continue;
|
||||
if ( s.DamageType == 'Slime' ) foundslime = true;
|
||||
else if ( s.DamageType == 'Fire' ) foundlava = true;
|
||||
// 3d floors don't set the underwater flags or anything so we're completely screwed until Graf merges my goddamn PR
|
||||
//for ( int i=0; i<s.Get3DFloorCount(); i++ )
|
||||
// if ( s.Get3DFloor(i).flags&F3DFloor.FF_SWIMMABLE ) foundswim = true;
|
||||
}
|
||||
// random chance to ignore if a replacement already was made
|
||||
let ti = ThinkerIterator.Create("Inventory");
|
||||
|
|
@ -448,6 +447,7 @@ Class DetectorSound : Actor
|
|||
|
||||
Class SCUBAGear : UnrealInventory
|
||||
{
|
||||
int oldwaterlevel;
|
||||
Default
|
||||
{
|
||||
Tag "$T_SCUBA";
|
||||
|
|
@ -464,6 +464,11 @@ Class SCUBAGear : UnrealInventory
|
|||
if ( !bActive ) Owner.A_PlaySound("scuba/stop",CHAN_ITEM);
|
||||
return false;
|
||||
}
|
||||
override void AttachToOwner( Actor other )
|
||||
{
|
||||
Super.AttachToOwner(other);
|
||||
oldwaterlevel = other.waterlevel;
|
||||
}
|
||||
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
|
||||
{
|
||||
if ( bActive && (damageType == 'Drowning') )
|
||||
|
|
@ -472,8 +477,16 @@ Class SCUBAGear : UnrealInventory
|
|||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( sting_autoscuba && ((bActive && (Owner.waterlevel < 2)) || (!bActive && (Owner.waterlevel > 2))) )
|
||||
Use(false);
|
||||
if ( (oldwaterlevel < 2) && (owner.waterlevel > 2) )
|
||||
{
|
||||
if ( sting_autoscuba && !bActive ) Use(false);
|
||||
oldwaterlevel = owner.waterlevel;
|
||||
}
|
||||
else if ( (oldwaterlevel > 2) && (owner.waterlevel < 2) )
|
||||
{
|
||||
if ( sting_autoscuba && bActive ) Use(false);
|
||||
oldwaterlevel = owner.waterlevel;
|
||||
}
|
||||
if ( bActive && !tracer )
|
||||
{
|
||||
tracer = Spawn("SCUBASound",Owner.pos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue