amxmodx icon indicating copy to clipboard operation
amxmodx copied to clipboard

Revert GetWeaponData implementation.

Open afwn90cj93201nixr2e1re opened this issue 4 years ago • 9 comments

afwn90cj93201nixr2e1re avatar Mar 11 '20 18:03 afwn90cj93201nixr2e1re

@s1lentq https://github.com/alliedmodders/amxmodx/commit/82cb94ab56d99d75fd990c48ea33288e0f1359cb#diff-f2122483fa3656d24872b03f9266d1daL1626

Just push load diff on deleted fakemeta.cpp file, it's gonna show line.

There is too much stuff was deleted via this commit.

afwn90cj93201nixr2e1re avatar Mar 14 '20 22:03 afwn90cj93201nixr2e1re

Also this one. @Arkshine

afwn90cj93201nixr2e1re avatar May 29 '20 20:05 afwn90cj93201nixr2e1re

Please explain. Is it actually used? Maybe it has been removed intentionally?

@WPMGPRoSToTeMa thoughts on this, please?

Arkshine avatar Jun 03 '20 21:06 Arkshine

@Arkshine I don't see that it was implemented earlier. But it's a useful thing that I'm also missing.

WPMGPRoSToTeMa avatar Jun 04 '20 05:06 WPMGPRoSToTeMa

For us? Ofc. For u? Maybe, there's much thing's u can do with that, instead using some, idk, some updateclientdata hooks.

https://www.youtube.com/watch?v=cWE9Gf0N7Aw We made this. And some another usefull stuff.

afwn90cj93201nixr2e1re avatar Jun 04 '20 12:06 afwn90cj93201nixr2e1re

I already saw it, but it is only a stub, nothing related to .inc and etc stuff.

amxmodx/fakemeta.cpp is also not related to fakemeta AMXX module. The source code for the module is located in dlls/fakemeta folder.

For us? Ofc. For u? Maybe, there's much thing's u can do with that, instead using some, idk, some updateclientdata hooks.

https://www.youtube.com/watch?v=cWE9Gf0N7Aw We made this. And some another usefull stuff.

Yep, previously I was doing this through changing m_iClip in UpdateClientData and then restoring its original value in AddToFullPack.

WPMGPRoSToTeMa avatar Jun 04 '20 12:06 WPMGPRoSToTeMa

So, and explaining why there is index in native coz weapon_data handler is 64 array, and size of 64*weapon_data can cause stack issues, that's why i just provide pointer instead WeaponData:arr[64].

You mean 32? Isn't this structure associated to MAX_WEAPONS ; and I believe value is 32 in GoldSrc. As minimal safety, native should throw an error is index is out of bound.

Arkshine avatar Jul 17 '20 09:07 Arkshine

No it's not, and no, not 32, 64. https://github.com/dreamstalker/rehlds/search?q=weapon_data_t&type=

afwn90cj93201nixr2e1re avatar Jul 17 '20 19:07 afwn90cj93201nixr2e1re

I mean i can provide into plugin public asd(WeaponData:arr[64] ...) and then use native set_wd(arr[123],..) or how it was implemented by me rn, public asd (WeaponData:arrPtr, ...) { Set_wd(arrPtr, arrIndex (0-63), values...)

afwn90cj93201nixr2e1re avatar Jul 17 '20 19:07 afwn90cj93201nixr2e1re