diff --git a/ExtendedLore.md b/ExtendedLore.md index 9bb40d741..2e629c806 100644 --- a/ExtendedLore.md +++ b/ExtendedLore.md @@ -247,11 +247,11 @@ resemblance is definitely there. She is well known for being quite blunt when talking to people, and also for being exaggeratedly flirty around attractive women. -Her favourite colour is green, favourite animal is the otter, and favourite -dish is pepperoni pizza. She also enjoys drone metal. Likes baggy clothes, -refuses to wear skirts, only pants. Uses Arch, favourite editor is vim, -favourite programming language is haskell. Her top "turn-ons" are well-endowed -women, maids, femboys and heterochromia. She doesn't use deodorant or cologne, +Her favourite colour is red, favourite animal is the otter, and favourite dish +is pepperoni pizza. She also enjoys drone metal. Likes baggy clothes, refuses +to wear skirts, only pants. Uses Arch, favourite editor is vim, favourite +programming language is haskell. Her top "turn-ons" are well-endowed women, +maids, femboys and heterochromia. She doesn't use deodorant or cologne, although people around her remark that her BO is "kind of nice actually". She has an older brother, Taro, and a younger sister, Yui. Thanks to the diff --git a/graphics/HUD/ChatBoxBottom.png b/graphics/HUD/ChatBoxBottom.png new file mode 100644 index 000000000..0188c6e49 Binary files /dev/null and b/graphics/HUD/ChatBoxBottom.png differ diff --git a/graphics/HUD/ChatBoxLine.png b/graphics/HUD/ChatBoxLine.png new file mode 100644 index 000000000..5047453c4 Binary files /dev/null and b/graphics/HUD/ChatBoxLine.png differ diff --git a/graphics/HUD/ChatBoxTop.png b/graphics/HUD/ChatBoxTop.png new file mode 100644 index 000000000..963ba861c Binary files /dev/null and b/graphics/HUD/ChatBoxTop.png differ diff --git a/graphics/HUD/DashIcon.png b/graphics/HUD/DashIcon.png new file mode 100644 index 000000000..ea5743c5e Binary files /dev/null and b/graphics/HUD/DashIcon.png differ diff --git a/graphics/HUD/FuelBar.png b/graphics/HUD/FuelBar.png new file mode 100644 index 000000000..28e9c4a69 Binary files /dev/null and b/graphics/HUD/FuelBar.png differ diff --git a/graphics/HUD/HealthBar0.png b/graphics/HUD/HealthBar0.png new file mode 100644 index 000000000..9f9e2809f Binary files /dev/null and b/graphics/HUD/HealthBar0.png differ diff --git a/graphics/HUD/HealthBar1.png b/graphics/HUD/HealthBar1.png new file mode 100644 index 000000000..69f33e192 Binary files /dev/null and b/graphics/HUD/HealthBar1.png differ diff --git a/graphics/HUD/HealthBar2.png b/graphics/HUD/HealthBar2.png new file mode 100644 index 000000000..59a126f48 Binary files /dev/null and b/graphics/HUD/HealthBar2.png differ diff --git a/graphics/HUD/HealthBar3.png b/graphics/HUD/HealthBar3.png new file mode 100644 index 000000000..9e122bf20 Binary files /dev/null and b/graphics/HUD/HealthBar3.png differ diff --git a/graphics/HUD/Icons/I_BlastSuit.png b/graphics/HUD/Icons/I_BlastSuit.png new file mode 100644 index 000000000..81ba9c2dd Binary files /dev/null and b/graphics/HUD/Icons/I_BlastSuit.png differ diff --git a/graphics/HUD/Icons/I_ExploAmmo.png b/graphics/HUD/Icons/I_ExploAmmo.png new file mode 100644 index 000000000..815b85d05 Binary files /dev/null and b/graphics/HUD/Icons/I_ExploAmmo.png differ diff --git a/graphics/HUD/Icons/I_Gravity.png b/graphics/HUD/Icons/I_Gravity.png new file mode 100644 index 000000000..ce91d0623 Binary files /dev/null and b/graphics/HUD/Icons/I_Gravity.png differ diff --git a/graphics/HUD/InventoryBox.png b/graphics/HUD/InventoryBox.png new file mode 100644 index 000000000..35da084bc Binary files /dev/null and b/graphics/HUD/InventoryBox.png differ diff --git a/graphics/HUD/ScoreBox.png b/graphics/HUD/ScoreBox.png new file mode 100644 index 000000000..d7ce3bea2 Binary files /dev/null and b/graphics/HUD/ScoreBox.png differ diff --git a/graphics/HUD/StatusBox.png b/graphics/HUD/StatusBox.png new file mode 100644 index 000000000..f3002784a Binary files /dev/null and b/graphics/HUD/StatusBox.png differ diff --git a/graphics/HUD/WeaponBox.png b/graphics/HUD/WeaponBox.png new file mode 100644 index 000000000..a25549311 Binary files /dev/null and b/graphics/HUD/WeaponBox.png differ diff --git a/graphics/HUDMockup.xcf b/graphics/HUDMockup.xcf new file mode 100644 index 000000000..1318e7f52 Binary files /dev/null and b/graphics/HUDMockup.xcf differ diff --git a/modeldef.explodiumgun b/modeldef.explodiumgun index 775994865..fe1b672a4 100644 --- a/modeldef.explodiumgun +++ b/modeldef.explodiumgun @@ -5,6 +5,7 @@ Model "ExplodiumGun" Skin 0 "ExplodiumGun.png" Scale 0.03 0.03 0.03 ZOffset 16 + ROTATING FrameIndex XZW1 A 0 0 } diff --git a/zmapinfo.txt b/zmapinfo.txt index 584bbc925..7869823d9 100644 --- a/zmapinfo.txt +++ b/zmapinfo.txt @@ -4,6 +4,7 @@ GameInfo IntermissionMusic = "music/DRAGONY.XM" PlayerClasses = "Demolitionist" PrecacheClasses = "Demolitionist","ExplodiumGun" + StatusBarClass = "SWWMStatusBar" } Map TITLEMAP "SWWM GZ - Title Map" diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index 6b9af0ace..586fb1236 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -9,8 +9,6 @@ enum ESWWMGZChannels CHAN_POWERUPEXTRA = 63205, }; -const PSP_PLAYERTAG = 100; - // Handler responsible for item replacements and whatever else Class SWWMHandler : EventHandler { @@ -58,7 +56,6 @@ Class SWWMCrashHandler : StaticEventHandler Console.Printf(TEXTCOLOR_GOLD.."Oopsie Woopsie!"..TEXTCOLOR_NORMAL); S_StartSound("crash/glass",CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE); S_StartSound("crash/glass",CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE); - S_StartSound("crash/glass",CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE); } else if ( timer == 140 ) { @@ -125,71 +122,3 @@ Class SWWMBrutalHandler : StaticEventHandler Screen.Dim("Red",(timer/70.)-3.5,0,0,Screen.GetWidth(),Screen.GetHeight()); } } - -// Base class for all SWWM Weapons -Class SWWMWeapon : Weapon -{ - override void DetachFromOwner() - { - Owner.A_StopSound(CHAN_WEAPON); - Owner.A_StopSound(CHAN_WEAPONEXTRA); - Super.DetachFromOwner(); - } - override void OwnerDied() - { - if ( Owner.player && (Owner.player.ReadyWeapon == self) ) - { - Owner.A_StopSound(CHAN_WEAPON); - Owner.A_StopSound(CHAN_WEAPONEXTRA); - } - A_ClearRefire(); - Super.OwnerDied(); - } - // instant raise/lower - action void A_FullRaise() - { - if ( !player ) return; - if ( player.PendingWeapon != WP_NOCHANGE ) - { - player.mo.DropWeapon(); - return; - } - if ( !player.ReadyWeapon ) return; - let psp = player.GetPSprite(PSP_WEAPON); - psp.y = WEAPONTOP; - } - action void A_FullLower() - { - if ( !player ) return; - if ( !player.ReadyWeapon ) - { - player.mo.BringUpWeapon(); - return; - } - let psp = player.GetPSprite(PSP_WEAPON); - psp.y = WEAPONBOTTOM; - if ( player.playerstate == PST_DEAD ) - { - // Player is dead, so don't bring up a pending weapon - // Player is dead, so keep the weapon off screen - player.SetPSprite(PSP_FLASH,null); - player.SetPSprite(PSP_PLAYERTAG,null); - psp.SetState(player.ReadyWeapon.FindState('DeadLowered')); - return; - } - // [RH] Clear the flash state. Only needed for Strife. - player.SetPSprite(PSP_FLASH,null); - player.mo.BringUpWeapon(); - } - Default - { - Weapon.BobStyle "Alpha"; - Weapon.BobSpeed 3.0; - Weapon.BobRangeX 0.5; - Weapon.BobRangeY 0.2; - Weapon.YAdjust 0; - +WEAPON.NOALERT; - +FLOATBOB; - FloatBobStrength 0.25; - } -} diff --git a/zscript/swwm_hud.zsc b/zscript/swwm_hud.zsc index 689760d60..ae837840b 100644 --- a/zscript/swwm_hud.zsc +++ b/zscript/swwm_hud.zsc @@ -1 +1,89 @@ // The SWWM GZ HUD is mostly built on top of what I had already done for SWWM Z, also a bit of Dark Souls + +Class MsgLine +{ + String str; + int tic, type, rep; +} + +Class SWWMStatusBar : BaseStatusBar +{ + TextureID StatusTex, WeaponTex, ScoreTex, InventoryTex, ChatTex[3], + HealthTex[4], FuelTex, DashTex; + HUDFont mTewiFont; + + Array ChatMsgs, DeathMsgs, MiscMsgs, PickMsgs; + + // client cvars + transient CVar safezone, maxchat, maxdeath, maxmisc, maxpick; + + DynamicValueInterpolator HealthInter; + + override void FlushNotify() + { + ChatMsgs.Clear(); + DeathMsgs.Clear(); + MiscMsgs.Clear(); + PickMsgs.Clear(); + } + + override void Tick() + { + Super.Tick(); + // prune old messages + HealthInter.Update(CPlayer.health); + } + + override void Init() + { + Super.Init(); + SetSize(0,640,400); + StatusTex = TexMan.CheckForTexture("graphics/HUD/StatusBox.png",TexMan.Type_Any); + DashTex = TexMan.CheckForTexture("graphics/HUD/DashIcon.png",TexMan.Type_Any); + FuelTex = TexMan.CheckForTexture("graphics/HUD/FuelBar.png",TexMan.Type_Any); + HealthTex[0] = TexMan.CheckForTexture("graphics/HUD/HealthBar0.png",TexMan.Type_Any); + HealthTex[1] = TexMan.CheckForTexture("graphics/HUD/HealthBar1.png",TexMan.Type_Any); + HealthTex[2] = TexMan.CheckForTexture("graphics/HUD/HealthBar2.png",TexMan.Type_Any); + HealthTex[3] = TexMan.CheckForTexture("graphics/HUD/HealthBar3.png",TexMan.Type_Any); + mTewiFont = HUDFont.Create("TewiShaded"); + HealthInter = DynamicValueInterpolator.Create(1000,2.5,1,32); + } + + override void Draw( int state, double TicFrac ) + { + Super.Draw(state,TicFrac); + if ( (state != HUD_StatusBar) && (state != HUD_Fullscreen) ) return; + BeginHUD(); + let d = Demolitionist(CPlayer.mo); + Vector2 hs = GetHUDScale(); + Vector2 ss = (Screen.GetWidth()/hs.x,Screen.GetHeight()/hs.y); + Screen.DrawTexture(StatusTex,false,20,ss.y-47,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( d && (((d.dashcooldown <= 0) && (d.dashfuel >= 20.)) || (gametic%8 < 4)) ) + Screen.DrawTexture(DashTex,false,22,ss.y-45,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + int fw = d?int(d.dashfuel*1.12):0; + Screen.DrawTexture(FuelTex,false,42,ss.y-45,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRight,fw); + int ht = clamp(HealthInter.GetValue(),0,10000); + int hw = int(min(ht,1000)*0.1); + Screen.DrawTexture(HealthTex[0],false,22,ss.y-35,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRight,hw); + if ( ht > 1000 ) + { + hw = int(min(ht-1000,1000)*0.1); + Screen.DrawTexture(HealthTex[1],false,22,ss.y-35,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRight,hw); + } + if ( ht > 2000 ) + { + hw = int(min(ht-1000,4000)*0.025); + Screen.DrawTexture(HealthTex[2],false,22,ss.y-35,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRight,hw); + } + if ( ht > 5000 ) + { + hw = int(min(ht-5000,5000)*0.02); + Screen.DrawTexture(HealthTex[2],false,22,ss.y-35,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRight,hw); + } + int hcolor = Font.CR_RED; + if ( ht > 5000 ) hcolor = Font.CR_GOLD; + else if ( ht > 2000 ) hcolor = Font.CR_PURPLE; + else if ( ht > 1000 ) hcolor = Font.CR_CYAN; + Screen.DrawText(mTewiFont.mFont,hcolor,128,ss.y-36,String.Format("%04d",clamp(ht,0,9999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + } +} diff --git a/zscript/swwm_inventory.zsc b/zscript/swwm_inventory.zsc index 4579e3832..9cee10422 100644 --- a/zscript/swwm_inventory.zsc +++ b/zscript/swwm_inventory.zsc @@ -1 +1,138 @@ -// Base inventory code +// Scoring +Class SWWMCredits : Inventory +{ + Default + { + +INVENTORY.UNTOSSABLE; + +INVENTORY.UNDROPPABLE; + +INVENTORY.UNCLEARABLE; + +INVENTORY.ALWAYSPICKUP; + Inventory.MaxAmount 999999999; + Inventory.InterHubAmount 999999999; + } +} + +// Base class for all SWWM Armors +Class SWWMArmor : Armor +{ + int priority; + + Property ArmorPriority : priority; + + Default + { + +INVENTORY.AUTOACTIVATE; + +INVENTORY.UNTOSSABLE; + +INVENTORY.UNDROPPABLE; + +INVENTORY.KEEPDEPLETED; + +INVENTORY.ALWAYSPICKUP; + } + override void AttachToOwner( Actor other ) + { + Super.AttachToOwner(other); + // find last armor that's better than us + Inventory found = null; + for ( Inventory i=other.Inv; i; i=i.Inv ) + { + if ( !(i is 'SWWMArmor') || (i == self) || (SWWMArmor(i).priority < priority) ) continue; + found = i; + } + if ( !found ) return; + // place ourselves right after it + Inventory saved = found.Inv; + found.Inv = self; + other.Inv = Inv; + Inv = saved; + } + // for subclasses + virtual int HandleDamage( int damage, Name damageType ) + { + return damage; + } + override void AbsorbDamage( int damage, Name damageType, out int newdamage ) + { + int saved; + if ( (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) ) + { + saved = HandleDamage(damage,damageType); + if ( amount <= saved ) saved = amount; + newdamage -= saved; + amount -= saved; + damage = newdamage; + if ( amount <= 0 ) + { + if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage); + DepleteOrDestroy(); + return; + } + } + if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage); + } +} + +// Base class for all SWWM Weapons +Class SWWMWeapon : Weapon +{ + override void DetachFromOwner() + { + Owner.A_StopSound(CHAN_WEAPON); + Owner.A_StopSound(CHAN_WEAPONEXTRA); + Super.DetachFromOwner(); + } + override void OwnerDied() + { + if ( Owner.player && (Owner.player.ReadyWeapon == self) ) + { + Owner.A_StopSound(CHAN_WEAPON); + Owner.A_StopSound(CHAN_WEAPONEXTRA); + } + A_ClearRefire(); + Super.OwnerDied(); + } + // instant raise/lower + action void A_FullRaise() + { + if ( !player ) return; + if ( player.PendingWeapon != WP_NOCHANGE ) + { + player.mo.DropWeapon(); + return; + } + if ( !player.ReadyWeapon ) return; + let psp = player.GetPSprite(PSP_WEAPON); + psp.y = WEAPONTOP; + } + action void A_FullLower() + { + if ( !player ) return; + if ( !player.ReadyWeapon ) + { + player.mo.BringUpWeapon(); + return; + } + let psp = player.GetPSprite(PSP_WEAPON); + psp.y = WEAPONBOTTOM; + if ( player.playerstate == PST_DEAD ) + { + // Player is dead, so don't bring up a pending weapon + // Player is dead, so keep the weapon off screen + player.SetPSprite(PSP_FLASH,null); + psp.SetState(player.ReadyWeapon.FindState('DeadLowered')); + return; + } + // [RH] Clear the flash state. Only needed for Strife. + player.SetPSprite(PSP_FLASH,null); + player.mo.BringUpWeapon(); + } + Default + { + Weapon.BobStyle "Alpha"; + Weapon.BobSpeed 3.0; + Weapon.BobRangeX 0.5; + Weapon.BobRangeY 0.2; + Weapon.YAdjust 0; + +WEAPON.NOALERT; + +FLOATBOB; + FloatBobStrength 0.25; + } +} \ No newline at end of file diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index c332452a5..78f1c11ce 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -1,11 +1,10 @@ // The Demolitionist Class Demolitionist : PlayerPawn { - int extrajumps; int last_jump_held; Vector3 dashdir; - double dashfuel; - int dashcooldown; + double dashfuel, dashboost; + int dashcooldown, boostcooldown, fuelcooldown; int lastdamage; @@ -24,26 +23,51 @@ Class Demolitionist : PlayerPawn Player.AirCapacity 0; Player.GruntSpeed 20; Player.SoundClass "demolitionist"; + +NOBLOOD; + +DONTGIB; + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + dashfuel = 100.; } action void A_Dash() { - vel += invoker.dashdir*invoker.dashfuel; + vel += invoker.dashdir*invoker.dashboost; player.vel = vel.xy; - if ( invoker.dashfuel < 0.1 ) invoker.dashfuel = 0.; - else invoker.dashfuel *= 0.9; + if ( invoker.dashboost < 0.1 ) invoker.dashboost = 0.; + else invoker.dashboost *= 0.5; + invoker.dashfuel = max(0.,invoker.dashfuel-invoker.dashboost); invoker.dashcooldown = 40; + invoker.fuelcooldown = 20; + if ( (invoker.dashfuel <= 0.) || (invoker.dashboost <= 0.) ) + SetStateLabel("DashEnd"); } - action void A_BoostUp() + action void A_BoostUp( bool initial = false ) { + vel += (0,0,1)*invoker.dashboost; player.vel = vel.xy; - vel += (0,0,1)*invoker.dashfuel; - if ( invoker.dashfuel < 0.1 ) invoker.dashfuel = 0.; - else invoker.dashfuel *= 0.9; + if ( invoker.dashboost < 0.1 ) invoker.dashboost = 0.; + else invoker.dashboost *= 0.9; + invoker.dashfuel = max(0.,invoker.dashfuel-invoker.dashboost); + if ( ((invoker.dashfuel <= 0.) || (invoker.dashboost <= 0.)) ) + { + if ( !initial ) + { + if ( pos.z>floorz ) SetStateLabel("Fall"); + else SetStateLabel("JumpEnd"); + } + return; + } + invoker.fuelcooldown = 10; } override void Tick() { Super.Tick(); bNOFRICTION = InStateSequence(CurState,FindState("Dash")); + fuelcooldown = max(0,fuelcooldown-1); + if ( fuelcooldown <= 0 ) + dashfuel = min(100.,dashfuel+max(dashfuel*.01,.05)); } override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle ) { @@ -56,11 +80,7 @@ Class Demolitionist : PlayerPawn Super.MovePlayer(); if ( !(player.cmd.forwardmove|player.cmd.sidemove) ) PlayIdle(); - if ( player.onground ) - { - last_jump_held = int.min; - extrajumps = 3; - } + if ( player.onground ) last_jump_held = int.min; Vector3 dodge = (0,0,0), x, y, z; [x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll); int fm = player.cmd.forwardmove; @@ -70,11 +90,11 @@ Class Demolitionist : PlayerPawn if ( sm ) dodge += (sm>0)?Y:-Y; if ( player.onground ) dodge.z = max(0,dodge.z); dodge.z += .15; - if ( (dodge.length() > 0) && (dashcooldown <= 0) && player.cmd.buttons&BT_STRAFE ) + if ( (dodge.length() > 0) && (dashcooldown <= 0) && (dashfuel > 20.) && player.cmd.buttons&BT_STRAFE ) { dashdir = dodge.unit(); dashcooldown = 40; - dashfuel = 10.; + dashboost = 20.; bOnMobj = false; if ( player.cheats & CF_REVERTPLEASE ) { @@ -85,10 +105,12 @@ Class Demolitionist : PlayerPawn player.jumptics = -1; SetStateLabel("Dash"); last_jump_held = int.min; - extrajumps = max(1,extrajumps); } else if ( player.onground || !(level.maptime%3) ) + { dashcooldown = max(0,dashcooldown-1); + boostcooldown = max(0,boostcooldown-1); + } } override void CheckJump() { @@ -99,9 +121,8 @@ Class Demolitionist : PlayerPawn if ( player.crouchoffset ) player.crouching = 1; else if ( waterlevel >= 2 ) vel.z = 4*Speed; else if ( bNoGravity ) vel.z = 3.; - else if ( level.IsJumpingAllowed() && (last_jump_held < gametic-4) && ((extrajumps > 0) || walljump) ) + else if ( level.IsJumpingAllowed() && (last_jump_held < gametic-4) && (((dashfuel > 10.) && (boostcooldown <= 0)) || player.onground || walljump) ) { - if ( !player.onground ) extrajumps--; double jumpvelz = JumpZ*35./TICRATE; double jumpfac = 0; for ( let p=Inv; p; p=p.Inv ) @@ -115,22 +136,23 @@ Class Demolitionist : PlayerPawn } if ( jumpfac > 0 ) jumpvelz *= jumpfac; vel.z = max(0,vel.z)+jumpvelz; + vel.z *= 1.25; if ( !player.onground ) { - vel.z *= 1.25; // check for wall kicks if ( walljump ) - { - extrajumps = max(1,extrajumps); - vel.z *= .5; vel.xy = (cos(angle),sin(angle))*20*Speed; - } } bOnMobj = false; player.jumpTics = -1; if ( !(player.cheats&CF_PREDICTING) ) A_StartSound("*jump",CHAN_BODY); - dashfuel = 3.; + if ( (dashfuel > 10.) && !player.onground && !walljump ) + { + dashboost = 3.; + boostcooldown = 5; + } + else dashboost = 0.; SetStateLabel("Jump"); } last_jump_held = gametic; @@ -152,7 +174,9 @@ Class Demolitionist : PlayerPawn || InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd")) ) + || InStateSequence(CurState,FindState("SeeFastEnd")) + || InStateSequence(CurState,FindState("Float")) + || InStateSequence(CurState,FindState("FloatLoop")) ) SetStateLabel("StartCrouch"); } else @@ -160,7 +184,9 @@ Class Demolitionist : PlayerPawn if ( InStateSequence(CurState,FindState("Crouch")) || InStateSequence(CurState,FindState("CrouchMove")) ) SetStateLabel("EndCrouch"); - else if ( InStateSequence(CurState,FindState("See")) ) + else if ( InStateSequence(CurState,FindState("See")) + || InStateSequence(CurState,FindState("Float")) + || InStateSequence(CurState,FindState("FloatLoop")) ) SetStateLabel("Spawn"); else if ( InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState("SeeFastLoop")) ) @@ -175,7 +201,9 @@ Class Demolitionist : PlayerPawn || InStateSequence(CurState,FindState("See")) || InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd"))) + || InStateSequence(CurState,FindState("SeeFastEnd")) + || InStateSequence(CurState,FindState("Float")) + || InStateSequence(CurState,FindState("FloatLoop"))) && (abs(pos.z-floorz) > maxstepheight) ) SetStateLabel("Fall"); } @@ -188,7 +216,7 @@ Class Demolitionist : PlayerPawn || InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("JumpLoop")) + || InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState("Float")) || InStateSequence(CurState,FindState("FloatLoop")) ) SetStateLabel("Fall"); @@ -242,7 +270,7 @@ Class Demolitionist : PlayerPawn || InStateSequence(CurState,FindState("SeeFast")) || InStateSequence(CurState,FindState("SeeFastLoop")) || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("JumpLoop")) + || InStateSequence(CurState,FindState("Jump")) || InStateSequence(CurState,FindState("Fall")) || InStateSequence(CurState,FindState("FallLoop")) ) SetStateLabel("Float"); @@ -251,8 +279,7 @@ Class Demolitionist : PlayerPawn override void PlayAttacking() { if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Jump")) - || InStateSequence(CurState,FindState("JumpLoop")) ) + || InStateSequence(CurState,FindState("Jump")) ) return; // don't cancel dash/jump if ( player.crouchdir == -1 ) SetStateLabel("CrouchMissile"); else SetStateLabel("Missile"); @@ -329,25 +356,21 @@ Class Demolitionist : PlayerPawn #### # 2; XZW3 IJKLMNO 2 { - if ( (pos.z<=floorz)||bNoGravity||(waterlevel>=3) ) + if ( player.onground||bNoGravity||(waterlevel>=3) ) return ResolveState("JumpEnd"); - A_BoostUp(); + A_BoostUp(true); return ResolveState(null); } - Goto JumpLoop; - JumpLoop: // keep boost XZW3 P 1 { - if ( (pos.z<=floorz)||bNoGravity||(waterlevel>=3) ) + if ( player.onground||bNoGravity||(waterlevel>=3) ) return ResolveState("JumpEnd"); - A_BoostUp(); + A_BoostUp(false); return ResolveState(null); } - XZW3 P 1 A_JumpIf((vel.z<-10)&&(pos.z>(floorz+80)),1); - Loop; - #### # 4; - Goto FallLoop; + XZW3 P 1 A_JumpIf((vel.z<-10)&&(pos.z>(floorz+80)),"Fall"); + Goto Jump+8; JumpEnd: // stop boost #### # 2; @@ -356,12 +379,12 @@ Class Demolitionist : PlayerPawn Fall: // start fall #### # 4; - XZW3 XYZ 2 A_JumpIf((pos.z<=floorz)&&!bNoGravity&&(waterlevel<3),"FallEnd"); - XZW4 AB 2 A_JumpIf((pos.z<=floorz)&&!bNoGravity&&(waterlevel<3),"FallEnd"); + XZW3 XYZ 2 A_JumpIf(player.onground&&!bNoGravity&&(waterlevel<3),"FallEnd"); + XZW4 AB 2 A_JumpIf(player.onground&&!bNoGravity&&(waterlevel<3),"FallEnd"); Goto FallLoop; FallLoop: // falling - XZW4 CDEFGH 3 A_JumpIf((pos.z<=floorz)&&!bNoGravity&&(waterlevel<3),"FallEnd"); + XZW4 CDEFGH 3 A_JumpIf(player.onground&&!bNoGravity&&(waterlevel<3),"FallEnd"); Goto FallLoop; FallEnd: // landing @@ -383,7 +406,7 @@ Class Demolitionist : PlayerPawn #### # 2; XZW4 O 2 A_Dash(); XZW4 PQRS 2 A_Dash(); - Goto DashEnd; + Goto Dash+2; DashEnd: XZW4 TUVWX 2; Goto Spawn+1;