Skip to content

Commit

Permalink
fix: enemies throwing spears sometimes bugging out
Browse files Browse the repository at this point in the history
  • Loading branch information
Darxo committed Aug 18, 2024
1 parent 532e9f3 commit 686fee8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod_hardened/hooks/skills/skill.nut
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
local prevMax = null;

// We will encounter ::Math.rand in this switcheroo operation exactly two times
::Math.rand = function( _min, _max )
::Math.rand = function( _min = null, _max = null )
{
if (_min == null && _max == null) return oldMathRand();

if (previosResult == null) // First time we need to note the min and max range for the base values
{
previosResult = oldMathRand(_min, _max);
Expand Down

0 comments on commit 686fee8

Please sign in to comment.