Skip to content

Commit

Permalink
Small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Alienmario committed Nov 12, 2024
1 parent 672ae30 commit bf52792
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion edt/common/base/coop_base.edt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"features"
{
"FIRSTPERSON_DEATHCAM" "1"
"NO_TELEFRAGGING" "1"
"NOBLOCK" "1"
"SHOW_WELCOME_MESSAGE" "1"
"HEV_SOUNDS" "1"
Expand Down
18 changes: 10 additions & 8 deletions scripting/include/srccoop/utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -929,21 +929,23 @@ stock bool IsBoxIntersectingBox(const float boxMin1[3], const float boxMax1[3],
return true;
}

stock any Min(any value, any min)
stock any Min(any val1, any val2)
{
return value < min ? min : value;
return val1 < val2 ? val1 : val2;
}

stock any Max(any value, any max)
stock any Max(any val1, any val2)
{
return value > max ? max : value;
return val1 > val2 ? val1 : val2;
}

stock any Clamp(any value, any min, any max)
stock any Clamp(any val, any min, any max)
{
value = Min(value, min);
value = Max(value, max);
return value;
if (val < min)
val = min;
else if (val > max)
val = max;
return val;
}

stock bool IsInBounds(any value, any min, any max)
Expand Down

0 comments on commit bf52792

Please sign in to comment.