Impaler primary fire and melee mostly implemented.
Smol tweaks.
This commit is contained in:
parent
144935b4d5
commit
2f4dab1600
6 changed files with 223 additions and 10 deletions
|
|
@ -66,16 +66,16 @@ user bool sting_transext = false; // use an extended translator graphic
|
||||||
// thanks Kynikoss for this, it's much
|
// thanks Kynikoss for this, it's much
|
||||||
// better than the trash garbage mods
|
// better than the trash garbage mods
|
||||||
// use
|
// use
|
||||||
server bool sting_olsmp = false; // adds the stupid oldskool SMP 7243 to
|
server bool sting_olsmp = true; // adds the stupid oldskool SMP 7243 to
|
||||||
// the BFG/Redeemer replacement pool
|
// the BFG/Redeemer replacement pool
|
||||||
// this weapon is dumb, but just for
|
// this weapon is dumb, but just for
|
||||||
// the sake of completion it's there as
|
// the sake of completion it's there as
|
||||||
// an option
|
// an option
|
||||||
server bool sting_msentry = false; // allows the new Minigun Sentry, which
|
server bool sting_msentry = true; // allows the new Minigun Sentry, which
|
||||||
// is an original creation for this mod
|
// is an original creation for this mod
|
||||||
server bool sting_dubious = false; // allows weapons of dubious origin
|
server bool sting_dubious = true; // allows weapons of dubious origin
|
||||||
// (Demolisher, Razorclaw, Autocannon)
|
// (Demolisher, Razorclaw, Autocannon)
|
||||||
server bool sting_autoscuba = false; // SCUBA gear toggles automatically
|
server bool sting_autoscuba = true; // SCUBA gear toggles automatically
|
||||||
// when needed
|
// when needed
|
||||||
server bool sting_ehold = false; // eightball can be held fully loaded
|
server bool sting_ehold = false; // eightball can be held fully loaded
|
||||||
// for up to 2 seconds
|
// for up to 2 seconds
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,38 @@ Model "ImpalerAmmo2"
|
||||||
FrameIndex IAMO A 0 0
|
FrameIndex IAMO A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ImpalerChunk"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "burstx_d.3d"
|
||||||
|
Skin 0 "JIBurst1.png"
|
||||||
|
Scale 0.2 0.2 0.24
|
||||||
|
USEACTORPITCH
|
||||||
|
USEACTORROLL
|
||||||
|
|
||||||
|
FrameIndex CHIP A 0 0
|
||||||
|
FrameIndex CHIP B 0 1
|
||||||
|
FrameIndex CHIP C 0 2
|
||||||
|
FrameIndex CHIP D 0 3
|
||||||
|
FrameIndex CHIP E 0 4
|
||||||
|
FrameIndex CHIP F 0 5
|
||||||
|
FrameIndex CHIP G 0 6
|
||||||
|
FrameIndex CHIP H 0 7
|
||||||
|
FrameIndex CHIP I 0 8
|
||||||
|
}
|
||||||
|
|
||||||
|
Model "ImpalerProjectile"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "ImpalerProj_d.3d"
|
||||||
|
Skin 0 "JImpale1.png"
|
||||||
|
Scale 0.15 0.15 0.18
|
||||||
|
PITCHFROMMOMENTUM
|
||||||
|
USEACTORROLL
|
||||||
|
|
||||||
|
FrameIndex TPRJ A 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "Impaler"
|
Model "Impaler"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
|
||||||
BIN
models/Jiburst1.png
Normal file
BIN
models/Jiburst1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
|
|
@ -31,6 +31,110 @@ Class ImpalerAmmo2 : ImpalerAmmo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Class ImpalerChunk : StingerChunk
|
||||||
|
{
|
||||||
|
override void Tick()
|
||||||
|
{
|
||||||
|
Super.Tick();
|
||||||
|
if ( isFrozen() ) return;
|
||||||
|
let c = Spawn("UTSmoke",pos);
|
||||||
|
c.vel = vel*.3;
|
||||||
|
c.SetShade(Color(4,1,3)*Random[Impaler](48,63));
|
||||||
|
c.bBRIGHT = true;
|
||||||
|
c.alpha *= .5*alpha;
|
||||||
|
c.scale *= .5*scale.x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpalerBurstLight : PaletteLight
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "ImpExpl";
|
||||||
|
Args 0,0,0,50;
|
||||||
|
ReactionTime 15;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpalerProjectile : Actor
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Obituary "$O_IMPALER1";
|
||||||
|
DamageType 'Impaler';
|
||||||
|
Speed 30;
|
||||||
|
Radius 4;
|
||||||
|
Height 4;
|
||||||
|
PROJECTILE;
|
||||||
|
+SKYEXPLODE;
|
||||||
|
+EXPLODEONWATER;
|
||||||
|
+FORCERADIUSDMG;
|
||||||
|
+NODAMAGETHRUST;
|
||||||
|
}
|
||||||
|
action void A_ImpalerHit()
|
||||||
|
{
|
||||||
|
bFORCEXYBILLBOARD = true;
|
||||||
|
scale *= 2.+special1*0.01;
|
||||||
|
A_AlertMonsters();
|
||||||
|
A_SetRenderStyle(1.,STYLE_Add);
|
||||||
|
A_NoGravity();
|
||||||
|
A_Explode(90+special1,120+special1/2);
|
||||||
|
UTMainHandler.DoBlast(self,120+special1/2,40000);
|
||||||
|
A_QuakeEx(2,2,2,5,0,250+special1/2,"",QF_RELATIVE|QF_SCALEDOWN,falloff:120+special1/2,rollintensity:0.2);
|
||||||
|
A_PlaySound("impaler/hit",CHAN_VOICE);
|
||||||
|
A_SprayDecal("WallCrack",20);
|
||||||
|
Spawn("ImpalerBurstLight",pos);
|
||||||
|
double ang, pt;
|
||||||
|
int numpt = Random[Impaler](4,8);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
ang = FRandom[Impaler](0,360);
|
||||||
|
pt = FRandom[Impaler](-90,90);
|
||||||
|
let c = Spawn("ImpalerChunk",pos);
|
||||||
|
c.angle = ang;
|
||||||
|
c.pitch = pt;
|
||||||
|
c.vel = (cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*FRandom[Impaler](3,9);
|
||||||
|
}
|
||||||
|
numpt = Random[Impaler](6,12);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
ang = FRandom[Impaler](0,360);
|
||||||
|
pt = FRandom[Impaler](-90,90);
|
||||||
|
let c = Spawn("UTSmoke",pos);
|
||||||
|
c.vel = (cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*FRandom[Impaler](.3,.8);
|
||||||
|
c.SetShade(Color(4,1,3)*Random[Impaler](48,63));
|
||||||
|
c.bBRIGHT = true;
|
||||||
|
c.alpha *= .5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
TPRJ A -1;
|
||||||
|
Stop;
|
||||||
|
Death:
|
||||||
|
TNT1 A 0 A_ImpalerHit();
|
||||||
|
TNT1 A 0 A_Jump(256,"Explo1","Explo2","Explo3");
|
||||||
|
Explo1:
|
||||||
|
IEX1 ABCDEFGHIJKLM 1 Bright;
|
||||||
|
Stop;
|
||||||
|
Explo2:
|
||||||
|
IEX2 ABCDEFGHIJKLM 1 Bright;
|
||||||
|
Stop;
|
||||||
|
Explo3:
|
||||||
|
IEX3 ABCDEFGHIJKLM 1 Bright;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpalerLight : EnforcerLight
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
args 255,128,224,80;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Class Impaler : UnrealWeapon
|
Class Impaler : UnrealWeapon
|
||||||
{
|
{
|
||||||
int ClipCount;
|
int ClipCount;
|
||||||
|
|
@ -48,9 +152,24 @@ Class Impaler : UnrealWeapon
|
||||||
A_Overlay(-9999,"Null");
|
A_Overlay(-9999,"Null");
|
||||||
A_Overlay(-3,"Null");
|
A_Overlay(-3,"Null");
|
||||||
A_Overlay(-2,"Null");
|
A_Overlay(-2,"Null");
|
||||||
A_PlaySound("impaler/fire",CHAN_WEAPON);
|
A_PlaySound("impaler/fire",CHAN_WEAPON,Dampener.Active(self)?.1:1.);
|
||||||
|
invoker.FireEffect();
|
||||||
|
UTMainHandler.DoFlash(self,Color(16,224,64,255),1);
|
||||||
|
UTMainHandler.DoSwing(self,(FRandom[Impaler](-0.1,-0.2),FRandom[Impaler](-0.1,0.1)),4,-1.5,2,SWING_Spring,2,2);
|
||||||
|
if ( !Dampener.Active(self) ) A_AlertMonsters();
|
||||||
|
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||||
invoker.HasGem = false;
|
invoker.HasGem = false;
|
||||||
invoker.ClipCount = -1;
|
invoker.ClipCount = -1;
|
||||||
|
Vector3 x, y, z;
|
||||||
|
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||||
|
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4*y-4*z);
|
||||||
|
Actor p = Spawn("ImpalerProjectile",origin);
|
||||||
|
p.angle = angle;
|
||||||
|
p.pitch = BulletSlope();
|
||||||
|
p.roll = FRandom[Impaler](0,360);
|
||||||
|
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
|
||||||
|
p.target = self;
|
||||||
|
p.special1 = invoker.clipcount*3;
|
||||||
}
|
}
|
||||||
action void A_StartBeam()
|
action void A_StartBeam()
|
||||||
{
|
{
|
||||||
|
|
@ -61,6 +180,52 @@ Class Impaler : UnrealWeapon
|
||||||
action void A_StopBeam()
|
action void A_StopBeam()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
private action bool TryHit( double angle, int dmg )
|
||||||
|
{
|
||||||
|
FTranslatedLineTarget t;
|
||||||
|
double slope = AimLineAttack(angle,DEFMELEERANGE*1.5,t,0.,ALF_CHECK3D);
|
||||||
|
FLineTraceData d;
|
||||||
|
Vector3 x, y, z, origin;
|
||||||
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
|
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),y*4-z*4);
|
||||||
|
LineTrace(angle,DEFMELEERANGE*1.5,slope,TRF_ABSPOSITION,origin.z,origin.x,origin.y,data:d);
|
||||||
|
if ( d.HitType != TRACE_HitNone )
|
||||||
|
{
|
||||||
|
if ( d.HitType == TRACE_HitActor )
|
||||||
|
{
|
||||||
|
if ( d.HitLocation.z >= (d.HitActor.pos.z+d.HitActor.height*0.8) )
|
||||||
|
dmg = d.HitActor.DamageMobj(invoker,self,dmg*2,'Decapitated',DMG_USEANGLE|DMG_THRUSTLESS,atan2(d.HitDir.y,d.HitDir.x));
|
||||||
|
else dmg = d.HitActor.DamageMobj(invoker,self,dmg,'slashed',DMG_USEANGLE|DMG_THRUSTLESS,atan2(d.HitDir.y,d.HitDir.x));
|
||||||
|
UTMainHandler.DoKnockback(d.HitActor,d.HitDir,12000);
|
||||||
|
if ( d.HitActor.player ) d.HitActor.A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.25);
|
||||||
|
if ( !d.HitActor.bNOBLOOD )
|
||||||
|
{
|
||||||
|
d.HitActor.TraceBleed(dmg,invoker);
|
||||||
|
d.HitActor.SpawnBlood(d.HitLocation,atan2(d.HitDir.y,d.HitDir.x)+180,dmg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( d.HitType == TRACE_HitWall )
|
||||||
|
d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4);
|
||||||
|
A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
||||||
|
if ( !d.HitActor || d.HitActor.bNOBLOOD )
|
||||||
|
{
|
||||||
|
A_PlaySound("impaler/wall",CHAN_WEAPON);
|
||||||
|
let p = Spawn("SawImpact",d.HitLocation-d.HitDir*4);
|
||||||
|
p.angle = atan2(d.HitDir.y,d.HitDir.x);
|
||||||
|
p.pitch = asin(-d.HitDir.z);
|
||||||
|
}
|
||||||
|
else A_PlaySound("impaler/flesh",CHAN_WEAPON);
|
||||||
|
A_AlertMonsters();
|
||||||
|
A_QuakeEx(1,1,1,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.06);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
action void A_Stab()
|
||||||
|
{
|
||||||
|
UTMainHandler.DoSwing(self,(FRandom[Impaler](-1,1),FRandom[Impaler](-1,1)),0.3,-0.2,2,SWING_Spring,0,2);
|
||||||
|
for ( int i=0; i<8; i++ ) if ( TryHit(angle+i*(45./16),15) || TryHit(angle-i*(45./16),15) ) return;
|
||||||
|
}
|
||||||
override void DoEffect()
|
override void DoEffect()
|
||||||
{
|
{
|
||||||
Super.DoEffect();
|
Super.DoEffect();
|
||||||
|
|
@ -127,8 +292,14 @@ Class Impaler : UnrealWeapon
|
||||||
IMPI ABCDEFGH 10;
|
IMPI ABCDEFGH 10;
|
||||||
Goto Idle+1;
|
Goto Idle+1;
|
||||||
Melee:
|
Melee:
|
||||||
IMPM A 0 A_Overlay(-9999,"Null");
|
IMPM A 2
|
||||||
IMPM ABCDEFGHIJ 2;
|
{
|
||||||
|
A_Overlay(-9999,"Null");
|
||||||
|
A_PlaySound("impaler/stab",CHAN_WEAPON);
|
||||||
|
}
|
||||||
|
IMPM BC 2;
|
||||||
|
IMPM D 2 A_Stab();
|
||||||
|
IMPM EFGHIJ 2;
|
||||||
Goto Idle;
|
Goto Idle;
|
||||||
Fire:
|
Fire:
|
||||||
IMPF A 0
|
IMPF A 0
|
||||||
|
|
@ -247,5 +418,12 @@ Class Impaler : UnrealWeapon
|
||||||
ZapAltRelease:
|
ZapAltRelease:
|
||||||
IMZA QRSTUVWX 2 Bright;
|
IMZA QRSTUVWX 2 Bright;
|
||||||
Goto ZapIdle;
|
Goto ZapIdle;
|
||||||
|
MuzzleFlash:
|
||||||
|
IMFF A 3 Bright
|
||||||
|
{
|
||||||
|
let l = Spawn("ImpalerLight",pos);
|
||||||
|
l.target = self;
|
||||||
|
}
|
||||||
|
Stop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ Class UnrealBackpack : BackpackItem replaces Backpack
|
||||||
if ( !isvalid ) continue;
|
if ( !isvalid ) continue;
|
||||||
let ammoitem = Ammo(other.FindInventory(type));
|
let ammoitem = Ammo(other.FindInventory(type));
|
||||||
int amount = GetDefaultByType(type).BackpackAmount;
|
int amount = GetDefaultByType(type).BackpackAmount;
|
||||||
|
// don't give these at all
|
||||||
|
if ( (amount <= 0) && (GetDefaultByType(type).BackpackMaxAmount == GetDefaultByType(type).MaxAmount) ) continue;
|
||||||
// extra ammo in baby mode and nightmare mode
|
// extra ammo in baby mode and nightmare mode
|
||||||
if ( !bIgnoreSkill ) amount = int(amount*G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
if ( !bIgnoreSkill ) amount = int(amount*G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||||
if ( amount < 0 ) amount = 0;
|
if ( amount < 0 ) amount = 0;
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ Class FlameAmmo : Ammo
|
||||||
Tag "$T_FLAMEAMMO";
|
Tag "$T_FLAMEAMMO";
|
||||||
Inventory.Icon "I_Napalm";
|
Inventory.Icon "I_Napalm";
|
||||||
Inventory.PickupMessage "$I_FLAMEAMMO";
|
Inventory.PickupMessage "$I_FLAMEAMMO";
|
||||||
Inventory.Amount 75;
|
Inventory.Amount 60;
|
||||||
Inventory.MaxAmount 450;
|
Inventory.MaxAmount 450;
|
||||||
Ammo.BackpackAmount 0;
|
Ammo.BackpackAmount 30;
|
||||||
Ammo.BackpackMaxAmount 900;
|
Ammo.BackpackMaxAmount 900;
|
||||||
Ammo.DropAmount 30;
|
Ammo.DropAmount 30;
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +65,7 @@ Class OnFire : Thinker
|
||||||
amount--;
|
amount--;
|
||||||
amount -= int(victim.vel.length()/10);
|
amount -= int(victim.vel.length()/10);
|
||||||
}
|
}
|
||||||
amount -= int(abs(actor.deltaangle(victim.angle,oangle))/30);
|
if ( victim.player ) amount -= int(abs(actor.deltaangle(victim.angle,oangle))/30);
|
||||||
oangle = victim.angle;
|
oangle = victim.angle;
|
||||||
}
|
}
|
||||||
if ( (victim is 'UNapalm') && victim.InStateSequence(victim.CurState,victim.FindState("XDeath")) )
|
if ( (victim is 'UNapalm') && victim.InStateSequence(victim.CurState,victim.FindState("XDeath")) )
|
||||||
|
|
@ -146,6 +146,7 @@ Class OnFire : Thinker
|
||||||
t.delay = delay;
|
t.delay = delay;
|
||||||
t.lite = Actor.Spawn("OnFireLight",victim.pos);
|
t.lite = Actor.Spawn("OnFireLight",victim.pos);
|
||||||
OnFireLight(t.lite).of = t;
|
OnFireLight(t.lite).of = t;
|
||||||
|
t.oangle = victim.angle;
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue