Added SpecialDeathGVAR option to override the global variable number for special death.

Minor fix for Stats.ini.
This commit is contained in:
NovaRain
2019-03-17 10:38:32 +08:00
parent 20746abba2
commit a62a4d6911
3 changed files with 8 additions and 1 deletions
+4
View File
@@ -660,6 +660,10 @@ PartyMemberExtraInfo=0
;Set to 1 to prevent the inventory/loot/automap interfaces from being placed on top of other script-created windows ;Set to 1 to prevent the inventory/loot/automap interfaces from being placed on top of other script-created windows
InterfaceDontMoveOnTop=0 InterfaceDontMoveOnTop=0
;Overrides the global variable number used to show the special death message of the Modoc toilet explosion
;Set to -1 to disable the special death message when the global variable is set
SpecialDeathGVAR=491
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top ;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0 CreditsAtBottom=0
+1 -1
View File
@@ -256,7 +256,7 @@ void StatsInit() {
StatFormulas[i * 2 + 1] = GetPrivateProfileInt(key, "min", StatFormulas[i * 2 + 1], table); StatFormulas[i * 2 + 1] = GetPrivateProfileInt(key, "min", StatFormulas[i * 2 + 1], table);
for (int j = 0; j < STAT_max_hit_points; j++) { for (int j = 0; j < STAT_max_hit_points; j++) {
sprintf(buf2, "shift%d", j); sprintf(buf2, "shift%d", j);
StatShifts[i * 7 + j] = GetPrivateProfileInt(key, buf2, StatShifts[i * 7 + 0], table); StatShifts[i * 7 + j] = GetPrivateProfileInt(key, buf2, StatShifts[i * 7 + j], table);
sprintf(buf2, "multi%d", j); sprintf(buf2, "multi%d", j);
_gcvt(StatMulti[i * 7 + j], 16, buf3); _gcvt(StatMulti[i * 7 + j], 16, buf3);
GetPrivateProfileStringA(key, buf2, buf3, buf2, 256, table); GetPrivateProfileStringA(key, buf2, buf3, buf2, 256, table);
+3
View File
@@ -1533,6 +1533,9 @@ static void DllMain2() {
dlogr(" Done", DL_INIT); dlogr(" Done", DL_INIT);
} }
int gvar = GetPrivateProfileIntA("Misc", "SpecialDeathGVAR", 491, ini); // GVAR_MODOC_SHITTY_DEATH
if (gvar != 491) SafeWrite32(0x440C2A, gvar);
dlogr("Leave DllMain2", DL_MAIN); dlogr("Leave DllMain2", DL_MAIN);
} }