Problem in Distro Attackhook
Posted: Thu Mar 29, 2007 9:30 am
In the distro 097 combat package, there's the combatHook.src script.
Within is the function GetArmorHit (Line 260 ->), where a conditional is comparing a struct member .ar, even though the variable itself is still an integer, resulting in comparison of an uninit. object.
I fixed this by changing it to:
Without the fix, this function always returned 0, resulting in worn armor being ignored.
Within is the function GetArmorHit (Line 260 ->), where a conditional is comparing a struct member .ar, even though the variable itself is still an integer, resulting in comparison of an uninit. object.
Code: Select all
var best_armor := 0;
foreach item in ( armor_hit )
if ( item.ar > best_armor.ar )
best_armor := item;
endif
SleepMS(2);
endforeachCode: Select all
var best_armor := struct;
best_armor.ar := 0;
foreach item in ( armor_hit )
if ( item.ar > best_armor.ar )
best_armor := item;
endif
SleepMS(2);
endforeach