Added rounding calculation to ComputeSprayMod to give roundsCenter & roundsMainTarget some advantages.

Added CarryWeightLimit option for changing the carry weight limit. (max value: 2^31 − 1, probably an overkill.)
This commit is contained in:
NovaRain
2016-03-07 11:29:26 +08:00
parent 6feda61424
commit 108719ac83
3 changed files with 12 additions and 1 deletions
+3
View File
@@ -555,6 +555,9 @@ CanSellUsedGeiger=1
;Set to 1 to skip weapon equip/unequip animations when searching containers or doing other actions
InstantWeaponEquip=0
;To change the carry weight limit, uncomment the next line (Default is 999)
;CarryWeightLimit=999
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Debugging]
;Extra sfall configuration settings that can be used by modders
+8 -1
View File
@@ -34,6 +34,10 @@ static void __declspec(naked) compute_spray_rounds_distribution() {
imul ebx; // multiply eax by ebx and store result in edx:eax
mov ebx, compute_spray_center_div; // divisor
idiv ebx; // divide edx:eax by ebx and store result in eax (edx)
test edx, edx; // if remainder (edx) is not 0
jz divEnd1;
inc eax; // round up
divEnd1:
mov [esp+16], eax; // roundsCenter
test eax, eax; // if (roundsCenter == 0)
jnz loc_42350F;
@@ -52,7 +56,10 @@ loc_42350F:
imul ebx;
mov ebx, compute_spray_target_div;
idiv ebx;
test edx, edx; // if remainder (edx) is not 0
jz divEnd2;
inc eax; // round up
divEnd2:
mov ebp, eax;
mov ebx, [esp+16];
// at this point, eax should contain the same value as ebp (roundsMainTarget); ebx should contain value of roundsCenter
+1
View File
@@ -1514,6 +1514,7 @@ static void DllMain2() {
SimplePatch<BYTE>(addrs, 2, "Misc", "DialogPanelAnimDelay", 33, 0, 255);
addrs[0] = 0x499B99; addrs[1] = 0x499DA8;
SimplePatch<BYTE>(addrs, 2, "Misc", "PipboyTimeAnimDelay", 50, 0, 127);
SimplePatch<DWORD>(0x51D66C, "Misc", "CarryWeightLimit", 999);
if (GetPrivateProfileIntA("Misc", "EnableMusicInDialogue", 0, ini)) {
dlog("Applying playing music in dialogue patch.", DL_INIT);