mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added note on effect flags to CriticalOverrides.ini.
Minor edits to Criticals/Elevators.cpp.
This commit is contained in:
@@ -14,15 +14,16 @@ Part_0=1 ; Tell sfall that we want to modify the head entries
|
||||
|
||||
[c_00_0] ; The entries for the head table of the men critter type.
|
||||
e0_DamageMultiplier=100 ;First level critical
|
||||
e0_EffectFlags=0
|
||||
e0_EffectFlags=0 ; The value of the flags (see DAM_* in Define.h)
|
||||
; For multiple effects, use the sum of the flags (e.g. 2050 = knocked down + bypass armor)
|
||||
e0_StatCheck=0
|
||||
e0_StatMod=0
|
||||
e0_FailureEffect=0
|
||||
e0_Message=0 ; This is an index into the msg file, not a string
|
||||
e0_FailMessage=0
|
||||
e1_... ; Second level critical
|
||||
... ; And so on up to the hardest hitting level 5 critical
|
||||
e5_...
|
||||
;e1_... ; Second level critical
|
||||
;... ; And so on up to the hardest hitting level 5 critical
|
||||
;e5_...
|
||||
|
||||
;You can skip any entries from this section to leave them at their defaults
|
||||
;Any missing entries for critters 19-37 will be replaced by a 0, since they have no default
|
||||
|
||||
@@ -46,7 +46,9 @@ static const char* critNames[] = {
|
||||
static fo::CritInfo baseCritTable[Criticals::critTableCount][9][6] = {0}; // Base critical table set up via enabling OverrideCriticalTable in ddraw.ini
|
||||
static fo::CritInfo critTable[Criticals::critTableCount][9][6];
|
||||
static fo::CritInfo (*playerCrit)[9][6];
|
||||
|
||||
static bool Inited = false;
|
||||
|
||||
static const char* errorTable = "\nError: %s - function requires enabling OverrideCriticalTable in ddraw.ini.";
|
||||
|
||||
void Criticals::SetCriticalTable(DWORD critter, DWORD bodypart, DWORD slot, DWORD element, DWORD value) {
|
||||
@@ -73,7 +75,7 @@ void Criticals::ResetCriticalTable(DWORD critter, DWORD bodypart, DWORD slot, DW
|
||||
critTable[critter][bodypart][slot].values[element] = baseCritTable[critter][bodypart][slot].values[element];
|
||||
}
|
||||
|
||||
void CritLoad() {
|
||||
static void CritLoad() {
|
||||
if (!Inited) return;
|
||||
if (mode == 1) {
|
||||
dlogr("Setting up critical hit table using CriticalOverrides.ini", DL_CRITICALS);
|
||||
@@ -102,7 +104,7 @@ void CritLoad() {
|
||||
dlogr("Setting up critical hit table using RP fixes", DL_CRITICALS);
|
||||
memcpy(baseCritTable, fo::var::crit_succ_eff, sizeof(critTable));
|
||||
//memset(&baseCritTable[19], 0, 6 * 9 * 19 * sizeof(fo::CritInfo));
|
||||
memcpy(&baseCritTable[38], &fo::var::pc_crit_succ_eff, 6 * 9 * sizeof(fo::CritInfo)); // PC crit table
|
||||
memcpy(&baseCritTable[38], fo::var::pc_crit_succ_eff, 6 * 9 * sizeof(fo::CritInfo)); // PC crit table
|
||||
|
||||
if (mode == 3) {
|
||||
char buf[32], buf2[32], buf3[32];
|
||||
@@ -140,7 +142,7 @@ static void CriticalTableOverride() {
|
||||
SafeWrite32(0x423F96, (DWORD)playerCrit);
|
||||
SafeWrite32(0x423FB3, (DWORD)critTable);
|
||||
|
||||
if (mode == 2 || mode == 3) {
|
||||
if (mode == 2 || mode == 3) { // bug fixes
|
||||
SetEntry(2, 4, 1, 4, 0);
|
||||
SetEntry(2, 4, 1, 5, 5216);
|
||||
SetEntry(2, 4, 1, 6, 5000);
|
||||
@@ -242,7 +244,7 @@ static void CriticalTableOverride() {
|
||||
}
|
||||
#undef SetEntry
|
||||
|
||||
void RemoveCriticalTimeLimitsPatch() {
|
||||
static void RemoveCriticalTimeLimitsPatch() {
|
||||
if (GetConfigInt("Misc", "RemoveCriticalTimelimits", 0)) {
|
||||
dlog("Removing critical time limits.", DL_INIT);
|
||||
SafeWrite8(0x424118, 0xEB); // jmps 0x424131
|
||||
|
||||
@@ -167,9 +167,10 @@ void ElevatorsInit() {
|
||||
void Elevators::init() {
|
||||
auto elevPath = GetConfigString("Misc", "ElevatorsFile", "", MAX_PATH);
|
||||
if (!elevPath.empty()) {
|
||||
dlogr("Applying elevator patch.", DL_INIT);
|
||||
dlog("Applying elevator patch.", DL_INIT);
|
||||
ElevatorsInit();
|
||||
LoadElevators(elevPath.insert(0, ".\\").c_str());
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user