From 2f4dab1600f051277832c845defd4b7aa95c4438 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 26 Sep 2019 16:51:13 +0200 Subject: [PATCH] Impaler primary fire and melee mostly implemented. Smol tweaks. --- cvarinfo.txt | 8 +- modeldef.impaler | 32 ++++++++ models/Jiburst1.png | Bin 0 -> 2933 bytes zscript/impaler.zsc | 184 +++++++++++++++++++++++++++++++++++++++++- zscript/miscitems.zsc | 2 + zscript/napalm.zsc | 7 +- 6 files changed, 223 insertions(+), 10 deletions(-) create mode 100644 models/Jiburst1.png diff --git a/cvarinfo.txt b/cvarinfo.txt index 8f98f81..f923da2 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -66,16 +66,16 @@ user bool sting_transext = false; // use an extended translator graphic // thanks Kynikoss for this, it's much // better than the trash garbage mods // 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 // this weapon is dumb, but just for // the sake of completion it's there as // 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 -server bool sting_dubious = false; // allows weapons of dubious origin +server bool sting_dubious = true; // allows weapons of dubious origin // (Demolisher, Razorclaw, Autocannon) -server bool sting_autoscuba = false; // SCUBA gear toggles automatically +server bool sting_autoscuba = true; // SCUBA gear toggles automatically // when needed server bool sting_ehold = false; // eightball can be held fully loaded // for up to 2 seconds diff --git a/modeldef.impaler b/modeldef.impaler index c20753c..f30c6cd 100644 --- a/modeldef.impaler +++ b/modeldef.impaler @@ -21,6 +21,38 @@ Model "ImpalerAmmo2" 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" { Path "models" diff --git a/models/Jiburst1.png b/models/Jiburst1.png new file mode 100644 index 0000000000000000000000000000000000000000..461625b49a4aef1623fe914e669da49e0c06806a GIT binary patch literal 2933 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9o4rT@hhPm4t-!L#Rz7OyTan0o{E9R;y<8G?v zYN_Y$Zs6{0=I(3bp3uoNp^s-$FVFNzyfdfp%%8?Hb0*KixqM3&^Q>CHw{V)!?72d7 zmh-J#%)f30-@3JYYvzkAT+6>Bx_h7a&Si>A zx5=zKCcgWi)YfyNhmJ_@U9Y%im)wT);(HFr?7Ap^z`nI#0yKkuPxT&%4u)(%V+Pkl7A2_eK`?Ai_8#?+ij#yZf@iw$mo- zZW!#iYO?K)(cZhpJ8zipx?{fkyzQ2Imb-3S@3?8Z?}6>ktB!kbJMMa5fAFEh_B*ay z@4N1M;=1p?$Nop2J0E!Me(baVssFxb!FwNs?s*cj|9RBG=W+XA$M1idc=&nB-j`_y zU#0DTkbV47(b2a>$6l43cw2e$RnwVwO=q5To`2hZ@=fQ(_njACbzgls;o`dqm)=gl z{9(qmkMpm7TzKW<;#;3r-TAoj?w3vXzU+MTb?2jR2cCXA{P@d>7vHbG{(0-&&-)*K zJ^lRq&9~%p#wH95oQ|F@jv*0;r-t`eUp^*jW+5QV8P9X*o#f4XKXujw#Kdp1I`!y= zp@mYJ=^36yozoct-BfMZ*Y0@2-gcvPi)!Spv}Da}=C@Yc>`T-m`{oMW@~fP8q;665 z``z!W?|=V&ZfebKd&WyX>%XF|^zRo#OWzv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ir.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() { Super.DoEffect(); @@ -127,8 +292,14 @@ Class Impaler : UnrealWeapon IMPI ABCDEFGH 10; Goto Idle+1; Melee: - IMPM A 0 A_Overlay(-9999,"Null"); - IMPM ABCDEFGHIJ 2; + IMPM A 2 + { + A_Overlay(-9999,"Null"); + A_PlaySound("impaler/stab",CHAN_WEAPON); + } + IMPM BC 2; + IMPM D 2 A_Stab(); + IMPM EFGHIJ 2; Goto Idle; Fire: IMPF A 0 @@ -247,5 +418,12 @@ Class Impaler : UnrealWeapon ZapAltRelease: IMZA QRSTUVWX 2 Bright; Goto ZapIdle; + MuzzleFlash: + IMFF A 3 Bright + { + let l = Spawn("ImpalerLight",pos); + l.target = self; + } + Stop; } } diff --git a/zscript/miscitems.zsc b/zscript/miscitems.zsc index 05ed3c8..b861ae2 100644 --- a/zscript/miscitems.zsc +++ b/zscript/miscitems.zsc @@ -28,6 +28,8 @@ Class UnrealBackpack : BackpackItem replaces Backpack if ( !isvalid ) continue; let ammoitem = Ammo(other.FindInventory(type)); 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 if ( !bIgnoreSkill ) amount = int(amount*G_SkillPropertyFloat(SKILLP_AmmoFactor)); if ( amount < 0 ) amount = 0; diff --git a/zscript/napalm.zsc b/zscript/napalm.zsc index 07f221b..595509b 100644 --- a/zscript/napalm.zsc +++ b/zscript/napalm.zsc @@ -5,9 +5,9 @@ Class FlameAmmo : Ammo Tag "$T_FLAMEAMMO"; Inventory.Icon "I_Napalm"; Inventory.PickupMessage "$I_FLAMEAMMO"; - Inventory.Amount 75; + Inventory.Amount 60; Inventory.MaxAmount 450; - Ammo.BackpackAmount 0; + Ammo.BackpackAmount 30; Ammo.BackpackMaxAmount 900; Ammo.DropAmount 30; } @@ -65,7 +65,7 @@ Class OnFire : Thinker amount--; 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; } if ( (victim is 'UNapalm') && victim.InStateSequence(victim.CurState,victim.FindState("XDeath")) ) @@ -146,6 +146,7 @@ Class OnFire : Thinker t.delay = delay; t.lite = Actor.Spawn("OnFireLight",victim.pos); OnFireLight(t.lite).of = t; + t.oangle = victim.angle; return t; }