Raised This Month: $ Target: $400
 0% 

[Sven Co-op 5.11] m_pActiveItem crashes the game


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nero-sama
Junior Member
Join Date: Mar 2009
Old 04-15-2017 , 16:39   [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #1

So since they removed m_pActiveItem and changed it to m_hActiveItem that also changed the offset
const m_pActiveItem = 492
new const item = get_pdata_cbase( i, m_pActiveItem, 4 );

What is the new one/how can I find out?

Thanks <3
Nero-sama is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-15-2017 , 16:58   Re: [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #2

Could you upload the latest game dll (server)?

The offset may not even be changed. Considering the new "h" prefix, the type has probably been changed to EHANDLE. Try using get_pdata_ehandle() instead. Today, in the AngelScript API change notes, I've seen that they have changed a few members to EHANDLE.

Last edited by klippy; 04-15-2017 at 17:08.
klippy is offline
Nero-sama
Junior Member
Join Date: Mar 2009
Old 04-15-2017 , 17:13   Re: [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #3

Oooooh, didn't even consider that there were other get_pdata O_O
https://www.dropbox.com/s/ywhdh4f9uw...r-dll.rar?dl=0

Thanks :O
Nero-sama is offline
Nero-sama
Junior Member
Join Date: Mar 2009
Old 04-15-2017 , 17:15   Re: [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #4

error 017: undefined symbol "get_pdata_ehandle"
D:

edit: nvm, I need the latest devbuild of amxmodx (I'm running 1.8.2 as well as the servers I'm admining)
fml

Last edited by Nero-sama; 04-15-2017 at 17:17.
Nero-sama is offline
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
Nero-sama
Junior Member
Join Date: Mar 2009
Old 04-15-2017 , 19:42   Re: [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #6

Aight thanks <3
Oh, the linux one
yee lemme try to find it

edit: https://www.dropbox.com/s/u1xgk4qn7g...erver.rar?dl=0
There we are

Last edited by Nero-sama; 04-15-2017 at 19:43.
Nero-sama is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-15-2017 , 20:30   Re: [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #7

Looks like it's at 552 (2208 byte-aligned) now.
klippy is offline
Nero-sama
Junior Member
Join Date: Mar 2009
Old 04-15-2017 , 21:02   Re: [Sven Co-op 5.11] m_pActiveItem crashes the game
Reply With Quote #8

Thank yooou <3
Nero-sama 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 18:00.


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