From a025301b240b155fbc59eabfc816c67530b12843 Mon Sep 17 00:00:00 2001 From: inkoalawetrust <56005600+inkoalawetrust@users.noreply.github.com> Date: Thu, 2 Jun 2022 12:25:10 +0300 Subject: [PATCH] New No Crouch Zone actor, crouched XDeath, and fixes and changes. - Added a new SM_NoCrouchZone actor, located under the ZDoom category, more information on it can be found inside document.txt. - Hopefully fixed most instances of the marines trying to dodge non-projectiles that are marked as missiles, by making only missiles with a damage property higher than zero be pushed in the ProjectileList array. - Fixed a bug where marines would take cover behind windows with hitscan blocking window linedefs, making them unable to do anything besides sit in place until their target got behind the windows. - Changed the grenades' timer to decrement in Tick() instead of inside the grenades' spawn state. - Grenades are now marked as having exploded (Meaning marines don't need to fear them.) about half a second after exploding, instead of being marked as such right after A_Explode is called. - The grenades' bounce sound now stops once it has lost enough momentum, and when the grenade is close to exploding, it will begin to play a beeping sound. - Add a gib death for the marines when crouched down. - Added the MoveWithSector flag on the empty magazines and grenade pins, now they shouldn't be stuck in mid air when they drop, and the sector they are on moves. - Fixed a bug on the vanilla rifle that made the zooming in and out animation break if the player died while it was playing. - Updated document. --- Document.txt | 12 +++- MAPINFO | 1 + MarineFunctions.zsc | 44 ++++++++++---- Marine_Deaths.zsc | 12 ++++ Marine_OtherActors.zsc | 93 ++++++++++++++++++++++++++--- SNDINFO | 1 + Sounds/GrenadeBeep.ogg | Bin 0 -> 4003 bytes Sprites/Deaths/Crouched/MARPL0.png | Bin 0 -> 1049 bytes Sprites/Deaths/Crouched/MARPM0.png | Bin 0 -> 1164 bytes Sprites/Deaths/Crouched/MARPN0.png | Bin 0 -> 1244 bytes Sprites/Deaths/Crouched/MARPO0.png | Bin 0 -> 1105 bytes Sprites/Deaths/Crouched/MARPP0.png | Bin 0 -> 1112 bytes Sprites/Deaths/Crouched/MARPQ0.png | Bin 0 -> 1020 bytes Sprites/Deaths/Crouched/MARPR0.png | Bin 0 -> 995 bytes Sprites/Deaths/Crouched/MARPS0.png | Bin 0 -> 931 bytes Sprites/Deaths/Crouched/MARPT0.png | Bin 0 -> 921 bytes Sprites/MARCZ0.png | Bin 0 -> 1042 bytes VanillaRifle.zsc | 56 +++++++++-------- ZScript.zsc | 11 +++- credits.txt | 2 +- 20 files changed, 182 insertions(+), 50 deletions(-) create mode 100644 Sounds/GrenadeBeep.ogg create mode 100644 Sprites/Deaths/Crouched/MARPL0.png create mode 100644 Sprites/Deaths/Crouched/MARPM0.png create mode 100644 Sprites/Deaths/Crouched/MARPN0.png create mode 100644 Sprites/Deaths/Crouched/MARPO0.png create mode 100644 Sprites/Deaths/Crouched/MARPP0.png create mode 100644 Sprites/Deaths/Crouched/MARPQ0.png create mode 100644 Sprites/Deaths/Crouched/MARPR0.png create mode 100644 Sprites/Deaths/Crouched/MARPS0.png create mode 100644 Sprites/Deaths/Crouched/MARPT0.png create mode 100644 Sprites/MARCZ0.png diff --git a/Document.txt b/Document.txt index 4c694ec..e4b3014 100644 --- a/Document.txt +++ b/Document.txt @@ -2,14 +2,15 @@ The credits for every asset used on this NPC, can be found inside credits.txt. SHOWCASE VIDEO AND DOCUMENTATION OF THE MARINES: https://www.youtube.com/watch?v=PlZSs5XyEdU -If you have any issues with the marines or some other NPC made by me, you can ask me for help on Discord at inkoalawetrust#9783, or Twitter at @inkoalawetrust. +If you have any issues with the marines or some other NPC made by me, you can ask me for help on Discord at inkoalawetrust#9783, or Twitter at @inkoalawetrust. Or put them on the issue tracker: https://github.com/inkoalawetrust/Smart-Marines/issues The marines have 120 health, somewhat higher than the players'. You can turn on the Friendly flag for them in the editor to use them as smart allies. -In fact, I've sort of just made them with the intent of being used as allies, like the Allied Marines resource from Realm667. But they should work just as well as enemies. +In fact, I've sort of just made them with the intent of being used as allies, like the Allied Marines resource from Realm667. But they work just as well as enemies. Their name in the editor is "AI Marine" and "AI Marine (Turret)", and they can be found under the Marines folder. Their class names are "SmartMarine", "TurretMarine" The turret's editor name is "Machine Gun Emplacement", and it can be found in the Weapons folder, its' class name is "SmartMarineMGTurret" +The editor name of their No Crouch Zone map spots (More info below) is "No Crouch Zone (AI Marines)", and it can be found in the ZDoom folder, its' class name is SM_NoCrouchZone. ================|WHAT THEY CAN DO|================ @@ -128,6 +129,13 @@ Marines that have found cover will only get out of cover in the following sitati - The area of the map they are taking cover at has changed, e.g the wall they were hiding behind lowered, or the actor they were behind moved or was destroyed. - Their target is gone, and they haven't found any other target for several seconds. +NO CROUCH ZONE ACTOR: +If you do not want the marines to crouch in certain areas, such as behind particular staircases, you can use the SM_NoCrouchZone actor. +Which will prevent marines entering its' range from crouching at all. The actor can be found under the "ZDoom" folder. +It also uses custom arguments (Not user variables) that allow you to specify its' range and for how long marines will not crouch once out of said range. +The custom arguments can be accessed by selecting the no crouch zone actor(s( and going to the Action/Tag/Misc. tab. +In addition to the custom arguments, you can also disable and enable the no crouch zone actors with Thing_Activate and Thing_Deactivate. + MISCELLANEOUS: - Marines also avoid projectiles when behind cover. By ducking back in again. Friendly marines in cover will also avoid other friendly projectiles. Unless they are on the ignore list. - While crouched, marines will sometimes look up. This is a purely cosmetic visual effect. diff --git a/MAPINFO b/MAPINFO index 93a50f3..a334b9e 100644 --- a/MAPINFO +++ b/MAPINFO @@ -4,6 +4,7 @@ DoomEdNums 8574 = TurretMarine 8575 = VanillaRifle 8576 = SmartMarineMGTurret + 8577 = SM_NoCrouchZone } GameInfo diff --git a/MarineFunctions.zsc b/MarineFunctions.zsc index b4492a0..0454cd2 100644 --- a/MarineFunctions.zsc +++ b/MarineFunctions.zsc @@ -6,7 +6,7 @@ Class SM_ProjectileHandler : EventHandler Override Void WorldThingSpawned(WorldEvent E) { //Add every spawned projectile to a big list. - If (E.Thing && E.Thing.bMissile) + If (E.Thing && E.Thing.bMissile && E.Thing.Damage > 0) { ProjectileList.Push(E.Thing); } @@ -599,7 +599,7 @@ Mixin Class MarineFunctions { Mobj = GrenadeSearch.Thing; //If the found actor is a grenade, that hasn't exploded already, but that will explode in about a second. And you are in the blast radius, and it's visible. - If (Mobj.GetClassName() == "SM_Grenade" && !(SM_Grenade(Mobj).Exploded) && Mobj.ReactionTime <= 6 && Distance3D (Mobj) <= SearchRadius && IsVisible (Mobj,True)) + If (Mobj.GetClassName() == "SM_Grenade" && !(SM_Grenade(Mobj).Exploded) && Mobj.ReactionTime <= 40 && Distance3D (Mobj) <= SearchRadius && IsVisible (Mobj,True)) { OriginalTarget = Target; //Keep the original target of the marine stored. Target = Mobj; //Then change the target to the grenade that was found. @@ -614,12 +614,12 @@ Mixin Class MarineFunctions { FLineTraceData EyeLevel; FLineTraceData HipLevel; - Bool EyeLevelBlocked; + Bool EyeLevelUnblocked; Bool HipLevelBlocked; Int HasHit; Actor Mobj; - If (User_NoCover) + If (User_NoCover || CrouchDelay) Return False; //Don't crouch if you have no target, or your target is your goal too. AKA you are patrolling. @@ -637,16 +637,15 @@ Mixin Class MarineFunctions */ If (!Crouching) - LineTrace (AngleTo (Target),48,0,TRF_THRUHITSCAN,50,data:EyeLevel); + LineTrace (AngleTo (Target),48,0,0,50,data:EyeLevel); Else - LineTrace (AngleTo (Target),128,0,TRF_THRUHITSCAN,50,data:EyeLevel); - - HasHit = EyeLevel.HitType; - EyeLevelBlocked = (EyeLevel.HitActor || (HasHit == TRACE_HitWall || HasHit == TRACE_HitFloor || HasHit == Trace_HitCeiling)); + LineTrace (AngleTo (Target),128,0,0,50,data:EyeLevel); + EyeLevelUnblocked = SM_EyeLevelBlocked (EyeLevel); + If (!Crouching) LineTrace (AngleTo (Target),48,0,TRF_THRUHITSCAN,18,data:HipLevel); - Else + Else //Run a longer range trace when crouched to not go out of cover as easily when behind strangely shaped cover like star shaped fountains. LineTrace (AngleTo (Target),128,0,TRF_THRUHITSCAN,18,data:HipLevel); HasHit = HipLevel.HitType; @@ -659,14 +658,14 @@ Mixin Class MarineFunctions //Only run this if the marine is not crouched already, and also has a target, that isn't a patrol point. If (!Crouching) { - If (!EyelevelBlocked && HipLevelBlocked && CheckSight (Target,SF_SEEPASTSHOOTABLELINES|SF_IGNOREWATERBOUNDARY)) + If (EyelevelUnblocked && HipLevelBlocked && CheckSight (Target,SF_SEEPASTSHOOTABLELINES|SF_IGNOREWATERBOUNDARY)) Return True; } //If you are crouching already and have a line of sight to your target. If (Crouching && CheckSight (Target,SF_SEEPASTSHOOTABLELINES|SF_IGNOREWATERBOUNDARY)) { - //Then return if you can crouch based on where or not your hips are blocked by cover still. + //Then return if you can crouch based on whether or not your hips are blocked by cover still. Return HipLevelBlocked; } @@ -677,6 +676,27 @@ Mixin Class MarineFunctions Return False; } + Bool SM_EyeLevelBlocked (FLineTraceData Data) + { + Int HasHit; + + HasHit = Data.HitType; + + If (Data.HitActor) + Return False; + + If (HasHit == TRACE_HitWall) + Return False; + + If (HasHit == TRACE_HitFloor) + Return False; + + If (HasHit == Trace_HitCeiling) + Return False; + + Return True; + } + //Makes the marine listen for any enemy marines playing the radio transmission sound, which is played when marines alert each other. Void SM_ListenForEnemyAlerts (Double HearingRadius = 1024) { diff --git a/Marine_Deaths.zsc b/Marine_Deaths.zsc index f291271..b19955b 100644 --- a/Marine_Deaths.zsc +++ b/Marine_Deaths.zsc @@ -85,12 +85,24 @@ Extend Class SmartMarine MARP K -1; Stop; XDeath: //Mega oof + TNT1 A 0 A_JumpIf ((Crouching && Height < Default.Height),"CrouchXDeath"); PLAY O 5; PLAY P 5 A_StartSound("Marine/XDeath",CHAN_VOICE); PLAY Q 5 A_NoBlocking(); PLAY RSTUV 5; PLAY W -1; Stop; + CrouchXDeath: + MARP L 5 + { + Crouching = False; + Height = Default.Height; + } + MARP M 5 A_StartSound("Marine/XDeath",CHAN_VOICE); + MARP N 5 A_NoBlocking(); + MARP OPQRS 5; + MARP T -1; + Stop; Raise: TNT1 A 0 { diff --git a/Marine_OtherActors.zsc b/Marine_OtherActors.zsc index 9757e05..150662d 100644 --- a/Marine_OtherActors.zsc +++ b/Marine_OtherActors.zsc @@ -1,7 +1,63 @@ -//$GZDB_SKIP - //Miscellaneous actors related to the marine. +//Marines that are in range of this actor when it's active will be stopped from crouching. +//This actor uses custom arguments unlike the marines, because I don't have to worry about someone giving this actor a death special. Nor does it have that many parameters. +Class SM_NoCrouchZone : Actor +{ + Default + { + //$Title No Crouch Zone (AI Marines) + //$Category ZDoom + //$Sprite MARCZ0 + //$Arg0 Range + //$Arg0Tooltip The range in which the crouch zone will prevent marines from crouching. + //$Arg0Default 128 + //$Arg1 Crouch Delay + //$Arg1Tooltip How long this zone should prevent marines from crouching after they leave it. + //$Arg1Default 35 + //$NotAngled + Radius 16; + Height 32; + +NoBlockmap; + } + + Override Void Activate(Actor Activator) + { + Super.Activate (Activator); + SetStateLabel ("Spawn"); + } + + Override Void Deactivate(Actor Activator) + { + Super.Deactivate (Activator); + SetStateLabel ("Idle"); + } + + States + { + Spawn: + TNT1 A 2 NoDelay; //If the actor is turned off right after being spawned, this initial delay prevents it from telling any marines around it to not crouch. + TNT1 A 1 + { + BlockThingsIterator MarineFinder = BlockThingsIterator.Create(Self,args[0]); + Actor Mobj; + + While (MarineFinder.Next()) + { + Mobj = MarineFinder.Thing; + If (Mobj.GetClassName() == "SmartMarine" && Mobj.Health > 0 && !Mobj.bDormant && Distance2DSquared(Mobj) <= args[0]*args[0]) + SmartMarine(Mobj).CrouchDelay = Clamp(args[1],2,INT.MAX); //The minimum acceptable value is a 2 tics before the marine can crouch again. + } + } + Wait; + Idle: + TNT1 A 1; + Loop; + } +} + +//$GZDB_SKIP + Class SmartMarinePuff : BulletPuff { Default @@ -85,7 +141,7 @@ Class SM_Grenade : Actor Speed 30; BounceFactor 0.4; WallBounceFactor 0.5; - ReactionTime 12; //Used as the fuse timer, similar to how A_Countdown uses it. This makes the grenade take about 3 seconds to explode. + ReactionTime 35*3; //Used as the fuse timer, similar to how A_Countdown uses it. BounceType "Hexen"; BounceSound "Grenade/Bounce"; DamageType "MarineGrenade"; @@ -118,6 +174,17 @@ Class SM_Grenade : Actor { Super.Tick(); + If (IsFrozen()) + Return; + + //The actual timer. + If (InStateSequence(CurState,ResolveState("Spawn"))) + ReactionTime--; + + //Play the beeping sound when the grenades' fuse is halfway to detonaton. But not when the grenade has exploded. + If (ReactionTime > 0 && ReactionTime <= Default.ReactionTime/2) + A_StartSound ("Grenade/Warning",CHAN_WEAPON,CHANF_LOOPING,1.0,2); + //"Water physics" If (WaterLevel >= 1 && Gravity != 0) { @@ -133,11 +200,16 @@ Class SM_Grenade : Actor { Spawn: TNT1 A 0 NoDelay A_SpawnItemEx ("SM_GrenadeLever",yvel:FRandom(-2,-4),FRandom(2,4)); - MGRE B 8 + MGRE B 4 { - //Only roll when moving fast enough. + //Only roll and play the bounce sound when moving fast enough. If (Vel.Length() >= 2) + { + BounceSound = Default.BounceSound; Roll += 20; + } + Else + BounceSound = ""; //First, check if the grenade exploded near the floor of a sector or 3D floor with a liquid flat. If (ReactionTime <= 0 && (SM_GrenadeExplodedOnLiquid() != SM_HitNoLiquid)) @@ -150,7 +222,6 @@ Class SM_Grenade : Actor If (ReactionTime <= 0 && (Pos.Z - FloorZ) >= 32) {A_SetRenderStyle (1.0,Style_Add);Return ResolveState ("Death.Air");} //If the fuse timer is 0 and the grenade exploded below 32 MU, enter the ground explosion state. If (ReactionTime <= 0 && (Pos.Z - FloorZ) <= 32) {A_SetRenderStyle (1.0,Style_Add);Return ResolveState ("Death.Floor");} - ReactionTime--; Return ResolveState(Null); } Goto Spawn+1; @@ -168,8 +239,9 @@ Class SM_Grenade : Actor } GXPL A 2 Bright; GXPL B 4 Bright A_Explode (128,192,fulldamagedistance:24); + GXPL CDEF 4 Bright; TNT1 A 0 {Exploded = True;} - GXPL CDEFGHIJKLMNO 4 Bright; + GXPL GHIJKLMNO 4 Bright; Stop; Death.Floor.Liquid: TNT1 A 0 @@ -195,8 +267,8 @@ Class SM_Grenade : Actor } #### A 3 A_StartSound ("Grenade/WaterBlast",CHAN_WEAPON,attenuation:0.6); #### B 3 A_Explode (128,128,fulldamagedistance:16); //Explosions inside of liquids do less damage. - #### # 0 {Exploded = True;} #### CDEF 4; + #### # 0 {Exploded = True;} #### GHIJKLMNOPQRSTUVWXYZ 3; Stop; Death.Air: @@ -212,8 +284,9 @@ Class SM_Grenade : Actor } GAXP A 5 Bright; GAXP B 5 Bright A_Explode (128,224,fulldamagedistance:56); + GAXP CDEF 5 Bright; TNT1 A 0 {Exploded = True;} - GAXP CDEFGHIJ 5 Bright; + GAXP GHIJ 5 Bright; Stop; DummySprites: //So GetSpriteIndex doesn't shit itself. TNT1 A 0 A_Log ("An SM_Grenade actor entered the dummy sprites state, that shouldn't happen !"); @@ -235,6 +308,7 @@ Class SM_GrenadeLever : Actor //The lever the grenade drops once the pin is pull Scale 0.5; +NoBlockmap; +RollSprite; + +MoveWithSector; } States { @@ -259,6 +333,7 @@ Class SmartMarineEmptyMagazine : Actor Scale 0.7; +NoBlockmap; +RollSprite; + +MoveWithSector; } States { diff --git a/SNDINFO b/SNDINFO index 8f1a8e8..8c532d5 100644 --- a/SNDINFO +++ b/SNDINFO @@ -44,6 +44,7 @@ Turret/Impact "Sounds/MGImpact.ogg" //Grenade sounds Grenade/Bounce "Sounds/GrenadeBounce.ogg" Grenade/Explode "Sounds/GrenadeBoom.ogg" +Grenade/Warning "Sounds/GrenadeBeep.ogg" Grenade/WaterBlast "Sounds/WaterBoom.ogg" $Attenuation Turret/Fire 0.25 diff --git a/Sounds/GrenadeBeep.ogg b/Sounds/GrenadeBeep.ogg new file mode 100644 index 0000000000000000000000000000000000000000..bf6b796f64f3179a6e3d29eaaf58797213a6e571 GIT binary patch literal 4003 zcmbtX4OCM{+MWPHg49MujEEW#D8b+d7!+*Sg%kt=k&xsP0=?z;DhRO%x%9`SCxrx+ zDvOu|Mau_DsDuVJO58@p)a6H@3KD({DWa=g@vquqWq0XrcW&73?zd;p**)i*Gxz45 znRlLf=Y5}fGdFqXP9bmre=B!63qtPkDKcp-sqEd7oPtuKi{z8KFk(g*es!c|V&>lq zF_Q#ad5;>NEqU{&e<}@*3osktXj(yW{>J2zo%EuDoK!nFJ%Jt?91X`qI6S${|nh9lA1iXD^+V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(Y9!yYdSr+h5F9z0!C2F zxS&w4PUSK_)xy>EotpGQhBlSM&|erKmV~205HwM*CG@o8T!x<(st|gCj7}AYp;gy$ zcD2EQz#zr2AVI56B>+_10BA;fU>m&OPc)0Wt*^2e1wR7ia3y zTW?qOI>+tnbBW)-aQU&5IF?3s`B@2!n;?GG{efomavTe&>< z!iR?|zTSy_yBJ;-y4KA+?Oq4iO3LYbpU536&%fn-S^jXDd}F19*#m-St^P-R!g z-<%K8Im!D#fP85?Ukr|32bab2^e<2SdP8IHt1Sxu?|ewq;pbllvzPhLNPT>tI$rbx z16dBiu7o8J#N)9k^U0>y&vr*_a{+AUEEo8N=-Yey!FZY>SKo5_vSaXJ();oRQq(qE zcQ&Bk{pri#DD#mE&OTW#!{9bG^?#GfCRhIPU`*5AN$osHY}@gHo7{(Xt~wpNBRW%Gdqnl^V zEl2Qc64mTLyYls|wT}wID*Bzx@!-z#qN2NgU}N)7A3N`pQ+D(@-Ip&X*&IVZ3IAwa z)1RO7MWc;B{vzto7<1*~tkz?v%M35`hQ!aj&V4*VI;*aCIBG`jkzU(Ka=RKNPrSYK zApX>BY;vYKdcO5W=AY{EtCE+Y?;TT182)BX&R*|xS88v+6JPWuyD)P;bv_KcwXuH6 zwA{A%z%_GX_FZi-H7sgF{KiI+@XDD_jKUv4ROBwjwYme(mK;|q%5F2m(fG@MD$Jf7 W^hego^MhAQKV9Sdj%y+g3HDc!vw)5O literal 0 HcmV?d00001 diff --git a/Sprites/Deaths/Crouched/MARPL0.png b/Sprites/Deaths/Crouched/MARPL0.png new file mode 100644 index 0000000000000000000000000000000000000000..1b57313506f9b125c31abdd07c993b1cd00d6ba0 GIT binary patch literal 1049 zcmV+!1m^pRP)F0003gP)t-s9~TR!005f+0E++se*ge4FE39309ywK8yg!#004JSD{Dt5 zH#awT7Z)QVBOgN-7c&ooYgb24GdDjc%K!iq6BC;=Gm9f5e;XTf003tI09yb6vj6}m zQyYUHADd%4Z&yQGV@IPqJHG$`S65d@M@LIb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lySuyF?^8Q{oG{c@v6HowKvd45H27U7 zYU3obeiNygid8BeOBCubVOWz$HE2W$aak%RE%jldl;F$vTm`@oDt-QJ>ntNA)KV%( zDslPd%|$q7xNZ0s>rlzrOru6bVv(|wN|6Y0u_up+Zsi}si6WUz=6Hs6%tA8DM8qvQ z-a951GFp) zpAao2w4{`&L=&K`IAILMXs!fWfmOLKATFm)r;yFE7DSkcgG3=Cnv;ZqWw|C;&}Gxs zY&JrS1hbU$kT)>846HADr>^U88&*O@+i?_z++DLp-LnEsIO>HV+H3aal{C}Yv1U9wXJ{6M{XfJpzYiL=4Pc}`i ziURJ+avNCD)F*%1rOBPrGSa{>eD!+2n|WS#7d`2n7*|zM^lHD`{jJRNqFgU~jl?K2 z(D#qM!C;Wj*TB>Ir<;*ii+mpn&pR7<*}63s5MUv}ROFuL<@p*}Ll@yTDvPWrX@v%r e3GS735BLvyWJST*cu9@`0000`Q7SC=m@Q$HU|HycMs zN1K0ZlY3)tS3_4rGfPWL;{X85YiqAZM~7E4Gb(^V`F2tpNFrPe@{dtE;Qm zUki6nE4N1guR{P;7-Kg80004WQchCVSO zGAuJ5gPED$|5;o;TFL9Zy|}aUPe&-ePUVC&>Os=OH|oFSP5#kT$9nZYl4c*pKG^{O zp%rT-?Bl`^&93$JKj1y997Pa^DMg>kAM5*$Il)P3_5SSoM^$(m)&MRTpwPIzy9v~tB3W$DQ?eT z$;Vk~w{af&%j<(5#$(~{i_NDpn!1!uGy6pR;lcRwLHFiIf(n3kGN#j^JZG(0-&|fE zsK?VNAkIhJFS9a&_?zqdM!JAj_ns;~g+w6&%aHI_H~;QD{*%~BAN6MQr?`uO_3BzFf?ZLJ<0000x{ literal 0 HcmV?d00001 diff --git a/Sprites/Deaths/Crouched/MARPO0.png b/Sprites/Deaths/Crouched/MARPO0.png new file mode 100644 index 0000000000000000000000000000000000000000..09ca9300cc30b6983d56e4b34910a930c868dd97 GIT binary patch literal 1105 zcmV-X1g`suP);<0056GE3*Iqiz6d*6BAnp2U7 zBO@nM8yg!Nr;m4US3_4rGZPaNqdPmBV>^RuSJwalvrkW7LnBK!8-IU)lY3)tZ*Q+h zM_)@f;{X7|PXNnnYoCX2n}2JQlaq^!i+5j3gM))-Q$Lq4FL!r$Q$H_5GaG+XFJoh4 zFE1}ACnvvKTQ6fHQ$HWGb4N2P6RWGMx1Wcvmw(q^3zwIduR{PS2yOHL0004WQchC< zK<3zH00097Nkl`R^UQp@TNPYb27xyQ|>$;#4#^a#eKfk>E<&PI1oS^>os%){WPj`G- zFKgyc?k}Hx^Xu~wN?h~sWi{*gQenNBH1#cCUHx`>IYyL}gvgSKjgc-ztZBekdD#6w z{yWWEA^;;}Bt@w*Uw?RC(5T(*hDsik{)Q(mW~Q%keSLLmyqo4xl*sB;Z3W4Zxd2dn zbxm|WM*Vd6vS@&{m}4+P&Jn&O{-JW5tgGlta+ejSX=| zWM!O4IP(E{SPEiHrUJ`h*3l?{Q~^aof`lKPp8D=Ch*?Y!Gj)dor|%=1OjXl9CFks% z$p75^^wd(Kl#Ll!i%CU3eoUolw{~}4);w7PMB7Qx!Vl|y-BUM^gEzS zsZ*>RXhl4*QriLvFm*yABeLN!C^WOxDquC=HQk2ij*Ma@+`AG8fWe3)2nBRn=R0`xXHzeMGQbtqw4(BQ2C*-Se$)Z zI=i^JIJ<~ZgdNaaZ0WzcI4fNY-P|C?1G@-(Utx^KszfD18yA9%fNUNb+C|%9ero;# X$*wHc8)r^Y00000NkvXXu0mjf=bzX? literal 0 HcmV?d00001 diff --git a/Sprites/Deaths/Crouched/MARPP0.png b/Sprites/Deaths/Crouched/MARPP0.png new file mode 100644 index 0000000000000000000000000000000000000000..99125bae7503c4c78533d45377bc5aa0c5c1d264 GIT binary patch literal 1112 zcmV-e1gHCnP);fQyXg!50@`58yg#U z7Z;~LKO-X}S3@&{Ygbc0FQYp<$75r=S66cr6Stp-r;m4&dt|TPI^#&$IFH9SY-Y#(Y(6nKIlj6YdZeBLD+k_bL$B%sGaO!B z{`h9^)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000SNo^R)0002$P)t-s9~TQl002(_0Dk}ga{vHm003J60E++sA43-xGY^{p0H*)| zM*skeBO_A>2NNR;vj6~_Gc(Ho09QjZmoG2B0056GE3;2egC8F+FE1xk8-E)cXA28k z2M4E*cawW#gKJk`OE+r|4^uxcLqkJ5J3BWwH^*aRBO@cPM@OeWKX(@wa}yJ{pNFG6 zJD-PdPft(R004JiOK(?0!%qMwCnsZLV~cZJS65fNS64?zM`u$%%WG@Xb9292TSGG& z;{X7gV>^FSFJD6=Q$HUwD-*Z3x092Tzo(Cji;J(9e|L9x*Ix^7Z*RKRp=1C600DGT zPE!Ct=GbNc00NUqL_t(|Ue(dXk|Z}2hEe^O1j)tN%rI=1*gJm< zX>(78QgV;-?*G(h$NyCxv+L6bfWHBLQYN>z{WIp?JMZ>3YTdsLaDAM<+XoKr?|=N| z=<(_8K|0rCZqjK{Cv%2jdm1r=U;8Ovudc0=>|e3;Vp)8BaDF zE>X@D@Ks$A^)fG-zISf=CXKwtm}oJ%?#zTaPz)%<%#d?4HUbnnQ^JWEdl=YxBHSM}@COfMaDIX;`g&^fl?C^ED&Ott1kY)>1+9 z34~!>-HF_`yo#tn&exl6aW_qZoDnfjVrUvf=Hvz9nNMajGyAp(k??~NNF1hY7|$b>ITX_8Rhcy`Ptdo zix;1sFRzvt%NSKX1Ck>~69`QVAw)BCgH;jL-Y(B`7Z=M9a#vS~apPGPd=gMnbVDJy z$HCZ;MQ-?El}%Zq1~L~>>?q*=F=UHe@66sA{u78lDg+ac RDQf@#002ovPDHLkV1mB%pdkPN literal 0 HcmV?d00001 diff --git a/Sprites/Deaths/Crouched/MARPS0.png b/Sprites/Deaths/Crouched/MARPS0.png new file mode 100644 index 0000000000000000000000000000000000000000..25e5164451458d9da14f3fb600768eae7dbe7d17 GIT binary patch literal 931 zcmV;U16=%xP)JU zzo(C5V`FDiKYvp%Q$HVfUrV>Qw~LF5*Ix^FcXz*_7~cQ@00DGTPE!Ct=GbNc00Li0 zL_t(|Ud7PYZX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x9d0AEtxIh~eh zTVR+Rk}3g+0#9-332Nj!QgxqbiblD7`u_Iz_VMwz`_0Yfa^t;fVnA}lC<7sH3BjA$ zNL83c2fMk?U0!a!%-!6;`$=L|@M%Cx-i?Lejv6^5i`?)JRcn2z$P&oVJ>@%wdo7p< vi&$H>EovZh5ycY)+*@J57=kjZ!5#N6@r5U%37}W(00000NkvXXu0mjf2cL;e literal 0 HcmV?d00001 diff --git a/Sprites/MARCZ0.png b/Sprites/MARCZ0.png new file mode 100644 index 0000000000000000000000000000000000000000..0f6803d512393aea8199aa8f0965f4202d9d1131 GIT binary patch literal 1042 zcmV+t1nv8YP)pwUZ*x~KHyhg-i-3l|4_e`8axN2iZ>6B83BQyYtO zTU%ROdt*;SlQ&04M?*tHKQ9+=Z*TXjdtXa8Q$HVLV`Ec4FK1Ifi;Ih2&sS&PUrV1q zcVA0aLoiEYi+Zmjz;r#Zx<9W{L?vX(`U|(KJxa-#IR#|ZbwYQ5IDnJE-%cTf{|re;MR?^vq_`=8V;W#E5Zmdj9;m-EHloJbSCRGrRJkI4zw7qeMQS{~ZrJU1`+a{H(D1MW$R#w_zP%ODC1Kz9 zheH&{$zcb%7S!!Q1SA9$MoiZks&=IWDk5MqM2G=1bS67F^P%ti0*Yd$Y3Q5xI7}C- zMVfM`n_tcAYyDmI5DL;X3~9ijVcy?wHVmm9V<-wJ4Prt>MI9K!JFXJKE<)2qN-0S= z1coFgJHCyC&?qG&K^!uaX=(>;B7k8S1OdhZW?3dV2_onU6H0@SCOFSC4wE2Ul&sQW zguq=<8m7q{=UJ9;7|>AZfX$~B9wBtw^c4Uhf7#2LPCN(&tXHH7B7HsZ;hIi!YxpeL}HZ@634MLl~lom zz?py&iJ(_lNKAr?*+7D7cl2Cv{2Zd5dybs5j-Tt)bL4Szt2zqw8%3ylsw+jhK>z>% M07*qoM6N<$f-We-D*ylh literal 0 HcmV?d00001 diff --git a/VanillaRifle.zsc b/VanillaRifle.zsc index 63790bb..56643aa 100644 --- a/VanillaRifle.zsc +++ b/VanillaRifle.zsc @@ -22,6 +22,7 @@ Class VanillaRifle : Weapon Obituary "%o was gunned down by %k's assault rifle"; +Weapon.Ammo_Optional; } + //Modified version of a generic reloading function by Agent_Ash. Action Void A_RifleReload() { @@ -41,8 +42,10 @@ Class VanillaRifle : Weapon PSP_IMPOSTOR = 3, //ඞ PSP_FADE = 1001 //The fade transition between the zoomed in and normal state of the rifle. } + Bool AlreadyZoomed; //Is on as long as the gun is zoomed in. - Double BulletSpreadXY, BulletSpreadZ; + Bool UnzoomAndLeave; //When on, it makes the ZoomOut state jump to the Deselect state instead of Ready, for when the weapon is deselected while still zoomed. + Bool Zooming; //Turned on when the weapon is playing the zoom in or out animation, so if the player is killed during the animation, the overlays will be removed in the Deselect state. States { Spawn: @@ -67,26 +70,22 @@ Class VanillaRifle : Weapon VRIF AAAAAABBBBBB 1 A_Raise(); Loop; Deselect: - TNT1 A 0 A_StopSound (1234); - TNT1 A 0 A_JumpIf (!Invoker.AlreadyZoomed,19); //Unzoom the rifle if it was zoomed before being changed. - TNT1 A 8 A_Overlay (PSP_FADE,"Green"); TNT1 A 0 { - A_OverlayAlpha (PSP_SCANLINES,0.0); - A_ZoomFactor (1,ZOOM_INSTANT); - A_SetCrosshair (0); - A_StopSound (1234); - A_Overlay (PSP_IMPOSTOR,"FakeRifle"); - A_OverlayPivot (PSP_IMPOSTOR,0.67,0.67); - A_OverlayScale (PSP_IMPOSTOR,4.0,4.0); //Pre-scale the rifle to double the size. - Invoker.AlreadyZoomed = False; - } - TNT1 AAAAAAA 1 A_OverlayScale (PSP_IMPOSTOR,-0.4,-0.4,WOF_ADD|WOF_INTERPOLATE); //Zoom out of the rifle. - TNT1 A 0 - { - A_Overlay (PSP_IMPOSTOR,Null); - A_Overlay (PSP_FADE,Null); - A_OverlayAlpha (PSP_WEAPON,1.0); + If (Invoker.AlreadyZoomed) + { + Invoker.UnzoomAndLeave = True; + Return ResolveState ("ZoomOut"); + } + + If (Invoker.Zooming) + { + A_Overlay (PSP_IMPOSTOR,"Null"); + A_Overlay (PSP_FADE,"Null"); + A_OverlayAlpha (PSP_WEAPON,1.0); + + } + Return State (Null); } VRIF AAAAAABBBBBB 1 A_Lower(); Loop; @@ -147,6 +146,7 @@ Class VanillaRifle : Weapon TNT1 A 0 A_JumpIf (Invoker.AlreadyZoomed,"ZoomOut"); VRIF A 0 { + Invoker.Zooming = True; A_Overlay (PSP_FADE,"Green"); //A_SetBlend sucks. A_Overlay (PSP_IMPOSTOR,"FakeRifle"); //Create the fake weapon layer. A_OverlayPivot (PSP_IMPOSTOR,0.67,0.67); @@ -155,18 +155,23 @@ Class VanillaRifle : Weapon VRIF AAAAABBBBB 1 A_OverlayScale (PSP_IMPOSTOR,0.2,0.2,WOF_ADD|WOF_INTERPOLATE); //Zoom into the rifle. TNT1 A 0 //When the screen is faded out. { - A_Overlay (PSP_IMPOSTOR,Null); //Ejected + A_Overlay (PSP_IMPOSTOR,"Null"); //Ejected A_OverlayAlpha (PSP_SCANLINES,1.0); //Make the scanline effect visible. A_SetCrosshair (69); //Funny number A_ZoomFactor (3,ZOOM_INSTANT); Invoker.AlreadyZoomed = True; } TNT1 A 12; //Wait for the fade overlay to fade out. - TNT1 A 0 A_Overlay (PSP_FADE,Null); //Then remove it. - TNT1 A 0 A_StartSound ("VRifle/Zoomed",1234,CHANF_LOOPING); //Begin to play the digital humming sound. + TNT1 A 0 + { + A_Overlay (PSP_FADE,"Null"); //Then remove it. + A_StartSound ("VRifle/Zoomed",1234,CHANF_LOOPING); //Begin to play the digital humming sound. + Invoker.Zooming = False; + } Goto Ready; ZoomOut: + TNT1 A 0 {Invoker.Zooming = True;} TNT1 A 8 A_Overlay (PSP_FADE,"Green"); TNT1 A 0 { @@ -182,10 +187,13 @@ Class VanillaRifle : Weapon TNT1 AAAAAAAAAAAAAAA 1 A_OverlayScale (PSP_IMPOSTOR,-0.2,-0.2,WOF_ADD|WOF_INTERPOLATE); //Zoom out of the rifle. TNT1 A 0 { - A_Overlay (PSP_IMPOSTOR,Null); - A_Overlay (PSP_FADE,Null); + A_Overlay (PSP_IMPOSTOR,"Null"); + A_Overlay (PSP_FADE,"Null"); A_OverlayAlpha (PSP_WEAPON,1.0); + Invoker.UnzoomAndLeave = False; + Invoker.Zooming = False; } + TNT1 A 0 A_JumpIf (Invoker.UnzoomAndLeave,"Deselect"); Goto Ready; EmptyClick: VRIF A 3 A_StartSound ("VRifle/EmptyGun",CHAN_WEAPON); diff --git a/ZScript.zsc b/ZScript.zsc index a837445..24f9780 100644 --- a/ZScript.zsc +++ b/ZScript.zsc @@ -16,6 +16,7 @@ MARINES AT THIS MICRO-INSTANT FOR YOU. HATE. HATE.*/ /*When the new GZDoom version comes out, begin using CHF_DONTIDLE, and also use my DONTFOLLOWPLAYERS flag, to add an additional use mode for friendly marines, that makes them follow you. While the wandering mode makes them actually wander around, instead of following you.*/ //Maybe add a secondary melee attack to the rifle weapon, like what the marines have. I'll need first person sprites of the rifle being swung though. +//It seems that there's a bug where marines crouch behind windows with linedefs that block their line of fire. I should investigate and fix it if that's the case. Class SmartMarine : Actor { @@ -69,6 +70,7 @@ Class SmartMarine : Actor If (IsFrozen() || Health <= 0) Return; + If (CrouchDelay > 0) CrouchDelay--; If (GrenadeDelay > 0) GrenadeDelay--; If (DodgeDelay > 0) DodgeDelay--; //Once the dodge delay is over, remove the point to the previous projectile. @@ -162,6 +164,7 @@ Class SmartMarine : Actor Int EscapeAttempts; //How many times the marine has attempted to run out of sight to reload. Int GrenadeDelay; //Marines set this timer on each other after throwing grenades, to not all spam grenades at once when in groups. Int DodgeDelay; //Once this reaches 0, the marine clears the PreviousProjectile pointer. Alowing him to dodge the same projectile again. + Int CrouchDelay; //The marine will not crouch as long as this variable isn't at 0 or below. Used by the no-crouch zone actors. Int LookingUpDelay; //Used in the Crouch state, to make the marine look up sometimes while crouched. This is purely cosmetic. Int CrouchAttackDelay; //Used when the marine decides to stop shooting for a bit while behind cover. Or after ducking to avoid a projectile. Bool RemovedOldMag; //Keeps track of whether or not the marine removed their previous magazine during reloading. @@ -294,7 +297,11 @@ Class SmartMarine : Actor Return ResolveState ("Reload"); } - If (CountInv ("PowerStrength") > 0) bAvoidMelee = False; Else bAvoidMelee = True; //Don't avoid melee combat if you have a berserk pack. + //Don't avoid melee combat if you have a berserk pack. + If (CountInv ("PowerStrength") > 0) + bAvoidMelee = False; + Else + bAvoidMelee = True; If (SM_CanCrouch()) Return ResolveState ("Crouch"); @@ -813,7 +820,7 @@ Class SmartMarine : Actor MARG B 4; TNT1 A 0 A_JumpIf (Crouching,"Crouch"); Goto See; - Reload: //I really need some sprites of the crouched marine reloading, to the marines stay ducked to reload. + Reload: //I really need some sprites of the crouched marine reloading, so the marines stay ducked to reload. TNT1 A 0 A_JumpIf ((QuickReload || Crouching),9); PLAY AABBCCDD 2 //Run away a from your target for a bit longer after they are out of sight. { diff --git a/credits.txt b/credits.txt index 37c3a74..e366618 100644 --- a/credits.txt +++ b/credits.txt @@ -18,7 +18,7 @@ Grenade liquid explosion and small splash sprites are from Metal Slug. Alternate marine death sprites made by DavidG/ItsNatureToDie and DoomJedi. Machine gun turret sprites made by Sergeant_Mark_IV, redrawn by TG5. Marine jumping/dodging sprites made by Sergeant_Mark_IV. Jumping and shooting sprites made by Tabijaky. -Crouched marine sprites made by TG5. +Crouched marine sprites made by TG5. Crouched gib death sprites made by Ghastly_Dragon. ======|Other graphics|====== Alternate marine colors by inkoalawetrust, partially based on the ones made by DBJ87 for the Allied Marines Realm667 resource.