diff --git a/animdefs.txt b/animdefs.txt index 1365cc2..dfd7600 100644 --- a/animdefs.txt +++ b/animdefs.txt @@ -5,21 +5,6 @@ texture static1 pic static2 tics 1 pic static3 tics 1 pic static4 tics 1 -texture FIZZHP00 - pic FIZZHP00 tics 8 - pic FIZZHP01 tics 8 - pic FIZZHP02 tics 8 - pic FIZZHP03 tics 8 -texture FIZZHP10 - pic FIZZHP10 tics 8 - pic FIZZHP11 tics 8 - pic FIZZHP12 tics 8 - pic FIZZHP13 tics 8 -texture FIZZHP20 - pic FIZZHP20 tics 8 - pic FIZZHP21 tics 8 - pic FIZZHP22 tics 8 - pic FIZZHP23 tics 8 texture invis00 pic invis00 tics 2 pic invis01 tics 2 diff --git a/cvarinfo.txt b/cvarinfo.txt index 9818139..e769b3d 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -38,3 +38,4 @@ server float flak_swingerstrength = 0.5; // strength of visual recoil server bool flak_radboots = true; // jump boots protect against damaging floors (this is to account for the lack of a radsuit) server bool flak_blood = true; // [WIP] use doom tournament blood (disable if using another gore mod) server bool flak_gibs = false; // [WIP/UNSTABLE] use doom tournament gibbing (disable if using another gore mod) +server bool flak_doomtest = false; // made toggleable due to loud complaints diff --git a/gldefs.txt b/gldefs.txt index e2c887c..bc7e5d7 100644 --- a/gldefs.txt +++ b/gldefs.txt @@ -2,53 +2,20 @@ HardwareShader Texture "models/Jgreen.png" { Shader "shaders/glsl/MeshEnviroMap.fp" } -Brightmap Texture "FIZZHP00" +HardwareShader Texture "fizzside" { - Map "brightmaps/fullbright.png" + Shader "shaders/glsl/FizzDistortX.fp" + Texture "warptex" "textures/warptex.png" } -Brightmap Texture "FIZZHP01" +HardwareShader Texture "fizztop" { - Map "brightmaps/fullbright.png" + Shader "shaders/glsl/FizzDistortXY.fp" + Texture "warptex" "textures/warptex.png" } -Brightmap Texture "FIZZHP02" +HardwareShader Texture "fizzfull" { - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP03" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP10" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP11" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP12" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP13" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP20" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP21" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP22" -{ - Map "brightmaps/fullbright.png" -} -Brightmap Texture "FIZZHP23" -{ - Map "brightmaps/fullbright.png" + Shader "shaders/glsl/FizzDistortXY.fp" + Texture "warptex" "textures/warptex.png" } HardwareShader Texture "models/jhbox1.png" { @@ -600,4 +567,4 @@ SkyBox "BlueSky" fliptop "graphics/SkySetB_left.png" "graphics/SkySetB_up.png" "graphics/SkySetB_down.png" -} \ No newline at end of file +} diff --git a/menudef.txt b/menudef.txt index cadc6e9..fb10856 100644 --- a/menudef.txt +++ b/menudef.txt @@ -66,6 +66,7 @@ OptionMenu "UTOptionMenu" Option "UT Blood", "flak_blood", "YesNo" Option "[WIP] UT Gibbing", "flak_gibs", "YesNo" Option "[WIP] Corpses Take Damage", "flak_corpsedamage", "YesNo" + Option "Edit Kinsie's Test Map", "flak_doomtest", "YesNo" } AddOptionMenu "OptionsMenu" diff --git a/modeldef.misc b/modeldef.misc index f4b9606..1ce2872 100644 --- a/modeldef.misc +++ b/modeldef.misc @@ -50,7 +50,7 @@ Model "UTHealthPack" Model 0 "hbox_d.3d" // indices start at 1 for this mesh SurfaceSkin 0 1 "jhbox1.png" - SurfaceSkin 0 2 "FIZZHP00" + SurfaceSkin 0 2 "fizzfull" Scale 0.2 0.24 0.2 RollOffset -90 ZOffset 16 @@ -64,8 +64,8 @@ Model "UTHealthBox" Model 0 "hboxbeta_d.3d" // indices start at 1 for this mesh SurfaceSkin 0 1 "jhboxbeta1.png" - SurfaceSkin 0 2 "FIZZHP10" - SurfaceSkin 0 3 "FIZZHP10" + SurfaceSkin 0 2 "fizzfull" + SurfaceSkin 0 3 "fizzfull" Scale 0.08 0.08 0.096 ZOffset 4 @@ -78,7 +78,7 @@ Model "UTMedBox" Model 0 "MedBox_d.3d" // indices start at 1 for this mesh SurfaceSkin 0 1 "JMedBox1.png" - SurfaceSkin 0 2 "FIZZHP10" + SurfaceSkin 0 2 "fizzfull" Scale 0.06 0.06 0.072 ZOffset 5 @@ -90,8 +90,8 @@ Model "UTHealthBonus" Path "models" Model 0 "Vial_d.3d" SurfaceSkin 0 0 "JVial0.png" - SurfaceSkin 0 1 "FIZZHP20" - SurfaceSkin 0 2 "FIZZHP20" + SurfaceSkin 0 1 "fizzside" + SurfaceSkin 0 2 "fizztop" Scale 0.04 0.04 0.048 ZOffset 8 DONTCULLBACKFACES @@ -317,4 +317,4 @@ Model "UTChip" FrameIndex CHIP B 0 1 FrameIndex CHIP C 0 2 FrameIndex CHIP D 0 3 -} \ No newline at end of file +} diff --git a/shaders/glsl/FizzDistortX.fp b/shaders/glsl/FizzDistortX.fp new file mode 100644 index 0000000..3e62195 --- /dev/null +++ b/shaders/glsl/FizzDistortX.fp @@ -0,0 +1,18 @@ +vec4 ProcessLight( vec4 color ) +{ + return vec4(1.0); +} + +vec4 ProcessTexel() +{ + vec2 coord = vTexCoord.st; + vec2 dist = 2.0*texture(warptex,vTexCoord.st).xy-1.0; + dist.x *= abs(mod(dist.y+timer*3.34536,4)-2)-1; + coord.x += dist.x*0.12; + dist = 2.0*texture(warptex,vTexCoord.st*2.0).xy-1.0; + dist.y *= abs(mod(dist.x+timer*5.45363,4)-2)-1; + coord.y -= dist.y*0.09; + coord.y = clamp(coord.y,0.0,1.0); + coord.x += timer*0.5346; + return getTexel(coord); +} diff --git a/shaders/glsl/FizzDistortXY.fp b/shaders/glsl/FizzDistortXY.fp new file mode 100644 index 0000000..8ecc683 --- /dev/null +++ b/shaders/glsl/FizzDistortXY.fp @@ -0,0 +1,18 @@ +vec4 ProcessLight( vec4 color ) +{ + return vec4(1.0); +} + +vec4 ProcessTexel() +{ + vec2 coord = vTexCoord.st; + vec2 dist = 2.0*texture(warptex,vTexCoord.st*0.6).xy-1.0; + dist.x *= abs(mod(dist.y+timer*1.34536,4)-2)-1; + coord.x += dist.x*0.12; + dist = 2.0*texture(warptex,vTexCoord.st*1.2).xy-1.0; + dist.y *= abs(mod(dist.x+timer*1.45363,4)-2)-1; + coord.y -= dist.y*0.09; + coord.x += timer*0.05346; + coord.y += timer*0.03425; + return getTexel(coord); +} diff --git a/textures.misc b/textures.misc index 6aa62ec..73e86c5 100644 --- a/textures.misc +++ b/textures.misc @@ -1,122 +1,9 @@ -Texture "FIZZHP00",256,256 +Texture "DefTex",128,128 { - Patch "LAVA1",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",128,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",192,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",64,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",128,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",192,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",0,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",64,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",128,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",192,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",0,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",64,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",128,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",192,192{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP01",256,256 -{ - Patch "LAVA2",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",128,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",192,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",64,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",128,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",192,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",0,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",64,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",128,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",192,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",0,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",64,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",128,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",192,192{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP02",256,256 -{ - Patch "LAVA3",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",128,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",192,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",64,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",128,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",192,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",0,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",64,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",128,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",192,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",0,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",64,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",128,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",192,192{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP03",256,256 -{ - Patch "LAVA4",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",128,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",192,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",64,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",128,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",192,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",0,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",64,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",128,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",192,128{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",0,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",64,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",128,192{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",192,192{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP10",128,128 -{ - Patch "LAVA1",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA1",64,64{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP11",128,128 -{ - Patch "LAVA2",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA2",64,64{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP12",128,128 -{ - Patch "LAVA3",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA3",64,64{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP13",128,128 -{ - Patch "LAVA4",0,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",64,0{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",0,64{Translation "0:255=#[0,0,255]"} - Patch "LAVA4",64,64{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP20",64,64 -{ - Patch "LAVA1",0,0{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP21",64,64 -{ - Patch "LAVA2",0,0{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP22",64,64 -{ - Patch "LAVA3",0,0{Translation "0:255=#[0,0,255]"} -} -Texture "FIZZHP23",64,64 -{ - Patch "LAVA4",0,0{Translation "0:255=#[0,0,255]"} + XScale 4 + YScale 4 + WorldPanning + Patch "-noflat-", 0, 0 } Sprite "HBOXA0",1,1{} Sprite "HBOXB0",1,1{} diff --git a/textures/fizzfull.png b/textures/fizzfull.png new file mode 100644 index 0000000..a33a988 Binary files /dev/null and b/textures/fizzfull.png differ diff --git a/textures/fizzside.png b/textures/fizzside.png new file mode 100644 index 0000000..b25eb0f Binary files /dev/null and b/textures/fizzside.png differ diff --git a/textures/fizztop.png b/textures/fizztop.png new file mode 100644 index 0000000..51fed75 Binary files /dev/null and b/textures/fizztop.png differ diff --git a/textures/warptex.png b/textures/warptex.png new file mode 100644 index 0000000..de45a9d Binary files /dev/null and b/textures/warptex.png differ diff --git a/zscript/biorifle.zsc b/zscript/biorifle.zsc index 8aa2475..701a2a7 100644 --- a/zscript/biorifle.zsc +++ b/zscript/biorifle.zsc @@ -198,8 +198,6 @@ Class BioGel : Actor deadtimer = -1; l = Spawn("BioLight",pos); l.target = self; - b = Spawn("BioHitbox",pos); - b.target = self; rollvel = FRandom[GES](10,30)*RandomPick[GES](-1,1); pitchvel = FRandom[GES](10,30)*RandomPick[GES](-1,1); yawvel = FRandom[GES](10,30)*RandomPick[GES](-1,1); @@ -297,72 +295,8 @@ Class BioGel : Actor SetStateLabel("XDeath"); return; } - FLineTraceData d; A_SetSize(0.1,0); - if ( BlockingLine ) - { - atline = BlockingLine; - normal = (-BlockingLine.delta.y,BlockingLine.delta.x,0).unit(); - atside = 1; - if ( !BlockingLine.sidedef[1] || (CurSector == BlockingLine.frontsector) ) - { - atside = 0; - normal *= -1; - } - Vector3 orig = (BlockingLine.v1.p.x,BlockingLine.v1.p.y,0); - Vector3 onwall = pos-(normal dot (pos-orig))*normal; - SetOrigin(onwall+normal*0.5,false); - // attempt to guess line part (upper/mid/lower) - if ( !atline.sidedef[1] ) atpart = 0; // mid - else if ( atline.sidedef[atside?0:1].sector.ceilingplane.ZAtPoint(pos.xy) < pos.z ) atpart = 1; // upper - else if ( atline.sidedef[atside?0:1].sector.floorplane.ZAtPoint(pos.xy) > pos.z ) atpart = -1; // lower - else atpart = 0; - if ( atpart == 1 ) - { - if ( atline.flags&Line.ML_DONTPEGTOP ) atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(1); - else atz = pos.z-atline.sidedef[atside?0:1].sector.GetPlaneTexZ(1); - } - else if ( atpart == -1 ) - { - if ( atline.flags&Line.ML_DONTPEGBOTTOM ) atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(0); - else atz = pos.z-atline.sidedef[atside?0:1].sector.GetPlaneTexZ(0); - } - else if ( atline.flags&Line.ML_DONTPEGBOTTOM ) atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(0); - else atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(1); - angle = atan2(normal.y,normal.x); - pitch = 0; - roll = 180; // otherwise it slides upwards (UT changes roll like this too) - if ( waterlevel > 0 ) hittype = HIT_FLOOR; - else hittype = HIT_WALL; - } - else if ( pos.z <= floorz+4 ) - { - atsector = cursector; - atplane = 0; - normal = cursector.floorplane.Normal; - pitch = asin(-normal.z); - angle = atan2(normal.y,normal.x); - roll = FRandom[GES](0,360); - SetOrigin((pos.x,pos.y,floorz)+normal*0.5,false); - atz = pos.z-cursector.GetPlaneTexZ(0); - hittype = HIT_FLOOR; - } - else if ( pos.z >= ceilingz-8 ) - { - atsector = cursector; - atplane = 1; - normal = cursector.ceilingplane.Normal; - pitch = asin(-normal.z); - angle = atan2(normal.y,normal.x); - roll = FRandom[GES](0,360); - SetOrigin((pos.x,pos.y,ceilingz)+normal*0.5,false); - atz = pos.z-cursector.GetPlaneTexZ(1); - if ( waterlevel > 0 ) hittype = HIT_FLOOR; - else if ( normal dot (0,0,-1) > 0.7 ) - hittype = HIT_CEILING; - else hittype = HIT_FLOOR; - } - else if ( tracer && tracer.bACTLIKEBRIDGE ) + if ( tracer && tracer.bACTLIKEBRIDGE ) { atbridge = tracer; onbridge = true; @@ -461,11 +395,76 @@ Class BioGel : Actor } } } + else if ( BlockingFloor ) + { + atsector = BlockingFloor; + atplane = 0; + normal = BlockingFloor.floorplane.Normal; + pitch = asin(-normal.z); + angle = atan2(normal.y,normal.x); + roll = FRandom[GES](0,360); + SetOrigin((pos.x,pos.y,floorz)+normal*0.5,false); + atz = pos.z-BlockingFloor.GetPlaneTexZ(0); + hittype = HIT_FLOOR; + } + else if ( BlockingCeiling ) + { + atsector = BlockingCeiling; + atplane = 1; + normal = BlockingCeiling.ceilingplane.Normal; + pitch = asin(-normal.z); + angle = atan2(normal.y,normal.x); + roll = FRandom[GES](0,360); + SetOrigin((pos.x,pos.y,ceilingz)+normal*0.5,false); + atz = pos.z-BlockingCeiling.GetPlaneTexZ(1); + if ( waterlevel > 0 ) hittype = HIT_FLOOR; + else if ( normal dot (0,0,-1) > 0.7 ) + hittype = HIT_CEILING; + else hittype = HIT_FLOOR; + } + else if ( BlockingLine ) + { + atline = BlockingLine; + normal = (-BlockingLine.delta.y,BlockingLine.delta.x,0).unit(); + atside = 1; + if ( !BlockingLine.sidedef[1] || (CurSector == BlockingLine.frontsector) ) + { + atside = 0; + normal *= -1; + } + Vector3 orig = (BlockingLine.v1.p.x,BlockingLine.v1.p.y,0); + Vector3 onwall = pos-(normal dot (pos-orig))*normal; + SetOrigin(onwall+normal*0.5,false); + // attempt to guess line part (upper/mid/lower) + if ( !atline.sidedef[1] ) atpart = 0; // mid + else if ( atline.sidedef[atside?0:1].sector.ceilingplane.ZAtPoint(pos.xy) < pos.z ) atpart = 1; // upper + else if ( atline.sidedef[atside?0:1].sector.floorplane.ZAtPoint(pos.xy) > pos.z ) atpart = -1; // lower + else atpart = 0; + if ( atpart == 1 ) + { + if ( atline.flags&Line.ML_DONTPEGTOP ) atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(1); + else atz = pos.z-atline.sidedef[atside?0:1].sector.GetPlaneTexZ(1); + } + else if ( atpart == -1 ) + { + if ( atline.flags&Line.ML_DONTPEGBOTTOM ) atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(0); + else atz = pos.z-atline.sidedef[atside?0:1].sector.GetPlaneTexZ(0); + } + else if ( atline.flags&Line.ML_DONTPEGBOTTOM ) atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(0); + else atz = pos.z-atline.sidedef[atside].sector.GetPlaneTexZ(1); + angle = atan2(normal.y,normal.x); + pitch = 0; + roll = 180; // otherwise it slides upwards (UT changes roll like this too) + if ( waterlevel > 0 ) hittype = HIT_FLOOR; + else hittype = HIT_WALL; + } else { SetStateLabel("XDeath"); return; } + b = Spawn("BioHitbox",pos); + b.target = self; A_PlaySound("ges/hit"); A_SprayDecal("BioSplat",-172); int numpt = Min(100,int(Scale.x*10))+Random[GES](-5,5); diff --git a/zscript/eightball.zsc b/zscript/eightball.zsc index 316ffb5..b5bbe21 100644 --- a/zscript/eightball.zsc +++ b/zscript/eightball.zsc @@ -221,11 +221,11 @@ Class UTGrenade : UTRocket DamageType 'GrenadeDeath'; -NOGRAVITY; +USEBOUNCESTATE; - -BOUNCEAUTOOFF; - +BOUNCEAUTOOFFFLOORONLY; -EXPLODEONWATER; +CANBOUNCEWATER; - BounceType "Doom"; + +NOEXPLODEFLOOR; + BounceType "Hexen"; + WallBounceFactor 0.75; BounceFactor 0.75; ReactionTime 85; Speed 20; @@ -243,20 +243,37 @@ Class UTGrenade : UTRocket Spawn: RCKT A 1 { - angle += anglevel; - pitch += pitchvel; - roll += rollvel; + if ( !bNOGRAVITY ) + { + angle += anglevel; + pitch += pitchvel; + roll += rollvel; + } + let s = Spawn("UTSmoke",pos); + s.scale *= 2.0; + s.alpha *= 0.6; + s.vel = (FRandom[Eightball](-0.1,0.1),FRandom[Eightball](-0.1,0.1),FRandom[Eightball](-0.1,0.3)); + s.vel += vel*0.05; + s.SetShade("000000"); A_Countdown(); } Wait; Bounce: RCKT A 0 { + bHITOWNER = true; A_PlaySound("utrl/bounce"); rollvel = FRandom[Eightball](-16,16); pitchvel = FRandom[Eightball](-16,16); anglevel = FRandom[Eightball](-16,16); - bHITOWNER = true; + if ( vel.z > 10 ) vel.z = 0.5*(10+vel.z); + else if ( BlockingFloor && (vel.xy.length() < 0.5) ) + { + vel *= 0; + bNOGRAVITY = true; + bMOVEWITHSECTOR = true; + ClearBounce(); + } } Goto Spawn; Death: diff --git a/zscript/enforcer.zsc b/zscript/enforcer.zsc index 74b6d02..8610c82 100644 --- a/zscript/enforcer.zsc +++ b/zscript/enforcer.zsc @@ -88,7 +88,7 @@ Class BulletImpact : Actor Class UTCasing : Actor { - int deadtimer; + int deadtimer, numbounces; double pitchvel, anglevel; double heat; @@ -102,7 +102,9 @@ Class UTCasing : Actor +THRUACTORS; +USEBOUNCESTATE; +INTERPOLATEANGLES; - BounceType "Doom"; + Mass 1; + BounceType "Hexen"; + WallBounceFactor 0.65; BounceFactor 0.65; BounceSound "bullet/casing"; } @@ -144,6 +146,12 @@ Class UTCasing : Actor pitchvel = FRandom[Junk](10,30)*RandomPick[Junk](-1,1); anglevel = FRandom[Junk](10,30)*RandomPick[Junk](-1,1); vel = (vel.unit()+(FRandom[Junk](-.2,.2),FRandom[Junk](-.2,.2),FRandom[Junk](-.2,.2))).unit()*vel.length(); + if ( numbounces && ((numbounces > 3) || (Random[Junk](1,20) < 17) || (vel.z > -1.4)) ) + { + ClearBounce(); + ExplodeMissile(); + } + numbounces++; } Goto Spawn; Death: diff --git a/zscript/flakcannon.zsc b/zscript/flakcannon.zsc index 4432890..0b28847 100644 --- a/zscript/flakcannon.zsc +++ b/zscript/flakcannon.zsc @@ -166,12 +166,11 @@ Class FlakChunk : Actor Speed 50; DamageFunction Random[Flak](15,20); DamageType 'Shredded'; - BounceType "Doom"; + BounceType "Hexen"; BounceFactor 0.8; WallBounceFactor 0.8; PROJECTILE; +USEBOUNCESTATE; - -BOUNCEAUTOOFF; +CANBOUNCEWATER; +SKYEXPLODE; +INTERPOLATEANGLES; @@ -232,9 +231,8 @@ Class FlakChunk : Actor action void A_HandleBounce() { bHITOWNER = true; - A_SprayDecal("WallCrack",-8); int numpt = Random[Flak](2,3); - if ( frame < 10 ) + if ( (frame < 10) && Random[Flak](0,1) ) { for ( int i=0; i 0) || target.InStateSequence(target.CurState,target.FindState("XDeath")) ) + if ( !flak_corpsedamage || !target || (target.Health > 0) || target.InStateSequence(target.CurState,target.FindState("XDeath")) ) { Destroy(); return; @@ -1300,6 +1302,7 @@ Class ShredCorpseHitbox : Actor { // force gib (cheap ATM) State gib = target.FindState("XDeath"); + if ( !gib ) gib = target.FindState("Death.Extreme"); if ( gib ) target.SetState(gib); Destroy(); } @@ -1539,6 +1542,12 @@ Class UTMainHandler : StaticEventHandler // prettify Kinsie's test map for a more Unreal feel if ( level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33" ) { + // just replace the -noflat- with a better scaled version + if ( !flak_doomtest ) + { + TexMan.ReplaceTextures("-noflat-","DefTex",0); + return; + } TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any); TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any); TextureID baseflor = TexMan.CheckForTexture("rClfFlr0",TexMan.Type_Any); @@ -1716,6 +1725,9 @@ Class UTMainHandler : StaticEventHandler override void RenderOverlay( RenderEvent e ) { + // well this if sure is a long one + if ( players[consoleplayer].camera.player && players[consoleplayer].camera.player.ReadyWeapon && (players[consoleplayer].camera.player.ReadyWeapon is 'UTWeapon') ) + UTWeapon(players[consoleplayer].camera.player.ReadyWeapon).RenderOverlay(e); if ( !menuactive ) return; if ( tex.IsNull() || !tex.IsValid() ) return; if ( !CVar.GetCVar('flak_showmenu',players[consoleplayer]).GetBool() ) return; @@ -1727,11 +1739,12 @@ Class UTMainHandler : StaticEventHandler { if ( e.Thing.bDONTGIB ) return; // gibbers - if ( flak_gibs && !e.Thing.bNOBLOOD && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.Thing.Health < e.Thing.GetGibHealth())) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) ) + if ( flak_gibs && !e.Thing.bNOBLOOD && (e.Thing.FindState("XDeath") || e.Thing.FindState("Death.Extreme")) && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.Thing.Health < e.Thing.GetGibHealth())) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) ) { // players have special gibbing if ( e.Thing.player ) { + // TODO return; } // generic gibbing diff --git a/zscript/utgore.zsc b/zscript/utgore.zsc index bc634b2..41179fa 100644 --- a/zscript/utgore.zsc +++ b/zscript/utgore.zsc @@ -8,6 +8,7 @@ Class UTBlood : Actor +NOBLOCKMAP; +NOGRAVITY; +NOTELEPORT; + +DONTSPLASH; +FORCEXYBILLBOARD; +PUFFGETSOWNER; } @@ -61,6 +62,7 @@ Class UTBloodDrop : Actor Default { Scale 0.24; + Mass 1; Radius 2; Height 2; RenderStyle "Translucent"; @@ -99,6 +101,7 @@ Class UTBloodSpurt : Actor { +NOBLOCKMAP; +NOGRAVITY; + +DONTSPLASH; +NOTELEPORT; +THRUACTORS; } @@ -134,6 +137,7 @@ Class UTBloodTrail : Actor +NOBLOCKMAP; +NOGRAVITY; +NOTELEPORT; + +DONTSPLASH; +THRUACTORS; } override void PostBeginPlay() @@ -183,6 +187,7 @@ Class UTBloodPuff : Actor +NOBLOCKMAP; +NOGRAVITY; +NOTELEPORT; + +DONTSPLASH; +FORCEXYBILLBOARD; } States @@ -284,12 +289,13 @@ Class UTGib : Actor { Radius 4; Height 4; - BounceType "Doom"; - BounceFactor 0.7; - WallBounceFactor 0.7; + BounceType "Hexen"; + BounceFactor 0.8; + WallBounceFactor 0.8; +ROLLSPRITE; +ROLLCENTER; +INTERPOLATEANGLES; + +CANBOUNCEWATER; +MISSILE; +THRUACTORS; +USEBOUNCESTATE; @@ -297,19 +303,30 @@ Class UTGib : Actor override void PostBeginPlay() { Super.PostBeginPlay(); - let t = Spawn("UTBloodTrail",pos); - t.target = self; - if ( bloodcolor ) t.SetShade(bloodcolor); - else t.SetShade(gameinfo.defaultbloodcolor); - t.translation = bloodtranslation; + tracer = Spawn("UTBloodTrail",pos); + tracer.target = self; + if ( bloodcolor ) tracer.SetShade(bloodcolor); + else tracer.SetShade(gameinfo.defaultbloodcolor); + tracer.translation = bloodtranslation; rollvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1); anglevel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1); pitchvel = FRandom[Blod](5,15)*RandomPick[Blod](-1,1); } void A_HandleBounce() { - if ( vel.length() > double.epsilon ) - vel = (vel.unit()+(FRandom[Blod](-0.2,0.2),FRandom[Blod](-0.2,0.2),FRandom[Blod](-0.2,0.2))).unit()*vel.length(); + double spd = vel.length(); + if ( spd > double.epsilon ) + vel = (vel.unit()+(FRandom[Blod](-0.2,0.2),FRandom[Blod](-0.2,0.2),FRandom[Blod](-0.2,0.2))).unit()*spd; + if ( BlockingFloor && (vel.xy.length() < 1) ) + { + ClearBounce(); + ExplodeMissile(); + } + if ( spd < 10 ) + { + if ( tracer ) tracer.Destroy(); + } + else if ( spd > 20 ) vel *= 0.8; A_PlaySound("misc/gibp"); double ang, pt; for ( int i=0; i<6; i++ )