Commit Graph

12 Commits

Author SHA1 Message Date
a5e36dc85a Fix incorrect description for FixAmmoSell
Previous description understated the effects of the `allowNegativeDosh`
flag. Effects are much more common and significat that previously
thought because of game behavior on filling ammo for one or all weapons.
2020-03-22 19:32:36 +07:00
fac38e5a9c Change FixInventoryAbuse behavior
Changes behavior of `FixInventoryAbuse` on weight limit violation.
Instead of destroying all weapons in the inventory of abuser,
it drops them on the ground.

This change is mainly caused by game behavior that allows
regular players to accidental break weight limits.
2020-03-22 19:23:57 +07:00
c2942b6323 Refactor to simplify
`CheckAmmoPickup` effectively only contained another function call
and itself was only called once. As it also didn't add to readbility,
it needed to be removed.
2020-02-19 00:48:48 +07:00
2c39bf1822 Fix misstatement in FixAmmoSelling comments
Previous comments explaining the idea behind how `FixAmmoSelling`
works were incorrectly stating that non-default pickup class is only
used to calculate diuscounts, when it was also used to spawn
weapon pickups.
2020-02-19 00:42:28 +07:00
1a58ba0620 Fix FixAmmoSelling causing invisible pickups
Non-default value of pickup class was used to
spawn pickup when player drops a weapon.
But since we've replaced that class and it doesn't
(or might not) exist on the client - dropped weapons
appeared as invisible.

Catch the moment our custom pickup is spawned and
replace it back with default one.
2020-02-19 00:38:51 +07:00
2b75722de5 Fix missing function access modifiers 2020-02-19 00:28:28 +07:00
e902db39cd Add FixDualiesCost feature
This feature addressed two inventory issues:
1.  Players carrying amount of weapons that shouldn't be allowed by the
weight limit.
2.  Players carrying two variants of the same gun.
For example carrying both M32 and camo M32.
Single and dual version of the same weapon are also considered
the same gun, so you can't carry both MK23 and dual MK23 or
dual handcannons and golden handcannon.
2020-02-18 23:12:30 +07:00
233a11df89 Add FixDualiesCost feature
This feature fixes several issues related to the selling price of both
single and dual pistols, all originating from the existence of dual weapons.
Most notable issue is the ability to "print" money by buying and
selling pistols in a certain way.

  It fixes all of the issues by manually setting pistols'
'SellValue' variables to proper values.
2020-02-18 20:22:09 +07:00
e05f6e318e Fix required listener list for FixAmmoSelling
Unnecessary listener requirement for `FixAmmoSelling` was
left by a mistake.
2020-02-18 20:17:15 +07:00
8f9b6d9e13 Fix a misstatement in a FixAmmoSelling comment 2020-02-18 20:12:30 +07:00
36a933beef Reformat bad indentation 2020-02-18 20:10:36 +07:00
b289a44a9f First commit 2020-02-16 19:41:27 +07:00