diff --git a/decaldef.txt b/decaldef.txt index c73d6f7..b5e781f 100644 --- a/decaldef.txt +++ b/decaldef.txt @@ -125,3 +125,13 @@ decal BoltScorch x-scale 0.15 y-scale 0.15 } + +decal ImpactMark +{ + pic impcrack + shade "00 00 00" + randomflipx + randomflipy + x-scale 0.25 + y-scale 0.25 +} diff --git a/graphics/RReticle.png b/graphics/RReticle.png new file mode 100644 index 0000000..4ea1155 Binary files /dev/null and b/graphics/RReticle.png differ diff --git a/graphics/RReticle.tga b/graphics/RReticle.tga deleted file mode 100644 index 98454f6..0000000 Binary files a/graphics/RReticle.tga and /dev/null differ diff --git a/graphics/impactcrack.tga b/graphics/impactcrack.tga deleted file mode 100644 index 0e8bc56..0000000 Binary files a/graphics/impactcrack.tga and /dev/null differ diff --git a/graphics/impcrack.png b/graphics/impcrack.png new file mode 100644 index 0000000..b1fda22 Binary files /dev/null and b/graphics/impcrack.png differ diff --git a/graphics/pock0_t.png b/graphics/pock0_t.png new file mode 100644 index 0000000..a39d29c Binary files /dev/null and b/graphics/pock0_t.png differ diff --git a/graphics/pock0_t.tga b/graphics/pock0_t.tga deleted file mode 100644 index 046da9e..0000000 Binary files a/graphics/pock0_t.tga and /dev/null differ diff --git a/graphics/pock2_t.png b/graphics/pock2_t.png new file mode 100644 index 0000000..d930cc1 Binary files /dev/null and b/graphics/pock2_t.png differ diff --git a/graphics/pock2_t.tga b/graphics/pock2_t.tga deleted file mode 100644 index 8603e63..0000000 Binary files a/graphics/pock2_t.tga and /dev/null differ diff --git a/graphics/pock4_t.png b/graphics/pock4_t.png new file mode 100644 index 0000000..546e85a Binary files /dev/null and b/graphics/pock4_t.png differ diff --git a/graphics/pock4_t.tga b/graphics/pock4_t.tga deleted file mode 100644 index 366cab0..0000000 Binary files a/graphics/pock4_t.tga and /dev/null differ diff --git a/graphics/ripblast.png b/graphics/ripblast.png new file mode 100644 index 0000000..7aa1f4e Binary files /dev/null and b/graphics/ripblast.png differ diff --git a/graphics/ripperblast.tga b/graphics/ripperblast.tga deleted file mode 100644 index bb70715..0000000 Binary files a/graphics/ripperblast.tga and /dev/null differ diff --git a/modeldef.impact b/modeldef.impact index 242e786..fc4d106 100644 --- a/modeldef.impact +++ b/modeldef.impact @@ -3,7 +3,8 @@ Model "ImpactHammer" Path "models" Model 1 "ImpPick_d.3d" Skin 1 "JImpPick1.png" - Scale -0.24 0.2 0.2 + Scale -0.2 0.24 0.2 + AngleOffset 270 ZOffset 12 ROTATING @@ -14,8 +15,83 @@ Model "ImpactHammer" Path "models" Model 1 "ImpPick_d.3d" Skin 1 "JImpPick1.png" - Scale -0.24 0.2 0.2 - ZOffset 6 + Scale -0.2 0.24 0.2 + AngleOffset 270 + ZOffset 9 FrameIndex IMPP B 1 0 } + +Model "ImpactHammer" +{ + Path "models" + Model 0 "ImpactHammer_d.3d" + SurfaceSkin 0 0 "JImpactHammer1.png" + SurfaceSkin 0 1 "JImpactHammer2.png" + SurfaceSkin 0 2 "JImpactHammer3.png" + SurfaceSkin 0 3 "JImpactHammer4.png" + PitchOffset 5 + Scale 0.1 0.05 0.1 + Offset 5.8 -12.8 -7.7 + + // select + FrameIndex IMPS A 0 0 + FrameIndex IMPS B 0 1 + FrameIndex IMPS C 0 2 + FrameIndex IMPS D 0 3 + FrameIndex IMPS E 0 4 + FrameIndex IMPS F 0 5 + FrameIndex IMPS G 0 6 + FrameIndex IMPS H 0 7 + FrameIndex IMPS I 0 8 + FrameIndex IMPS J 0 9 + FrameIndex IMPS K 0 10 + FrameIndex IMPS L 0 11 + FrameIndex IMPS M 0 12 + FrameIndex IMPS N 0 13 + FrameIndex IMPS O 0 14 + FrameIndex IMPS P 0 15 + FrameIndex IMPS Q 0 16 + // idle + FrameIndex IMPI A 0 17 + // pull + FrameIndex IMPL A 0 17 + FrameIndex IMPL B 0 18 + FrameIndex IMPL C 0 19 + FrameIndex IMPL D 0 20 + FrameIndex IMPL E 0 21 + // shake + FrameIndex IMPR A 0 22 + FrameIndex IMPR B 0 23 + FrameIndex IMPR C 0 24 + FrameIndex IMPR D 0 25 + FrameIndex IMPR E 0 26 + FrameIndex IMPR F 0 27 + FrameIndex IMPR G 0 28 + FrameIndex IMPR H 0 29 + FrameIndex IMPR I 0 30 + FrameIndex IMPR J 0 31 + // fire + FrameIndex IMPF A 0 35 + FrameIndex IMPF B 0 36 + FrameIndex IMPF C 0 37 + FrameIndex IMPF D 0 38 + FrameIndex IMPF E 0 39 + FrameIndex IMPF F 0 40 + FrameIndex IMPF G 0 41 + FrameIndex IMPF H 0 42 + FrameIndex IMPF I 0 43 + FrameIndex IMPF J 0 44 + FrameIndex IMPF K 0 45 + FrameIndex IMPF L 0 46 + FrameIndex IMPF M 0 47 + FrameIndex IMPF N 0 48 + FrameIndex IMPF O 0 49 + FrameIndex IMPF P 0 50 + // down + FrameIndex IMPD A 0 51 + FrameIndex IMPD B 0 52 + FrameIndex IMPD C 0 53 + FrameIndex IMPD D 0 54 + FrameIndex IMPD E 0 55 +} \ No newline at end of file diff --git a/sndinfo.txt b/sndinfo.txt index ae97f7f..9b5a997 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -120,6 +120,39 @@ misc/gibbed4 gib4 misc/gibbed5 gib5 $random misc/gibbed { misc/gibbed1 misc/gibbed2 misc/gibbed3 misc/gibbed4 misc/gibbed5 } +impact/select imppick +impact/pull impaltst +impact/loop imploop +impact/release impaltrl +impact/fire impfire + +ges/hit gelhit +ges/select gelselec +ges/fire gelshot +ges/charge bioaltrp +ges/explode explg02 +$limit ges/hit 64 +$limit ges/explode 64 + +shock/select tazersel +shock/fire tazefire +shock/altfire tazealtf +shock/hit expl03 +shock/blast specexpl +$pitchshiftrange 5 +shock/ball expla02 +$pitchshift shock/ball 5 +$pitchshiftrange 0 +sshock/blast expl2 + +pulse/bolt pulseblt +pulse/down pulsedwn +pulse/hit pulseexp +pulse/fire pulsefir +pulse/fly pulsefly +pulse/select pulsepck +pulse/reload pulserel + flak/select pdown flak/load hidraul2 flak/reload load1 @@ -134,34 +167,7 @@ $random flak/bounce { flak/bounce1 flak/bounce2 flak/bounce3 } $limit flak/bounce 64 flak/explode expl04 -shock/select tazersel -shock/fire tazefire -shock/altfire tazealtf -shock/hit expl03 -shock/blast specexpl -$pitchshiftrange 5 -shock/ball expla02 -$pitchshift shock/ball 5 -$pitchshiftrange 0 -sshock/blast expl2 - warhead/explode warexplo warhead/fly warfly warhead/select warhpick warhead/fire warhshot - -ges/hit gelhit -ges/select gelselec -ges/fire gelshot -ges/charge bioaltrp -ges/explode explg02 -$limit ges/hit 64 -$limit ges/explode 64 - -pulse/bolt pulseblt -pulse/down pulsedwn -pulse/hit pulseexp -pulse/fire pulsefir -pulse/fly pulsefly -pulse/select pulsepck -pulse/reload pulserel diff --git a/textures.impact b/textures.impact index 1d67b03..d1ddf01 100644 --- a/textures.impact +++ b/textures.impact @@ -1,2 +1,56 @@ Sprite "IMPPA0",1,1{} Sprite "IMPPB0",1,1{} +Sprite "IMPSA0",1,1{} +Sprite "IMPSB0",1,1{} +Sprite "IMPSC0",1,1{} +Sprite "IMPSD0",1,1{} +Sprite "IMPSE0",1,1{} +Sprite "IMPSF0",1,1{} +Sprite "IMPSG0",1,1{} +Sprite "IMPSH0",1,1{} +Sprite "IMPSI0",1,1{} +Sprite "IMPSJ0",1,1{} +Sprite "IMPSK0",1,1{} +Sprite "IMPSL0",1,1{} +Sprite "IMPSM0",1,1{} +Sprite "IMPSN0",1,1{} +Sprite "IMPSO0",1,1{} +Sprite "IMPSP0",1,1{} +Sprite "IMPSQ0",1,1{} +Sprite "IMPIA0",1,1{} +Sprite "IMPLA0",1,1{} +Sprite "IMPLB0",1,1{} +Sprite "IMPLC0",1,1{} +Sprite "IMPLD0",1,1{} +Sprite "IMPLE0",1,1{} +Sprite "IMPRA0",1,1{} +Sprite "IMPRB0",1,1{} +Sprite "IMPRC0",1,1{} +Sprite "IMPRD0",1,1{} +Sprite "IMPRE0",1,1{} +Sprite "IMPRF0",1,1{} +Sprite "IMPRG0",1,1{} +Sprite "IMPRH0",1,1{} +Sprite "IMPRI0",1,1{} +Sprite "IMPRJ0",1,1{} +Sprite "IMPFA0",1,1{} +Sprite "IMPFB0",1,1{} +Sprite "IMPFC0",1,1{} +Sprite "IMPFD0",1,1{} +Sprite "IMPFE0",1,1{} +Sprite "IMPFF0",1,1{} +Sprite "IMPFG0",1,1{} +Sprite "IMPFH0",1,1{} +Sprite "IMPFI0",1,1{} +Sprite "IMPFJ0",1,1{} +Sprite "IMPFK0",1,1{} +Sprite "IMPFL0",1,1{} +Sprite "IMPFM0",1,1{} +Sprite "IMPFN0",1,1{} +Sprite "IMPFO0",1,1{} +Sprite "IMPFP0",1,1{} +Sprite "IMPDA0",1,1{} +Sprite "IMPDB0",1,1{} +Sprite "IMPDC0",1,1{} +Sprite "IMPDD0",1,1{} +Sprite "IMPDE0",1,1{} diff --git a/zscript/impacthammer.zsc b/zscript/impacthammer.zsc index c495203..a73954f 100644 --- a/zscript/impacthammer.zsc +++ b/zscript/impacthammer.zsc @@ -1,14 +1,188 @@ -Class ImpactHammer : UTWeapon replaces Fist +Class HammerImpact : Actor { + Default + { + Radius 0.1; + Height 0; + +NOGRAVITY; + +NOCLIP; + +DONTSPLASH; + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + A_SprayDecal("ImpactMark",20); + int numpt = Random[Impact](20,40); + Vector3 x = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch)); + for ( int i=0; i 0.2 ) + { + invoker.count = 0; + A_AlertMonsters(); + } + A_QuakeEx(clamp(invoker.chargesize*3,0,3),clamp(invoker.chargesize*3,0,3),clamp(invoker.chargesize*3,0,3),amt+1,0,96,"",QF_RELATIVE,rollIntensity:clamp(invoker.chargesize*0.3,0,0.3)); + } + action void A_FireBlast() + { + Weapon weap = Weapon(invoker); + if ( !weap ) return; + A_PlaySound("impact/release",CHAN_WEAPON); + invoker.FireEffect(); + A_AlertMonsters(); + Vector3 x, y, z; + [x, y, z] = Matrix4.GetAxes(pitch,angle,roll); + Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z; + double realcharge = min(1.5,invoker.chargesize); + FLineTraceData d; + LineTrace(angle,80,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d); + if ( d.HitType == TRACE_HitActor ) + { + d.HitActor.DamageMobj(invoker,self,60*realcharge,'impact'); + d.HitActor.vel += x*(1000/d.HitActor.mass)*realcharge; + if ( d.HitActor.bNOBLOOD ) + { + let p = Spawn("HammerImpact",d.HitLocation-d.HitDir*4); + p.angle = atan2(d.HitDir.y,d.HitDir.x); + p.pitch = asin(-d.HitDir.z); + } + else + { + d.HitActor.TraceBleed(60*realcharge,invoker); + d.HitActor.SpawnBlood(d.HitLocation,atan2(-d.HitDir.y,-d.HitDir.x),60*realcharge); + } + } + else if ( d.HitType != TRACE_HitNone ) + { + realcharge = max(1.0,invoker.chargesize); + DamageMobj(invoker,self,24*realcharge,'impact'); // It's a flat damage of 36 on UT, but I think it's more fair for it to scale + TraceBleed(24*realcharge,invoker); + vel -= x*(1200/mass)*realcharge; + let p = Spawn("HammerImpact",d.HitLocation-d.HitDir*4); + p.angle = atan2(d.HitDir.y,d.HitDir.x); + p.pitch = asin(-d.HitDir.z); + if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4); + } + A_QuakeEx(realcharge*4,realcharge*4,realcharge*4,12,0,96,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:realcharge*0.2); + realcharge = max(1.0,invoker.chargesize); + int numpt = Random[Impact](20,40); + for ( int i=0; i 550) || (rdir dot x < 0.9) ) continue; + m.speed = m.vel.length(); + if ( m.vel dot y > 0 ) m.vel = m.speed*(m.vel+(750-rdist)*y*0.01).unit(); + else m.vel = m.speed*(m.vel-(750-rdist)*y*0.01).unit(); + if ( m.target == self ) continue; + if ( m.bSEEKERMISSILE ) m.tracer = m.target; + m.target = self; + } + int numpt = Random[Impact](20,40); + for ( int i=0; i 1) && (d.HitType == TRACE_HitActor) ) + { + A_ClearRefire(); + return; + } + A_Refire(flash); + } + Default { Tag "Impact Hammer"; + Obituary "%o was smeared by %k's piston."; Inventory.PickupMessage "You got the Impact Hammer."; - Weapon.UpSound ""; + Weapon.UpSound "impact/select"; Weapon.SlotNumber 1; Weapon.SelectionOrder 9; +WEAPON.MELEEWEAPON; - +INVENTORY.UNTOSSABLE; } States { @@ -17,5 +191,78 @@ Class ImpactHammer : UTWeapon replaces Fist Stop; IMPP B -1; Stop; + Select: + IMPS A 1 A_Raise(int.max); + Wait; + Ready: + IMPS ABCDEFGHIJKLMNOPQ 1; + Idle: + IMPI A 1 A_WeaponReady(); + Wait; + Fire: + IMPL A 0 + { + A_ResetCharge(); + A_PlaySound("impact/pull",CHAN_WEAPON); + } + IMPL A 5 A_ChargeUp(5); + IMPL B 0 A_ImpactRefire(1); + Goto Release; + IMPL B 5 A_ChargeUp(5); + IMPL C 0 A_ImpactRefire(1); + Goto Release; + IMPL C 5 A_ChargeUp(5); + IMPL D 0 A_ImpactRefire(1); + Goto Release; + IMPL D 5 A_ChargeUp(5); + IMPL E 0 A_ImpactRefire(1); + Goto Release; + IMPL E 5 A_ChargeUp(5); + IMPL E 0 A_ImpactRefire(1); + Goto Release; + IMPL E 0 A_PlaySound("impact/loop",CHAN_WEAPON,looping:true); + Hold: + IMPR A 1 A_ChargeUp(); + IMPR B 0 A_ImpactRefire(1); + Goto Release; + IMPR B 1 A_ChargeUp(); + IMPR C 0 A_ImpactRefire(1); + Goto Release; + IMPR C 1 A_ChargeUp(); + IMPR D 0 A_ImpactRefire(1); + Goto Release; + IMPR D 1 A_ChargeUp(); + IMPR E 0 A_ImpactRefire(1); + Goto Release; + IMPR E 1 A_ChargeUp(); + IMPR F 0 A_ImpactRefire(1); + Goto Release; + IMPR F 1 A_ChargeUp(); + IMPR G 0 A_ImpactRefire(1); + Goto Release; + IMPR G 1 A_ChargeUp(); + IMPR H 0 A_ImpactRefire(1); + Goto Release; + IMPR H 1 A_ChargeUp(); + IMPR I 0 A_ImpactRefire(1); + Goto Release; + IMPR I 1 A_ChargeUp(); + IMPR J 0 A_ImpactRefire(1); + Goto Release; + IMPR J 1 A_ChargeUp(); + IMPR A 0 A_ImpactRefire("Hold"); + Goto Release; + Release: + IMPF A 0 A_FireBlast(); + IMPF AABCCDEEFGGHIIJKKLMMNOOP 1; + Goto Idle; + AltFire: + IMPF A 0 A_FireAltBlast(); + IMPF ABCDEFGHIJKLMNOP 1; + Goto Idle; + Deselect: + IMPD ABCDE 3; + IMPD E 1 A_Lower(int.max); + Wait; } } diff --git a/zscript/translocator.zsc b/zscript/translocator.zsc index d5a5b8b..96e7602 100644 --- a/zscript/translocator.zsc +++ b/zscript/translocator.zsc @@ -6,7 +6,6 @@ Class Translocator : UTWeapon Inventory.PickupMessage "You got the Translocator Source Module."; Weapon.SlotNumber 1; Weapon.SelectionOrder 10; - +INVENTORY.UNTOSSABLE; +WEAPON.NO_AUTO_SWITCH; } States diff --git a/zscript/uthud.zsc b/zscript/uthud.zsc index d35c6f5..817ae9f 100644 --- a/zscript/uthud.zsc +++ b/zscript/uthud.zsc @@ -79,7 +79,7 @@ Class UTHud : BaseStatusBar Slots[7] = TexMan.CheckForTexture("SlotFlak",TexMan.Type_Any); Slots[8] = TexMan.CheckForTexture("Slot8bal",TexMan.Type_Any); Slots[9] = TexMan.CheckForTexture("SlotRifl",TexMan.Type_Any); - Icons[0] = TexMan.CheckForTexture("IconImp",TexMan.Type_Any); + Icons[0] = TexMan.CheckForTexture("IconImpH",TexMan.Type_Any); Icons[1] = TexMan.CheckForTexture("IconAuto",TexMan.Type_Any); Icons[2] = TexMan.CheckForTexture("IconBio",TexMan.Type_Any); Icons[3] = TexMan.CheckForTexture("IconASMD",TexMan.Type_Any); @@ -93,7 +93,7 @@ Class UTHud : BaseStatusBar Icons[11] = TexMan.CheckForTexture("IconTrns",TexMan.Type_Any); Icons[12] = TexMan.CheckForTexture("IconWarH",TexMan.Type_Any); Icons[13] = TexMan.CheckForTexture("IconASMD",TexMan.Type_Any); - Uses[0] = TexMan.CheckForTexture("UseImp",TexMan.Type_Any); + Uses[0] = TexMan.CheckForTexture("UseImpH",TexMan.Type_Any); Uses[1] = TexMan.CheckForTexture("UseAuto",TexMan.Type_Any); Uses[2] = TexMan.CheckForTexture("UseBio",TexMan.Type_Any); Uses[3] = TexMan.CheckForTexture("UseASMD",TexMan.Type_Any); @@ -360,18 +360,14 @@ Class UTHud : BaseStatusBar CurY = BaseY+4*WeapScale; DrawColor = GoldColor; UTDrawColorTex(BigNum[(i==9)?0:(i+1)],0.6); - if ( !wslots[i].Ammo1 ) return; + if ( !wslots[i].Ammo1 ) continue; CurY = BaseY+52*WeapScale; Vector2 ss = (0.6875,0.5)*WeapScale; double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y); double dx = CurX/ss.x, dy = CurY/ss.y; Vector2 bs = TexMan.GetScaledSize(AmmoBar); double ddw = bs.x*(wslots[i].Ammo1.Amount/double(wslots[i].Ammo1.MaxAmount)); - int cx, cy, cw, ch; - [cx,cy,cw,ch] = Screen.GetClipRect(); - Screen.SetClipRect(CurX,CurY,ddw*ss.x,bs.y*ss.y); - Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true); - Screen.SetClipRect(cx,cy,cw,ch); + Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw); } } private void DrawFragCount()