gl_highlighting: separate colors for containers and corpses

- Items and corpses blending together can be an issue
This commit is contained in:
phobos2077
2024-06-27 23:25:25 +02:00
parent a8163b6b0c
commit abd62dd834
3 changed files with 19 additions and 2 deletions
Binary file not shown.
+12 -1
View File
@@ -15,7 +15,7 @@
NOTE: this script requires compiler from sfall modderspack with -s option
(short circuit evaluation)
version 1.2
version 1.3
**/
@@ -36,6 +36,8 @@ variable alsoCorpse;
variable alsoCritter;
variable checkLOS;
variable outlineColor;
variable outlineColorCorpses;
variable outlineColorContainers;
variable motionScanner;
variable highlightFailMsg1;
variable highlightFailMsg2;
@@ -65,6 +67,12 @@ procedure GetOutlineColor(variable obj, variable isCritter) begin
if checkLOS and not DudeCanSee(obj) then
return 0;
if obj_type(obj) == OBJ_TYPE_CRITTER then
return outlineColorCorpses;
if obj_item_subtype(obj) == item_type_container then
return outlineColorContainers;
return outlineColor;
end
@@ -165,6 +173,9 @@ procedure start begin
alsoCritter := GetConfig(configSection, "Critters", 0);
checkLOS := GetConfig(configSection, "CheckLOS", 0);
outlineColor := GetConfig(configSection, "OutlineColor", 16);
outlineColorCorpses := GetConfig(configSection, "OutlineColorCorpses", 16);
outlineColorContainers := GetConfig(configSection, "OutlineColorContainers", 16);
if (outlineColor < 1) then outlineColor := 64;
motionScanner := GetConfig(configSection, "MotionScanner", 0);