Skip to content

Commit

Permalink
Version 1.0.3
Browse files Browse the repository at this point in the history
- Bumped the minimum ZScript version needed from 4.3.3 to 4.7.0. That way I'll hopefully get less bug reports from people using outdated GZDoom versions.
- Fixed a VM abort caused if when the marine checked a player who has no weapon at all.
- Fixed some typos inside of the readme and document.
- Added possible fix for a bug that seems to make non-friendly marines start shooting at other hostile monsters. Even though the marines should avoid infighting.
  • Loading branch information
inkoalawetrust committed May 13, 2022
1 parent 91b9226 commit ccfdfb2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Document.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ The turret's editor name is "Machine Gun Emplacement", and it can be found in th
- Random (Randomly pick a color.)
- Default (Use the default shade of green. Similar to just leaving User_Color empty.)
- Most of the marines' behaviour can be configured on a per actor basis using user variables.
- Can have a randomized personality, that gives the marine a random armor color, different attention spans and chances to throw a grenade etc. Adding a custom value to a user variable prevents it from being randomied.
- Can have a randomized personality, that gives the marine a random armor color, different attention spans and chances to throw a grenade etc. Adding a custom value to a user variable prevents it from being randomized.
- They also have a rifle that they sometimes drop, which you can pick up and use yourself.
- The rifle fires at full auto, and needs reloading after firing 20 rounds, just like when the marines use them. You can reload before the magazine fully runs out too.
- It also features animated digital sights complete with an animation for looking in and out of them, using the sights increased you accuracy as well.
- It also features animated digital sights complete with an animation for looking in and out of them, using the sights increases your accuracy as well.
- The rifle can be entirely disabled from dropping from dead marines, by enabling User_NoRifleDrop on the marine.

================|USER VARIABLES|================
Expand Down
4 changes: 2 additions & 2 deletions MarineFunctions.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Mixin Class MarineFunctions
//If your target is hostile, and is a player or marine that's on a turret. And they are in range and visible.
/*This Else If is here so marines scared of an enemy on a turret, won't be any more likely to get on one themselves.
Since protecting yourself from machine gun fire by getting to a stationary turret yourself is stupid, and MORE likely to get you killed.*/
Else If ((Target.Player && Target.Player.ReadyWeapon.GetClassName() == "SmartMarineMGWeapon" && Distance3D (Target) <= User_FearDistance*FRandom (1.01,1.25) && IsVisible (Target,True) && !GoingToTurret ||
Else If ((Target.Player && Target.Player.ReadyWeapon && Target.Player.ReadyWeapon.GetClassName() == "SmartMarineMGWeapon" && Distance3D (Target) <= User_FearDistance*FRandom (1.01,1.25) && IsVisible (Target,True) && !GoingToTurret ||
Target Is "SmartMarine" && SmartMarine(Target).OnTurret && Distance3D (Target) <= User_FearDistance*FRandom (1.01,1.25) && IsVisible (Target,True) && !GoingToTurret ||
Target Is "TurretMarine" && Distance3D (Target) <= User_FearDistance*FRandom (1.01,1.25) && IsVisible (Target,True) && !GoingToTurret))
{
Expand Down Expand Up @@ -273,7 +273,7 @@ Mixin Class MarineFunctions
//And it is not your current target.
!(Target == Mobj))
{
Return True; //Then return that the actor should not be shot.
Return (bFriendly && !IsHostile(Mobj)) || (!bFriendly && !Mobj.bFriendly); //Then return that the actor should not be shot if it isn't hostile to you.
}
}

Expand Down
2 changes: 1 addition & 1 deletion ZScript.zsc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version "4.3.3"
Version "4.7.0"

#Include "VanillaRifle.zsc" //The rifle the marine may drop when killed.
#Include "MarineFunctions.zsc" //A mixin container for all the marines' custom functions.
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ Smart marines are NPCs for Doom that are far more intelligent than vanilla monst
- Random (Randomly pick a color.)
- Default (Use the default shade of green. Similar to just leaving User_Color empty.)
- Most of the marines' behaviour can be configured on a per actor basis using user variables.
- Can have a randomized personality, that gives the marine a random armor color, different attention spans and chances to throw a grenade etc. Adding a custom value to a user variable prevents it from being randomied.
- Can have a randomized personality, that gives the marine a random armor color, different attention spans and chances to throw a grenade etc. Adding a custom value to a user variable prevents it from being randomized.
- They also have a rifle that they sometimes drop, which you can pick up and use yourself.
- The rifle fires at full auto, and needs reloading after firing 20 rounds, just like when the marines use them. You can reload before the magazine fully runs out too.
- It also features animated digital sights complete with an animation for looking in and out of them, using the sights increased you accuracy as well.
- It also features animated digital sights complete with an animation for looking in and out of them, using the sights increases your accuracy as well.
- The rifle can be entirely disabled from dropping from dead marines, by enabling User_NoRifleDrop on the marine.

More information, such as info on what all the user variables available on the marines are, and what they do. Can be found inside Document.txt
Expand Down

0 comments on commit ccfdfb2

Please sign in to comment.