diff --git a/language.version b/language.version index 976751b73..2f3216ddc 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r406 \cu(Thu 25 Mar 15:06:40 CET 2021)\c-"; -SWWM_SHORTVER="\cw0.9.11b-pre r406 \cu(2021-03-25 15:06:40)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r407 \cu(Thu 25 Mar 15:06:59 CET 2021)\c-"; +SWWM_SHORTVER="\cw0.9.11b-pre r407 \cu(2021-03-25 15:06:59)\c-"; diff --git a/zscript/handler/swwm_handler_worldtick.zsc b/zscript/handler/swwm_handler_worldtick.zsc index 38964ee67..541f4aedf 100644 --- a/zscript/handler/swwm_handler_worldtick.zsc +++ b/zscript/handler/swwm_handler_worldtick.zsc @@ -118,7 +118,8 @@ extend Class SWWMHandler enteredcombat = true; } } - if ( enteredcombat && (!highesttic || (gametic > highesttic+700)) ) + // be smart, demo-chan, don't shout if you're invisible, or you'll make it worse + if ( enteredcombat && (!highesttic || (gametic > highesttic+700)) && !players[consoleplayer].mo.FindInventory("GhostPower") ) lastcombat = AddOneliner("fightstart",1,10); } @@ -228,6 +229,8 @@ extend Class SWWMHandler continue; if ( a == players[consoleplayer].Camera ) continue; + if ( a is 'GhostTarget' ) + continue; if ( !a.player && !a.bSOLID && !a.bSHOOTABLE && !a.bISMONSTER && !a.bFRIENDLY && !(a is 'Inventory') && !(a is 'Chancebox') ) continue; if ( !thesight && !(a.IsFriend(players[consoleplayer].mo) && !(a.player && (a.player.mo != a))) && !players[consoleplayer].Camera.CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) @@ -270,6 +273,8 @@ extend Class SWWMHandler continue; if ( a == players[consoleplayer].Camera ) continue; + if ( a is 'GhostTarget' ) + continue; if ( !a.player && !a.bSOLID && !a.bSHOOTABLE && !a.bISMONSTER && !a.bFRIENDLY && !(a is 'Inventory') && !(a is 'Chancebox') ) continue; if ( !thesight && !a.IsFriend(players[consoleplayer].mo) && !players[consoleplayer].Camera.CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) diff --git a/zscript/items/swwm_powerups.zsc b/zscript/items/swwm_powerups.zsc index 7bd77cef1..057db9494 100644 --- a/zscript/items/swwm_powerups.zsc +++ b/zscript/items/swwm_powerups.zsc @@ -266,6 +266,56 @@ Class GhostSnd : Actor } } +Class GhostTarget : Actor +{ + bool diedie; + + Default + { + +SPECTRAL; + +NOGRAVITY; + +DONTSPLASH; + +SHOOTABLE; + +NONSHOOTABLE; + +NOTELEPORT; + +NODAMAGE; + +NOBLOOD; + +CANTSEEK; + +SHADOW; // so they can barely aim + Radius .1; + Height 56; + } + override void Tick() + { + if ( isFrozen() ) return; + if ( diedie ) A_FadeOut(.02); + let bt = BlockThingsIterator.Create(self,300); + while ( bt.Next() ) + { + let t = bt.Thing; + if ( !t || !t.bIsMonster || t.player || !t.IsHostile(master) || (t.target != self) ) continue; + if ( SWWMUtility.BoxIntersect(self,t,pad:16) ) + { + // they found out, there's no one here + diedie = true; + break; + } + } + // player made noise or is visible again + if ( !master || (LastHeard == master) || !master.FindInventory("GhostPower") ) + { + let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( hnd ) for ( int i=0; i 0) ) A_StartSound(String.Format("voice/%s/grunt",myvoice.GetString()),CHAN_DEMOVOICE,CHANF_OVERLAP); if ( lastvelz < -1 ) @@ -1785,6 +1788,7 @@ Class Demolitionist : PlayerPawn if ( walljump || wallclimb ) { A_StartSound("demolitionist/kick",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); } @@ -1792,7 +1796,10 @@ Class Demolitionist : PlayerPawn 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.; @@ -2241,6 +2248,7 @@ Class Demolitionist : PlayerPawn if ( !myvoice ) myvoice = CVar.GetCVar('swwm_voicetype',player); if ( lastdamage > 90 ) { + if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:1200); A_QuakeEx(3,3,3,9,0,8,"",QF_RELATIVE|QF_SCALEDOWN); A_StartSound("demolitionist/hipain",CHAN_VOICE); lastbump *= 1.04; @@ -2250,6 +2258,7 @@ Class Demolitionist : PlayerPawn } else if ( lastdamage > 30 ) { + if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:600); A_QuakeEx(2,2,2,6,0,8,"",QF_RELATIVE|QF_SCALEDOWN); A_StartSound("demolitionist/pain",CHAN_VOICE); lastbump *= 1.02; @@ -2259,6 +2268,7 @@ Class Demolitionist : PlayerPawn } else if ( lastdamage > 0 ) { + if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:200); A_QuakeEx(1,1,1,3,0,8,"",QF_RELATIVE|QF_SCALEDOWN); A_StartSound("demolitionist/lopain",CHAN_VOICE); lastbump *= 1.01; @@ -2394,6 +2404,7 @@ Class Demolitionist : PlayerPawn let b = Spawn("InvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0))); b.A_CheckTerrain(); vel.xy += (RotateVector(NormalizedMove(),angle)/3600.)*TweakSpeed(); + if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:(200*vol)); } else { @@ -2401,6 +2412,7 @@ Class Demolitionist : PlayerPawn let b = Spawn("InvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0))); b.A_CheckTerrain(); vel.xy += (RotateVector(NormalizedMove(),angle)/4800.)*TweakSpeed(); + if ( swwm_extraalert ) A_AlertMonsters(swwm_uncapalert?0:(100*vol)); } } override bool Used( Actor user )