From c0211a4ccdb2cddeab3a1e3b6166599629a3dc4c Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Fri, 16 Apr 2021 18:09:59 +0200 Subject: [PATCH] Allow cocking Silver Bullet while zoomed. Achievement tweaks, some other stuff. --- achievements.lst | 56 +++--- language.version | 4 +- zscript/swwm_player.zsc | 278 +++++++++++++-------------- zscript/swwm_statichandler.zsc | 24 ++- zscript/weapons/swwm_thiccboolet.zsc | 50 ++++- 5 files changed, 237 insertions(+), 175 deletions(-) diff --git a/achievements.lst b/achievements.lst index 237a86a82..4d06e1fc7 100644 --- a/achievements.lst +++ b/achievements.lst @@ -7,43 +7,43 @@ # hasformat: the TXT string has a %d in it to substitute for maxval # gametype: the game this belongs to (any, doom, heretic, hexen, raven, etc.) abort,0,no,any -acid,200,yes,any +acid,100,yes,any allcoll,-1,no,any -allitems,30,yes,any +allitems,50,yes,any allkills,30,yes,any -allsecrets,30,yes,nothexen -anom,25,yes,any +allsecrets,40,yes,nothexen +anom,10,yes,any anone,0,no,any balls,10,yes,any -barrier,25,yes,doom -bonk,300,yes,any -bossdash,10,yes,any +barrier,20,yes,doom +bonk,500,yes,any +bossdash,5,yes,any brake,30,yes,any -bune,200,yes,any -bustin,40,yes,any +bune,1000,yes,any +bustin,50,yes,any butts,100,yes,any cheat,0,no,any cliffyb,0,no,nothexen clonk,0,no,any conga,15,yes,any -#dab,100,yes,any +#dab,200,yes,any #dakka,60,no,any dime,0,no,any dosh,1000000000,no,any everything,0,no,any ezkill,100,yes,any flight,2000,yes,any -friend,30,yes,any -fuel,400,yes,any +friend,40,yes,any +fuel,600,yes,any #fuller,0,no,any -gcsandwich,25,yes,any +gcsandwich,10,yes,any #gepgun,30,yes,any -ghost,25,yes,any -gib,1000,yes,any +ghost,30,yes,any +gib,1500,yes,any golden,24,yes,any -gravity,25,yes,raven +gravity,10,yes,raven #hnd,6,yes,any -jump,100,yes,any +jump,250,yes,any lead,1500,yes,any #lightning,0,no,any ligma,0,no,any @@ -56,28 +56,28 @@ nice,0,no,any oneguy,0,no,any onestanding,0,no,any oopsie,0,no,any -par,30,yes,nothexen -parry,100,yes,any +par,15,yes,nothexen +parry,300,yes,any #pene,20,yes,any -plush,20,yes,any -rage,25,yes,any +plush,10,yes,any +rage,20,yes,any reflect,20,yes,any -refresh,25,yes,any -#roast,30,yes,any +refresh,30,yes,any +#roast,50,yes,any salt,0,no,any sanic,800,yes,any sekiro,0,no,any shame,0,no,any shock,30,yes,any -slayer,40,yes,any -slemg,50,yes,any +slayer,100,yes,any +slemg,400,yes,any sneeze,20,yes,any step,60,yes,any stomp,50,yes,any -sunny,25,yes,any +sunny,15,yes,any tele,0,no,any -thicc,100,yes,any -thruwall,25,yes,any +thicc,150,yes,any +thruwall,20,yes,any wantdie,0,no,any wave,0,no,any yeet,0,no,doom diff --git a/language.version b/language.version index c947933c8..3243211b2 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r445 \cu(Wed 14 Apr 20:44:54 CEST 2021)\c-"; -SWWM_SHORTVER="\cw0.9.11b-pre r445 \cu(2021-04-14 20:44:54)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r446 \cu(Fri 16 Apr 18:09:59 CEST 2021)\c-"; +SWWM_SHORTVER="\cw0.9.11b-pre r446 \cu(2021-04-16 18:09:59)\c-"; diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index c74a0e691..a6d89f801 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -1561,9 +1561,9 @@ Class Demolitionist : PlayerPawn bobfactor = (friction maxspd ) vel = (vel+accel/GameTicRate).unit()*spd; + else vel = vel+accel/GameTicRate; + } if ( !(player.cheats&CF_PREDICTING) && (nmove.length() > 0.) ) PlayRunning(); if ( player.cheats&CF_REVERTPLEASE ) @@ -1596,18 +1609,7 @@ Class Demolitionist : PlayerPawn player.camera = player.mo; } } - // override air control because we REALLY need the extra mobility - if ( !player.onground && !bNOGRAVITY && (waterlevel < 2) ) - { - double fs = TweakSpeed(); - if ( CanCrouch() && (player.crouchfactor != -1) ) fs *= player.crouchfactor; - Vector3 accel = (RotateVector(NormalizedMove(),angle),0); - accel *= fs/512.; - double spd = vel.length(); - if ( spd > 10. ) vel = (vel+accel/GameTicRate).unit()*spd; - else vel = vel+accel/GameTicRate; - } - else vel *= .95; // quickly decelerate if we're not holding movement keys + else if ( player.onground ) vel *= .95; // quickly decelerate if we're not holding movement keys if ( abs(roll) > 0. ) A_SetRoll(roll+clamp(deltaangle(roll,0),-3.,3.),SPF_INTERPOLATE); } guideangle *= .9; @@ -1685,6 +1687,7 @@ Class Demolitionist : PlayerPawn override void CheckJump() { if ( InStateSequence(CurState,FindState("Dash")) ) return; // do not + if ( !(player.cmd.buttons&BT_JUMP) || (gamestate != GS_LEVEL) ) return; Vector2 walldir = (cos(angle),sin(angle)); bool walljump = false, wallclimb = false; double climbvelz = 0.; @@ -1769,132 +1772,129 @@ Class Demolitionist : PlayerPawn } if ( wallclimb ) break; } - if ( (player.cmd.buttons&BT_JUMP) && (gamestate == GS_LEVEL) ) + // cooldown before we can do these, avoids accidental walljumps off ledges we just fell off from + if ( level.maptime < (lastgroundtic+4) ) { - // cooldown before we can do these, avoids accidental walljumps off ledges we just fell off from - if ( level.maptime < (lastgroundtic+4) ) - { - walljump = false; - wallclimb = false; - jumpactor = null; - } - if ( player.crouchoffset ) player.crouching = 1; - else if ( waterlevel >= 2 ) vel.z = 4*Speed; - else if ( (waterlevel < 2) && bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) ) return; - else if ( bNoGravity ) vel.z = 3; - else if ( level.IsJumpingAllowed() - && ((player.onground && (player.jumptics == 0)) - || (!player.onground && (level.maptime > last_jump_held) && (((dashfuel > 10.) && (boostcooldown <= 0)) || walljump || wallclimb))) ) - { - if ( !player.onground && (((walljump || wallclimb) && (level.maptime < last_kick+8)) || (!(walljump || wallclimb) && (level.maptime < last_boost+8))) ) - return; - double jumpvelz = JumpZ*35./GameTicRate; - double jumpfac = 0; - for ( let p=Inv; p; p=p.Inv ) - { - let pp = PowerHighJump(p); - if ( pp ) - { - double f = pp.Strength; - if ( f > jumpfac ) jumpfac = f; - } - } - if ( jumpfac > 0 ) jumpvelz *= jumpfac; - bool raging = FindInventory("RagekitPower"); - if ( raging ) jumpvelz *= 2.; - double pvelz = vel.z; - if ( !player.onground && !(player.cheats&CF_PREDICTING) ) - { - // check for wall stuff - if ( walljump ) - { - if ( vel.z < 10. ) - vel.z += 2.*jumpvelz+clamp(-pvelz*.6,0.,30.); - vel.xy += walldir*20*Speed; - lastbump *= .95; - } - else if ( wallclimb ) - { - if ( vel.z < 10. ) - vel.z += climbvelz+clamp(-pvelz*.95,0.,30.); - vel.xy += walldir*10*Speed; - lastbump *= .97; - } - if ( walljump && jumpactor && jumpactor.bSHOOTABLE ) - { - SWWMUtility.DoKnockback(jumpactor,(-walldir,0),12000); - int dmg = jumpactor.DamageMobj(self,self,10,'Jump'); - if ( raging ) - { - let ps = Spawn("BigPunchSplash",pos); - ps.damagetype = 'Jump'; - ps.target = self; - ps.special1 = dmg; - } - } - if ( walljump || wallclimb ) - { - A_StartSound(walljump?"demolitionist/kick":"demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP); - if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:100); - last_kick = level.maptime+1; - SWWMUtility.AchievementProgressInc('swwm_progress_jump',1,player); - } - } - bOnMobj = false; - player.jumpTics = -1; - if ( !(player.cheats&CF_PREDICTING) ) - { - A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP); - if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:100); - } - if ( (dashfuel > 10.) && !player.onground && !walljump && !wallclimb ) - { - dashboost = 3.; - boostcooldown = 20; - if ( vel.z < 10. ) - vel.z += jumpvelz+clamp(-pvelz*.4,0.,30.); - A_StartSound("demolitionist/jet",CHAN_JETPACK,CHANF_LOOP); - lastbump *= .95; - mystats.boostcount++; - last_boost = level.maptime+1; - double newp = min(90.,pitch+3.); - bumppitch.Push(newp-pitch); - A_SetPitch(newp,SPF_INTERPOLATE); - } - else - { - dashboost = 0.; - double bpitch = clamp((vel.length()-10)/5.,0.,20.); - double newp = min(90.,pitch+bpitch); - bumppitch.Push(newp-pitch); - A_SetPitch(newp,SPF_INTERPOLATE); - // bunnyhop time - if ( !walljump && !wallclimb ) - { - if ( (player.cmd.buttons&BT_RUN) && (level.maptime < (lastairtic+10)) ) - { - SWWMUtility.AchievementProgressInc('swwm_progress_bune',1,player); - // bhop, z vel relative to vel size - if ( vel.z < 25. ) // don't ramp up too hard - vel.z += jumpvelz*(1.2+vel.length()*.01); - // accelerate - vel.xy += (RotateVector(NormalizedMove(),angle)/2400.)*(1.+vel.length()*.025)*TweakSpeed(); - } - else - { - // first jump - if ( vel.z < 10. ) // don't ramp up too hard - vel.z += jumpvelz*((player.cmd.buttons&BT_RUN)?1.25:1.); - // long jump if running - if ( !walljump && !wallclimb && (player.cmd.buttons&BT_RUN) ) - (vel.xy += RotateVector(NormalizedMove(),angle)/1500.)*(raging?2.:1.)*TweakSpeed(); - } - } - } - SetStateLabel("Jump"); - } - last_jump_held = level.maptime+1; + walljump = false; + wallclimb = false; + jumpactor = null; } + if ( player.crouchoffset ) player.crouching = 1; + else if ( waterlevel >= 2 ) vel.z = 4*Speed; + else if ( (waterlevel < 2) && bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) ) return; + else if ( bNoGravity ) vel.z = 3; + else if ( level.IsJumpingAllowed() + && ((player.onground && (player.jumptics == 0)) + || (!player.onground && (level.maptime > last_jump_held) && (((dashfuel > 10.) && (boostcooldown <= 0)) || walljump || wallclimb))) ) + { + if ( !player.onground && (((walljump || wallclimb) && (level.maptime < last_kick+8)) || (!(walljump || wallclimb) && (level.maptime < last_boost+8))) ) + return; + double jumpvelz = JumpZ*35./GameTicRate; + double jumpfac = 0; + for ( let p=Inv; p; p=p.Inv ) + { + let pp = PowerHighJump(p); + if ( pp ) + { + double f = pp.Strength; + if ( f > jumpfac ) jumpfac = f; + } + } + if ( jumpfac > 0 ) jumpvelz *= jumpfac; + bool raging = FindInventory("RagekitPower"); + if ( raging ) jumpvelz *= 2.; + double pvelz = vel.z; + if ( !player.onground && !(player.cheats&CF_PREDICTING) ) + { + // check for wall stuff + if ( walljump ) + { + if ( vel.z < 10. ) + vel.z += 2.*jumpvelz+clamp(-pvelz*.6,0.,30.); + vel.xy += walldir*20*Speed; + lastbump *= .95; + } + else if ( wallclimb ) + { + if ( vel.z < 10. ) + vel.z += climbvelz+clamp(-pvelz*.95,0.,30.); + vel.xy += walldir*10*Speed; + lastbump *= .97; + } + if ( walljump && jumpactor && jumpactor.bSHOOTABLE ) + { + SWWMUtility.DoKnockback(jumpactor,(-walldir,0),12000); + int dmg = jumpactor.DamageMobj(self,self,10,'Jump'); + if ( raging ) + { + let ps = Spawn("BigPunchSplash",pos); + ps.damagetype = 'Jump'; + ps.target = self; + ps.special1 = dmg; + } + } + if ( walljump || wallclimb ) + { + A_StartSound(walljump?"demolitionist/kick":"demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP); + if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:100); + last_kick = level.maptime+1; + SWWMUtility.AchievementProgressInc('swwm_progress_jump',1,player); + } + } + bOnMobj = false; + player.jumpTics = -1; + if ( !(player.cheats&CF_PREDICTING) ) + { + A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP); + if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:100); + } + if ( (dashfuel > 10.) && !player.onground && !walljump && !wallclimb ) + { + dashboost = 3.; + boostcooldown = 20; + if ( vel.z < 10. ) + vel.z += jumpvelz+clamp(-pvelz*.4,0.,30.); + A_StartSound("demolitionist/jet",CHAN_JETPACK,CHANF_LOOP); + lastbump *= .95; + mystats.boostcount++; + last_boost = level.maptime+1; + double newp = min(90.,pitch+3.); + bumppitch.Push(newp-pitch); + A_SetPitch(newp,SPF_INTERPOLATE); + } + else + { + dashboost = 0.; + double bpitch = clamp((vel.length()-10)/5.,0.,20.); + double newp = min(90.,pitch+bpitch); + bumppitch.Push(newp-pitch); + A_SetPitch(newp,SPF_INTERPOLATE); + // bunnyhop time + if ( !walljump && !wallclimb ) + { + if ( (player.cmd.buttons&BT_RUN) && (level.maptime < (lastairtic+10)) ) + { + SWWMUtility.AchievementProgressInc('swwm_progress_bune',1,player); + // bhop, z vel relative to vel size + if ( vel.z < 25. ) // don't ramp up too hard + vel.z += jumpvelz*(1.2+vel.length()*.01); + // accelerate + vel.xy += (RotateVector(NormalizedMove(),angle)/2400.)*(1.+vel.length()*.025)*TweakSpeed(); + } + else + { + // first jump + if ( vel.z < 10. ) // don't ramp up too hard + vel.z += jumpvelz*((player.cmd.buttons&BT_RUN)?1.25:1.); + // long jump if running + if ( !walljump && !wallclimb && (player.cmd.buttons&BT_RUN) ) + (vel.xy += RotateVector(NormalizedMove(),angle)/1500.)*(raging?2.:1.)*TweakSpeed(); + } + } + } + SetStateLabel("Jump"); + } + last_jump_held = level.maptime+1; } override void DeathThink() { diff --git a/zscript/swwm_statichandler.zsc b/zscript/swwm_statichandler.zsc index 856af873c..568e70df9 100644 --- a/zscript/swwm_statichandler.zsc +++ b/zscript/swwm_statichandler.zsc @@ -181,7 +181,29 @@ Class SWWMStaticHandler : StaticEventHandler } if ( str == "" ) Console.Printf("No Data"); else Console.Printf(str); - return; + } + else if ( e.Name ~== "swwmresetachievements" ) + { + if ( achievements.Size() <= 0 ) + SWWMUtility.LoadAchievements(achievements); + for ( int i=0; i0); + if ( invoker.clipcount > 0 ) invoker.fcbchambered = invoker.fcbloaded; + invoker.clipcount = max(0,invoker.clipcount-1); + } + TNT1 A 2 A_StartSound("silverbullet/boltclose",CHAN_WEAPON,CHANF_OVERLAP); + TNT1 A 20 A_StartSound("silverbullet/meleeend",CHAN_WEAPON,CHANF_OVERLAP); + Goto ZoomReady; DoCock: XZW2 A 2 A_StartSound("silverbullet/meleestart",CHAN_WEAPON,CHANF_OVERLAP); XZW2 XYZ 2; @@ -1086,6 +1110,22 @@ Class SilverBullet : SWWMWeapon XZW9 I 2 A_StartSound("silverbullet/meleeend",CHAN_WEAPON,CHANF_OVERLAP); XZW9 JKLMNOPQR 2; Goto Ready2; + ZoomCasing: + TNT1 A 14; + TNT1 A 0 A_DropCasing(); + Stop; + ZoomCasing2: + TNT1 A 14; + TNT1 A 0 A_DropCasing(true); + Stop; + ZoomBullet: + TNT1 A 14; + TNT1 A 0 A_DropBullet(); + Stop; + ZoomBullet2: + TNT1 A 14; + TNT1 A 0 A_DropBullet(true); + Stop; Casing: XZW7 D 2 {