mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed item planting for non-biped critters with the "barter" flag set
(BGforgeNet/Fallout2_Unofficial_Patch#95) Updated version number.
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
Key=42
|
||||
|
||||
; Set to 1 to also highlight containers
|
||||
Containers=1
|
||||
Containers=0
|
||||
|
||||
; Set to 1 to also highlight lootable corpses
|
||||
Corpses=1
|
||||
Corpses=0
|
||||
|
||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
||||
CheckLOS=0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.3.3.2
|
||||
;v4.3.4
|
||||
|
||||
[Main]
|
||||
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
|
||||
|
||||
@@ -3144,6 +3144,29 @@ noObject:
|
||||
}
|
||||
}
|
||||
|
||||
// returns 0 (biped) if the critter has the "barter" flag set
|
||||
static long __fastcall BarterOverrideBodyType(fo::GameObject* critter) {
|
||||
return (fo::util::GetProto(critter->protoId)->critter.critterFlags & fo::CritterFlags::Barter)
|
||||
? fo::BodyType::Biped
|
||||
: fo::BodyType::Quadruped;
|
||||
}
|
||||
|
||||
static void __declspec(naked) item_add_mult_hook_body_type() {
|
||||
__asm {
|
||||
call fo::funcoffs::critter_body_type_;
|
||||
test eax, eax;
|
||||
jnz notBiped;
|
||||
retn;
|
||||
notBiped:
|
||||
push edx;
|
||||
push ecx;
|
||||
call BarterOverrideBodyType; // ecx - critter
|
||||
pop ecx;
|
||||
pop edx;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
void BugFixes::init()
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
@@ -3961,6 +3984,9 @@ void BugFixes::init()
|
||||
|
||||
// Fix incorrect value of the limit number of floating messages
|
||||
SafeWrite8(0x4B039F, 20); // text_object_create_ (was 19)
|
||||
|
||||
// Fix for being unable to plant items on non-biped critters with the "Barter" flag set
|
||||
HookCall(0x477183, item_add_mult_hook_body_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -24,7 +24,7 @@
|
||||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_BUILD 3
|
||||
#define VERSION_REV 2
|
||||
#define VERSION_BUILD 4
|
||||
#define VERSION_REV 0
|
||||
|
||||
#define VERSION_STRING "4.3.3.2"
|
||||
#define VERSION_STRING "4.3.4"
|
||||
|
||||
Reference in New Issue
Block a user