Raised This Month: $ Target: $400
 0% 

Missing painshock offset in gamedata?


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-29-2015 , 04:59   Re: Missing painshock offset in gamedata?
Reply With Quote #11

Technically slightly slower because offset value needs to be retrieved from provided member name, but the look up (hashtable) is very fast. Difference is trivial.

The advantages of the new natives are mainly:

- No more hard-coded offset value in plugin. If for some reasons value would change, you won't need to update your plugin. Only gamedata will need an update, and it's planned to have an auto-updater similar to Sourcemod.
- Much safer. Since type/size are hard-coded in gamedata, we have more sanity checks. This should greatly reduce any wrong usage and therefore potential crash.
- It supports also more type and kind of increase readability since you have to use the real names now.

You would want to use _pdata natives if your mod is not supported (currently only CS/CZ, DoD, HLDM, OP4, and TFC).
I don't really see others contexts where it would be still needed.
__________________

Last edited by Arkshine; 12-29-2015 at 05:00.
Arkshine is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode