mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed the "uncalled" critical tables for some critter types
ref: https://www.nma-fallout.com/threads/219827/
This commit is contained in:
@@ -147,6 +147,9 @@ static void CriticalTableOverride() {
|
||||
SafeWrite32(0x423FB3, (DWORD)critTable);
|
||||
|
||||
if (mode == 2 || mode == 3) { // bug fixes
|
||||
SetEntry(0, 8, 2, 1, 2050);
|
||||
SetEntry(0, 8, 2, 5, 5019);
|
||||
|
||||
SetEntry(2, 4, 1, 4, 0);
|
||||
SetEntry(2, 4, 1, 5, 5216);
|
||||
SetEntry(2, 4, 1, 6, 5000);
|
||||
@@ -163,6 +166,10 @@ static void CriticalTableOverride() {
|
||||
SetEntry(2, 5, 2, 5, 5216);
|
||||
SetEntry(2, 5, 2, 6, 5000);
|
||||
|
||||
SetEntry(2, 8, 1, 0, 4);
|
||||
SetEntry(2, 8, 2, 1, 2050);
|
||||
SetEntry(2, 8, 2, 5, 5212);
|
||||
|
||||
SetEntry(3, 5, 1, 6, 5306);
|
||||
|
||||
SetEntry(4, 0, 4, 2, -1);
|
||||
@@ -172,17 +179,30 @@ static void CriticalTableOverride() {
|
||||
SetEntry(6, 4, 1, 4, 2);
|
||||
|
||||
SetEntry(6, 5, 1, 4, 2);
|
||||
|
||||
SetEntry(6, 5, 2, 6, 5608);
|
||||
|
||||
SetEntry(9, 3, 3, 4, 2);
|
||||
|
||||
SetEntry(9, 8, 3, 4, 2);
|
||||
|
||||
SetEntry(13, 5, 1, 4, 4);
|
||||
SetEntry(13, 5, 2, 4, 4);
|
||||
SetEntry(13, 5, 3, 4, 4);
|
||||
SetEntry(13, 5, 4, 4, 4);
|
||||
SetEntry(13, 5, 5, 4, 4);
|
||||
|
||||
SetEntry(15, 8, 0, 5, 6701);
|
||||
SetEntry(15, 8, 1, 5, 6701);
|
||||
SetEntry(15, 8, 2, 1, 2050);
|
||||
SetEntry(15, 8, 2, 5, 6704);
|
||||
SetEntry(15, 8, 3, 5, 6704);
|
||||
SetEntry(15, 8, 4, 5, 6704);
|
||||
SetEntry(15, 8, 5, 5, 6704);
|
||||
|
||||
SetEntry(16, 8, 2, 1, 2050);
|
||||
|
||||
SetEntry(17, 8, 2, 1, 2050);
|
||||
|
||||
SetEntry(18, 0, 0, 5, 5001);
|
||||
SetEntry(18, 0, 1, 5, 5001);
|
||||
SetEntry(18, 0, 2, 5, 5001);
|
||||
@@ -229,7 +249,6 @@ static void CriticalTableOverride() {
|
||||
SetEntry(18, 6, 0, 5, 5027);
|
||||
SetEntry(18, 6, 1, 5, 5027);
|
||||
SetEntry(18, 6, 2, 5, 5027);
|
||||
//SetEntry(18,6,2,6,0);
|
||||
SetEntry(18, 6, 3, 5, 5027);
|
||||
SetEntry(18, 6, 4, 5, 7104);
|
||||
SetEntry(18, 6, 5, 5, 7104);
|
||||
@@ -241,6 +260,11 @@ static void CriticalTableOverride() {
|
||||
SetEntry(18, 7, 3, 5, 7101);
|
||||
SetEntry(18, 7, 4, 5, 7101);
|
||||
SetEntry(18, 7, 5, 5, 7101);
|
||||
|
||||
SetEntry(18, 8, 2, 0, 3);
|
||||
SetEntry(18, 8, 4, 0, 4);
|
||||
SetEntry(18, 8, 4, 5, 7101);
|
||||
SetEntry(18, 8, 5, 5, 7101);
|
||||
}
|
||||
|
||||
if (CritTableLoad()) {
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Module.h"
|
||||
|
||||
namespace sfall
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Module.h"
|
||||
|
||||
namespace sfall
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include "Module.h"
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ static void SetGlobalVarInternal(__int64 var, int val) {
|
||||
globalVars.emplace(var, val);
|
||||
} else {
|
||||
if (val == 0) {
|
||||
globalVars.erase(itr); // applies for both float 0.0 and integer 0
|
||||
globalVars.erase(itr); // applies for both float 0.0 and integer 0
|
||||
} else {
|
||||
itr->second = val;
|
||||
}
|
||||
@@ -403,14 +403,14 @@ long GetGlobalVarInternal(__int64 val) {
|
||||
return (itr != globalVars.end()) ? itr->second : 0;
|
||||
}
|
||||
|
||||
long GetGlobalVar(const char* var) {
|
||||
return (strlen(var) == 8) ? GetGlobalVarInternal(*(__int64*)var) : 0;
|
||||
}
|
||||
|
||||
long GetGlobalVarInt(DWORD var) {
|
||||
return GetGlobalVarInternal(static_cast<__int64>(var));
|
||||
}
|
||||
|
||||
long GetGlobalVar(const char* var) {
|
||||
return (strlen(var) == 8) ? GetGlobalVarInternal(*(__int64*)var) : 0;
|
||||
}
|
||||
|
||||
void __fastcall SetSelfObject(fo::Program* script, fo::GameObject* obj) {
|
||||
std::unordered_map<fo::Program*, SelfOverrideObj>::iterator it = selfOverrideMap.find(script);
|
||||
bool isFind = (it != selfOverrideMap.end());
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Module.h"
|
||||
|
||||
namespace sfall
|
||||
|
||||
Reference in New Issue
Block a user