diff --git a/GunLore.md b/GunLore.md index 32c9db8..e0b1766 100644 --- a/GunLore.md +++ b/GunLore.md @@ -296,12 +296,10 @@ The weapon is completely useless if the user or target are underwater. Another Mercenary invention, and a direct evolution of the previously listed Flamethrower. Shoots green-ish fireballs stabilized by microgravity. -Primary fire: A single, steady shot, followed by rapid three shot bursts in a -horizontal arc if you keep the trigger held. Costs 10 units of napalm per -projectile. +Primary fire: Rapid, steady shots. Costs 10 units of napalm per projectile. -Secondary fire: A slowly charged fireball costing 20 units of napalm. Deals -more splash damage. +Secondary fire: A slowly charged fireball costing 20 units of napalm. Spreads +small embers on impact. Like its predecessor, the Fireblaster is obviously completely useless when water is involved. A very clever human scientist would eventually solve this, diff --git a/Readme.md b/Readme.md index dd06fda..a452601 100644 --- a/Readme.md +++ b/Readme.md @@ -35,6 +35,7 @@ Doom Tournament (currently the devel branch is required). - Protomag (slot 2) (replaces pistol) - Dual Protomags - Quadshot (slot 3) (replaces shotguns) + - Fireblaster (slot 5) (replaces rocket launcher) - Peacemaker (slot 8) (rare spawn in backpacks) - Demolisher (slot 9) (replaces bfg9000) - Autocannon (slot 0) (replaces bfg9000) @@ -71,7 +72,6 @@ Doom Tournament (currently the devel branch is required). ## In progress - Stunner (slot 4) (replaces chainsaw) - - Fireblaster (slot 5) (replaces rocket launcher) - Flamethrower (slot 6) (replaces plasma rifle) - Impaler (slot 7) (replaces plasma rifle) diff --git a/gldefs.txt b/gldefs.txt index d7ec01a..a6a3df9 100644 --- a/gldefs.txt +++ b/gldefs.txt @@ -377,6 +377,40 @@ Object ForceField Frame "FFPK" { light "FFIELDLIGHT" } } +FlickerLight2 UFLAMGLIGHT1 +{ + Color 0.3 1.0 0.2 + Size 40 + SecondarySize 48 + Interval 0.1 +} +FlickerLight2 UFLAMGLIGHT2 +{ + Color 0.5 1.0 0.2 + Size 56 + SecondarySize 60 + Interval 0.1 +} +FlickerLight2 UFLAMGLIGHT3 +{ + Color 0.4 1.0 0.2 + Size 12 + SecondarySize 16 + Interval 0.1 +} +Object UFireball +{ + Frame "FIRB" { light "UFLAMGLIGHT1" } +} +Object UFireball2 +{ + Frame "FIRB" { light "UFLAMGLIGHT2" } +} +Object UFireballEmber +{ + Frame "FIRB" { light "UFLAMGLIGHT3" } +} + // Shaders / Brightmaps HardwareShader Texture "graphics/MenuBarr.png" { diff --git a/modeldef.flamegun b/modeldef.flamegun index 8acf4ce..7c263cc 100644 --- a/modeldef.flamegun +++ b/modeldef.flamegun @@ -1,3 +1,70 @@ +Model "UFireball" +{ + Path "models" + Model 0 "Flame_d.3d" + Skin 0 "JFlame2.png" + PitchOffset 90 + Scale 0.048 0.04 0.04 + Offset -4 0 0 + PITCHFROMMOMENTUM + + FrameIndex FIRB A 0 1 + FrameIndex FIRB B 0 2 + FrameIndex FIRB C 0 3 + FrameIndex FIRB D 0 4 + FrameIndex FIRB E 0 5 + FrameIndex FIRB F 0 6 + FrameIndex FIRB G 0 7 + FrameIndex FIRB H 0 8 + FrameIndex FIRB I 0 9 + FrameIndex FIRB J 0 10 + FrameIndex FIRB K 0 11 +} +Model "UFireball2" +{ + Path "models" + Model 0 "Flame_d.3d" + Skin 0 "JFlame3.png" + PitchOffset 90 + Scale 0.06 0.05 0.05 + Offset -5 0 0 + PITCHFROMMOMENTUM + + FrameIndex FIRB A 0 1 + FrameIndex FIRB B 0 2 + FrameIndex FIRB C 0 3 + FrameIndex FIRB D 0 4 + FrameIndex FIRB E 0 5 + FrameIndex FIRB F 0 6 + FrameIndex FIRB G 0 7 + FrameIndex FIRB H 0 8 + FrameIndex FIRB I 0 9 + FrameIndex FIRB J 0 10 + FrameIndex FIRB K 0 11 +} +Model "UFireballEmber" +{ + Path "models" + Model 0 "Flame_d.3d" + Skin 0 "JFlame3.png" + PitchOffset 90 + Scale 0.024 0.02 0.02 + Offset -2 0 0 + PITCHFROMMOMENTUM + + FrameIndex FIRB A 0 1 + FrameIndex FIRB B 0 2 + FrameIndex FIRB C 0 3 + FrameIndex FIRB D 0 4 + FrameIndex FIRB E 0 5 + FrameIndex FIRB F 0 6 + FrameIndex FIRB G 0 7 + FrameIndex FIRB H 0 8 + FrameIndex FIRB I 0 9 + FrameIndex FIRB J 0 10 + FrameIndex FIRB K 0 11 +} + Model "FlameGun" { Path "models" @@ -12,3 +79,70 @@ Model "FlameGun" ROTATING FrameIndex FGNP A 1 0 } + +Model "FlameGun" +{ + Path "models" + Model 0 "FlameGun_d.3d" + SurfaceSkin 0 0 "JFlameG1.png" + SurfaceSkin 0 1 "Automa1.png" + AngleOffset -90 + Scale 0.1 -0.07 0.1 + Offset 9 -16 -10 + + // Down + FrameIndex FGND A 0 1 + FrameIndex FGND B 0 2 + FrameIndex FGND C 0 3 + FrameIndex FGND D 0 4 + FrameIndex FGND E 0 5 + FrameIndex FGND F 0 6 + FrameIndex FGND G 0 7 + FrameIndex FGND H 0 8 + FrameIndex FGND I 0 9 + FrameIndex FGND J 0 10 + // Select + FrameIndex FGNS A 0 10 + FrameIndex FGNS B 0 11 + FrameIndex FGNS C 0 12 + FrameIndex FGNS D 0 13 + FrameIndex FGNS E 0 14 + FrameIndex FGNS F 0 15 + FrameIndex FGNS G 0 16 + FrameIndex FGNS H 0 17 + FrameIndex FGNS I 0 18 + FrameIndex FGNS J 0 19 + // Idle + FrameIndex FGNI A 0 20 + FrameIndex FGNI B 0 21 + FrameIndex FGNI C 0 22 + FrameIndex FGNI D 0 23 + FrameIndex FGNI E 0 24 + FrameIndex FGNI F 0 25 + FrameIndex FGNI G 0 26 + // Twiddle + FrameIndex FGNT A 0 27 + FrameIndex FGNT B 0 28 + FrameIndex FGNT C 0 29 + FrameIndex FGNT D 0 30 + FrameIndex FGNT E 0 31 + FrameIndex FGNT F 0 32 + FrameIndex FGNT G 0 33 + FrameIndex FGNT H 0 34 + FrameIndex FGNT I 0 35 + FrameIndex FGNT J 0 36 + FrameIndex FGNT K 0 37 + FrameIndex FGNT L 0 38 + FrameIndex FGNT M 0 39 + // Fire + FrameIndex FGNF A 0 40 + FrameIndex FGNF B 0 41 + FrameIndex FGNF C 0 42 + FrameIndex FGNF D 0 43 + FrameIndex FGNF E 0 44 + FrameIndex FGNF F 0 45 + FrameIndex FGNF G 0 46 + FrameIndex FGNF H 0 47 + FrameIndex FGNF I 0 48 + FrameIndex FGNF J 0 49 +} \ No newline at end of file diff --git a/palettes/FlamG.pal b/palettes/FlamG.pal new file mode 100644 index 0000000..5584943 Binary files /dev/null and b/palettes/FlamG.pal differ diff --git a/sndinfo.txt b/sndinfo.txt index 9399a02..6f5dbc2 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -171,6 +171,7 @@ stinger/altfire stingera stinger/hit bladehit stinger/hit2 ricochet stinger/flesh chunkhit +$limit stinger/hit 16 flak/click click @@ -197,6 +198,7 @@ dpistol/up3 number3 dpistol/up4 number4 dpistol/fly dispfly dpistol/hit dispex1 +$limit dpistol/hit 16 amplifier/act ampact amplifier/set health1 @@ -291,18 +293,30 @@ big/punch bigmejct big/reload bigmrelo big/shell bigmshel big/blast bigmhit +$limit big/blast 16 smini/select sminisel smini/fire sminione smini/altfire sminialt smini/endfire sminiend smini/explode sminiexp +$limit smini/explode 16 bonesaw/select bsawsel bonesaw/claw bsawstab bonesaw/spin bsawloop bonesaw/spinend bsawend +flamegun/select flamgsel +flamegun/idle flamgidl +flamegun/start flamgbeg +flamegun/fire flamgfir +flamegun/end flamgend +flamegun/charge flamgabg +flamegun/alt flamgalt +flamegun/exp expl04 +$limit flamegun/exp 16 + translator/event transa3 detector/start detact diff --git a/sprites/flameg/FGEXA0.png b/sprites/flameg/FGEXA0.png new file mode 100644 index 0000000..58b9641 Binary files /dev/null and b/sprites/flameg/FGEXA0.png differ diff --git a/sprites/flameg/FGEXB0.png b/sprites/flameg/FGEXB0.png new file mode 100644 index 0000000..2f2d9e7 Binary files /dev/null and b/sprites/flameg/FGEXB0.png differ diff --git a/sprites/flameg/FGEXC0.png b/sprites/flameg/FGEXC0.png new file mode 100644 index 0000000..c003328 Binary files /dev/null and b/sprites/flameg/FGEXC0.png differ diff --git a/sprites/flameg/FGEXD0.png b/sprites/flameg/FGEXD0.png new file mode 100644 index 0000000..e398b25 Binary files /dev/null and b/sprites/flameg/FGEXD0.png differ diff --git a/sprites/flameg/FGEXE0.png b/sprites/flameg/FGEXE0.png new file mode 100644 index 0000000..70286dc Binary files /dev/null and b/sprites/flameg/FGEXE0.png differ diff --git a/sprites/flameg/FGEXF0.png b/sprites/flameg/FGEXF0.png new file mode 100644 index 0000000..44bfa3b Binary files /dev/null and b/sprites/flameg/FGEXF0.png differ diff --git a/sprites/flameg/FGEXG0.png b/sprites/flameg/FGEXG0.png new file mode 100644 index 0000000..39bd6d2 Binary files /dev/null and b/sprites/flameg/FGEXG0.png differ diff --git a/sprites/flameg/FGEXH0.png b/sprites/flameg/FGEXH0.png new file mode 100644 index 0000000..dd99d73 Binary files /dev/null and b/sprites/flameg/FGEXH0.png differ diff --git a/sprites/flameg/FGFLA0.png b/sprites/flameg/FGFLA0.png new file mode 100644 index 0000000..9596dae Binary files /dev/null and b/sprites/flameg/FGFLA0.png differ diff --git a/trnslate.txt b/trnslate.txt index 44a1bf1..0fb2c4b 100644 --- a/trnslate.txt +++ b/trnslate.txt @@ -1,3 +1,4 @@ DamTeal="0:255=%[0,0,0]:[0.30,0.76,1.20]" DamMagenta="0:255=%[0,0,0]:[1.50,0.30,1.50]" RedIcon="0:255=#[255,0,0]" +FlamGSpark="0:255=%[0,0,0]:[0.75,1.00,0.00]" diff --git a/zscript/flamegun.zsc b/zscript/flamegun.zsc index a2e0dec..e8bac2b 100644 --- a/zscript/flamegun.zsc +++ b/zscript/flamegun.zsc @@ -1,13 +1,280 @@ +Class UFireLight : PaletteLight +{ + Default + { + Tag "FlamG"; + Args 0,0,0,60; + } +} + +Class UFireTrail : Actor +{ + Default + { + RenderStyle "Add"; + Radius 0.1; + Height 0; + +NOBLOCKMAP; + +NOGRAVITY; + +DONTSPLASH; + +FORCEXYBILLBOARD; + +NOTELEPORT; + Scale 0.5; + Alpha 0.2; + } + override void Tick() + { + Super.Tick(); + if ( !target || !target.bMISSILE ) + { + Destroy(); + return; + } + SetOrigin(target.pos,true); + } + States + { + Spawn: + FGFL A -1 Bright; + Stop; + } +} + Class UFireball : Actor { + Vector3 Acceleration; + double spreadf; + int ns, nsp; + + property SpreadFactor : spreadf; + property NumSmokes : ns; + property NumSparks : nsp; + + Default + { + DamageType 'Fire'; + DamageFunction 30; + Radius 4; + Height 4; + Speed 15; + PROJECTILE; + +SKYEXPLODE; + +EXPLODEONWATER; + +FORCERADIUSDMG; + +NODAMAGETHRUST; + +FORCEXYBILLBOARD; + UFireball.SpreadFactor 0.2; + UFireball.NumSmokes 1; + UFireball.NumSparks 2; + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + if ( bAMBUSH ) return; + let l = Spawn("UFireTrail",pos); + l.target = self; + Acceleration = vel.unit()*50; + A_PlaySound("eightball/fly",CHAN_VOICE,1.0,true,3.,pitch:1.5); + } + action void A_Spread() + { + vel += invoker.Acceleration/TICRATE; + vel += (FRandom[EWizFX](-1,1),FRandom[EWizFX](-1,1),FRandom[EWizFX](-1,1))*FRandom[EWizFX](.5,1.)*invoker.spreadf; + Vector3 dir = vel.unit(); + if ( vel.length() > 30. ) vel = dir*30.; + angle = atan2(dir.y,dir.x); + pitch = asin(-dir.z); + if ( waterlevel > 0 ) + { + int numpt = Random[ExploS](10,15); + if ( bAMBUSH ) numpt /= 3; + for ( int i=0; i40,"AltRelease"); + } + Wait; + AltRelease: + FGNF B 2 + { + invoker.special1 = 0; + A_WeaponOffset(0,32); + A_FlameGunFire(true); + } + FGNF CDEFGHIJ 2; + FGNT ABCDEFGHIJKLM 2; + Goto Idle; + Deselect: + FGND A 1 A_Overlay(-9999,"Null"); + FGND BCDEFGHIJ 1; + FGND J 1 A_Lower(int.max); + Wait; } } diff --git a/zscript/napalm.zsc b/zscript/napalm.zsc index d6c85ea..2678b1d 100644 --- a/zscript/napalm.zsc +++ b/zscript/napalm.zsc @@ -29,6 +29,8 @@ Class UNapalm : Actor Class UFlamethrower : UnrealWeapon { + bool bCharging; + Default { Tag "$T_FLAMETHROWER"; diff --git a/zscript/unrealcommon.zsc b/zscript/unrealcommon.zsc index edb134f..86aef70 100644 --- a/zscript/unrealcommon.zsc +++ b/zscript/unrealcommon.zsc @@ -264,7 +264,9 @@ Class UPlayer : UTPlayer if ( (player.ReadyWeapon is 'Eightball') || ((player.ReadyWeapon is 'DispersionPistol') && DispersionPistol(player.ReadyWeapon).bCharging) || ((player.ReadyWeapon is 'UBioRifle') && UBioRifle(player.ReadyWeapon).bCharging) - || (player.ReadyWeapon is 'Razorjack')|| (player.ReadyWeapon is 'Stunner') ) + || ((player.ReadyWeapon is 'FlameGun') && FlameGun(player.ReadyWeapon).bCharging) + || (player.ReadyWeapon is 'Razorjack') || (player.ReadyWeapon is 'Stunner') + || ((player.ReadyWeapon is 'UFlamethrower') && UFlamethrower(player.ReadyWeapon).bCharging) ) { if ( !InStateSequence(CurState,FindState("MissileRepStill")) ) SetStateLabel("MissileRepStill");