mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed isCheck argument (arg1) for HOOK_ONEXPLOSION hook (from Mr.Stalin)
Removed RemoveWindowRounding option because it doesn't affect anything.
This commit is contained in:
@@ -389,9 +389,6 @@ Doctor=293
|
||||
Science=293
|
||||
Repair=293
|
||||
|
||||
;Remove window position rounding
|
||||
RemoveWindowRounding=0
|
||||
|
||||
;Set to 1 to add scroll buttons to the pipboy quest list, and remove the quests per area limit
|
||||
;Set to 2 to use a different set of scroll buttons
|
||||
UseScrollingQuestsList=1
|
||||
|
||||
@@ -111,7 +111,7 @@ critter ret3 - Override the target of the attack
|
||||
HOOK_CALCAPCOST (hs_calcapcost.int)
|
||||
|
||||
Runs whenever Fallout is calculating the AP cost of using the weapon (or unarmed attack). Doesn't run for using other item types or moving.
|
||||
Note that the first time a game is loaded, this script doesn't run before the initial interface is drawn, so if the script effects the AP cost of whatever is in the players hands at the time the wrong AP cost will be shown. It will be fixed the next time the interface is redrawn.
|
||||
Note that the first time a game is loaded, this script doesn't run before the initial interface is drawn, so if the script effects the AP cost of whatever is in the player's hands at the time the wrong AP cost will be shown. It will be fixed the next time the interface is redrawn.
|
||||
You can get the weapon object by checking item slot based on attack type (ATKTYPE_LWEP1, ATKTYPE_LWEP2, etc) and then calling critter_inven_obj().
|
||||
|
||||
critter arg1 - The critter performing the action
|
||||
@@ -306,7 +306,7 @@ object* ret1 - 0 if the hex doesn't block, or any sort of object pointer if it d
|
||||
|
||||
HOOK_ITEMDAMAGE (hs_itemdamage.int)
|
||||
|
||||
Runs when retrieving the damage rating of the players used weapon. (Which may be their fists.)
|
||||
Runs when retrieving the damage rating of the player's used weapon. (Which may be their fists.)
|
||||
|
||||
int arg1 - The default min damage
|
||||
int arg2 - The default max damage
|
||||
@@ -566,10 +566,10 @@ int ret2 - pass 1 to allow the skill being used in combat (only for dude_obj
|
||||
|
||||
HOOK_ONEXPLOSION (hs_onexplosion.int)
|
||||
|
||||
Runs when an explosion occurs and Fallout is checking all the tiles within the explosion radius for targets.
|
||||
Runs when Fallout is checking all the tiles within the explosion radius for targets before an explosion occurs.
|
||||
The tile checking will be interrupted when 6 additional targets (critters) are received.
|
||||
|
||||
int arg1 - event type: 1 - when the explosion is from an explosive item, 0 - otherwise
|
||||
int arg1 - event type: 1 - when checking objects within the explosion radius without causing damage (e.g. the player drops an active explosive), 0 - otherwise
|
||||
Critter arg2 - The attacker
|
||||
int arg3 - The tile on which the explosion occurs
|
||||
int arg4 - checked tile within the explosion radius
|
||||
|
||||
@@ -167,7 +167,7 @@ static void __declspec(naked) ComputeDamageHook() {
|
||||
call fo::funcoffs::compute_damage_;
|
||||
pop ecx; // restore ctd (eax)
|
||||
pop edx; // restore num rounds
|
||||
call ComputeDamageHook_Script;
|
||||
call ComputeDamageHook_Script; // stack - arg multiply
|
||||
pop ecx;
|
||||
retn;
|
||||
}
|
||||
@@ -341,7 +341,7 @@ normalTurn:
|
||||
}
|
||||
}
|
||||
|
||||
fo::GameObject* __fastcall ComputeExplosionOnExtrasHook_Script(fo::GameObject* object, DWORD checkTile, fo::ComputeAttackResult* ctdSource, DWORD isCheck, DWORD isThrowing, fo::GameObject* who) {
|
||||
fo::GameObject* __fastcall ComputeExplosionOnExtrasHook_Script(fo::GameObject* object, DWORD isCheck, DWORD checkTile, fo::ComputeAttackResult* ctdSource, DWORD isThrowing, fo::GameObject* who) {
|
||||
fo::GameObject* result = object;
|
||||
|
||||
BeginHook();
|
||||
@@ -376,11 +376,15 @@ hook:
|
||||
push eax; // who (target/source)
|
||||
call fo::funcoffs::obj_blocking_at_;
|
||||
push [esp + 0x34 - 0x24 + 12]; // isThrowing
|
||||
push [esp + 0x34 - 0x34 + 16]; // isCheck (bypass damage)
|
||||
xor edx, edx;
|
||||
cmp dword ptr [esp + 0x34 + 16], 0x412F11; // check called from action_explode_
|
||||
jz skip;
|
||||
mov edx, [esp + 0x34 - 0x34 + 16]; // isCheck (bypass damage)
|
||||
skip:
|
||||
push esi; // source ctd
|
||||
push edi; // check tile
|
||||
mov ecx, eax; // object
|
||||
mov edx, edi; // check tile
|
||||
call ComputeExplosionOnExtrasHook_Script;
|
||||
call ComputeExplosionOnExtrasHook_Script; // edx - isCheck
|
||||
pop ecx;
|
||||
retn;
|
||||
}
|
||||
|
||||
@@ -807,12 +807,6 @@ void AlwaysReloadMsgs() {
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveWindowRoundingPatch() {
|
||||
if(GetConfigInt("Misc", "RemoveWindowRounding", 0)) {
|
||||
SafeWrite16(0x4B8090, 0x04EB); // jmps 0x4B8096
|
||||
}
|
||||
}
|
||||
|
||||
void InventoryCharacterRotationSpeedPatch() {
|
||||
DWORD setting = GetConfigInt("Misc", "SpeedInventoryPCRotation", 166);
|
||||
if (setting != 166 && setting <= 1000) {
|
||||
@@ -978,7 +972,6 @@ void MiscPatches::init() {
|
||||
ApplyNpcExtraApPatch();
|
||||
|
||||
SkilldexImagesPatch();
|
||||
RemoveWindowRoundingPatch();
|
||||
|
||||
SpeedInterfaceCounterAnimsPatch();
|
||||
ScienceOnCrittersPatch();
|
||||
|
||||
Reference in New Issue
Block a user