Added a check for OutlineColor in gl_highlighting, in case player set it to negative values.

Split the push/pop instructions in ItemCountFix() into individual lines.
This commit is contained in:
NovaRain
2017-05-07 21:20:17 +08:00
parent 0486192c3c
commit 475503d632
3 changed files with 7 additions and 2 deletions
Binary file not shown.
+1
View File
@@ -103,6 +103,7 @@ procedure start begin
alsoCorpse := GetConfig(configSection, "Corpses", 0);
checkLOS := GetConfig(configSection, "CheckLOS", 0);
outlineColor := GetConfig(configSection, "OutlineColor", 16);
if (outlineColor < 1) then outlineColor := 64;
motionScanner := GetConfig(configSection, "MotionScanner", 0);
highlightFailMsg1 := Translate("HighlightFail1", "You aren't carrying a motion sensor.");
+6 -2
View File
@@ -600,11 +600,15 @@ int __stdcall ItemCountFixStdcall(fo::GameObject* who, fo::GameObject* item) {
void __declspec(naked) ItemCountFix() {
__asm {
push ebx; push ecx; push edx; // save state
push ebx;
push ecx;
push edx; // save state
push edx; // item
push eax; // container-object
call ItemCountFixStdcall;
pop edx; pop ecx; pop ebx; // restore
pop edx;
pop ecx;
pop ebx; // restore
retn;
}
}