At first, thank you very much Razorapid! It's a great stuff!
I have two reflections.
I shot at myself with empty mg42 and it gave NIL value to the local.inflictor at 'damage' callback. Doesn't the inflictor the mg42 in this case? In addition, local.damage signs the value given in the .tik file. For instance, if dmbulletdamage is 45 then local.damage is always 45 - not as much as it takes away the player, because this value changes at certain vulnerability locations.
Hmm, actually it's not my fault. It's how engine works, I only copy values I get from
Code:
Entity::Damage
function, and pass them to script. So if inflictor is NIL, then it should be NIL.
And I think that damage should be the exact damage that is going to be taken. Didn't test it with mg42, but I think it should work fine and give exact amount of damage. However, I'll look into this next weekend.