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

open.mp compatibility and some other fixes #258

Closed Zbyss closed 1 year ago

Zbyss commented 1 year ago
  1. open.mp compatibility
    • y_va compatibility for textdraw hooks
    • all weapon-config functions related to weapons have WEAPON tag where appropriate when open.mp is detected (callbacks are excluded as in open.mp includes - strange decision, but for the sake of consistency...)
    • British forms are used in natives because US forms are deprecated in open.mp includes, stupid design idea
    • the WC_AIM_SYNC code is excluded when open.mp includes are detected, because the problem it targets is already fixed internally, same for few fixes in WC_PLAYER_SYNC
    • hooks for new open.mp natives (Pawn.RakNet is required to fully hook AllowAdminTeleport)
    • fixed WC_DEBUG and GetRejectedHit which gave warnings about invalid number of parameters on open.mp
    • fixed warning about deprecated console variable in open.mp
    • cleaned up the textdraw creation code, as many of the properties were unnecessary

⚠️ WEAPON_UNKNOWN is defined as -1 in open.mp. weapon-config uses 55, so it is redefined - this may break scripts that rely on open.mp's default value.

  1. Pixel perfect health bar At least for widescreen resolutions. 4:3 resolutions are a little off, but still more accurate than the previous values.

The rest of the changes are fairly self-explanatory.

ADRFranklin commented 1 year ago

Is this ready for merging now?

Zbyss commented 1 year ago

Yes.