Bug in Damage::BreakMyShield
It was when I was playing with Fugitive and tried to neutralise Ragnar when I discovered rather irritating bug:
when trying to shot him with a bow his shield was able to withstand any amount of damage without breaking.
Later it turned out it's true if only I was shooting repeatedly, if I made a break in barrage the shield was breaking up.
To see how it works check this link.
here is some log from console where you can see how it goes:
Load Time = 2.418000
if shield: // shield=<B_PyEntity object at 22c1a14>
if shield: // shield=<B_PyEntity object at 22c07cc>
if shield: // shield=<B_PyEntity object at 22c2260>
## at this point shield should break already
if shield: // shield=<B_PyEntity object at 22c2314>
## but it remains 'invincible' with 0 durability
if shield: // shield=<B_PyEntity object at 22c23d4>
if shield: // shield=<B_PyEntity object at 22c23ec>
object PerkinsQuiver_Arrow_8 of kind Flecha of mass 0.5 sticking for 6.0 seconds
if shield: // shield=<B_PyEntity object at 22c2188>
I started to look for a reason and I found that fault lies somewhere in Damage.py::BreakMyShield method.
# @ Lib/Damage.py
for n in range(n_child):
if child and child.Kind<>"Entity Spot":
if Breakings.ExplodeSpecialObject ( me.InvLeft , 24000.0)==1:
for some reason when shooting repeatedly n_child is > 0
as far as I get it tries to unlink (is it same what delete?) derived objects but it fails and abandons execution of the rest of function body
question is how to fix it so it was dealing with that problem properly without dropping the rest of function body
PS. there are attached some files that will help if one wants to check that themselves - there is modified Lib/Damage.py with lot of print() debug info and already prepared scene - Coliseum map with Ragnar and "unlimited" quiver
there are also some console logs from my investigation, maybe that will help
PPS. sorry for this messy codes but they lose all indentations/new lines formatting when put in bbcode so I put them into message body