Raised This Month: $ Target: $400
 0% 

[Sven Co-op 5.11] m_pActiveItem crashes the game


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-15-2017 , 18:26   Re: [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #5

https://github.com/alliedmodders/amx....inc#L113-L127
Looks like there is get_pdata_ent in 1.8.2. Keep in mind that, as the documentation says, it's byte-addresable, meaning that instead of 492 you would use 1968 (492 * 4 = 1968 ).
EHANDLE has such memory layout (8 bytes):
Code:
edict_t *m_pent;
int m_serialnumber;
As m_pent is first, it should be possible to just use get_pdata_ent() instead on the same offset (times 4). I don't know how safe this is though, as the entity might not be valid or have a different serial number (meaning it's a different entity). I guess just checking for pev_valid() will be alright.

Anyway, I am asking again: can you upload the latest linux server binary? That way I can try to find if the offset has changed.

Last edited by klippy; 04-15-2017 at 18:27.
klippy is offline
 



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 18:00.


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