oscar-broman / samp-weapon-config

A more consistent and responsive damage system with many new features
Apache License 2.0
93 stars 83 forks source link

Remove `>= 0.0` for stealth knife damage #283

Closed NexiusTailer closed 3 months ago

NexiusTailer commented 3 months ago

Currently this case (before the last change): https://github.com/oscar-broman/samp-weapon-config/blob/c5f988bc19cb22d4e317e9e91090e1349a673da0/weapon-config.inc#L3861 is about processing stealth knife damage only, while anything with damage > 0.0 for knife is processed like any other melee weapon damage, inside ProcessDamage function.

So, as it turns out, both cases (when knife damage is 0.0 and when it's more than 0.0) are considered and validated by distance, just in different places. Keeping the change from commit 057e970:

if (_:amount >= _:0.0) {

it starts process any knife damage as stealth knife case.

Sorry for late investigation since my initial assumptions was different before all these tests. Any allegedly working knife damagers should be firstly confirmed they are indeed cases with the latest version of weapon-config, since the previously commited change aims to solve a reported case without the details about what was used from server side.