m_hViewModel is nullptr afer updating sourcemod
I updated sourcemod on my CS:GO server to version 1.11.0.6800 and all my plugins, which use m_hViewModel stoped working.
I digged into it and found out that after updating the sourcemod m_hViewModel is always nullptr for all players. I rolled back to 1.11.0.6603 and the bug has gone. I'd like to keep on using the newer verison of sourcemod, what can I use instead of m_hViewModel to identify the view model indices? |
Re: m_hViewModel is nullptr afer updating sourcemod
Sounds like an unintentional regression from one of the sendprop array changes - can you file an issue and provide sample code?
|
Re: m_hViewModel is nullptr afer updating sourcemod
1 Attachment(s)
I retrieve m_hViewModel via an extension.
If I do it in an smx plugin this way: PHP Code:
But in the extension I do it this way: PHP Code:
Strange thing is that the offsets are correct for all the other properties which I retrieve. Looks like FindSendPropInfo was partially broken in 1.11. Creating a C++ reproducible example is not a trivial thing, I might find some time in future, for now I see the only way to avoid this problem is downgrading to 1.10 In netprops m_hViewModel is defined two times, it might be the reason why FindSendPropInfo can't get the offset for it. https://gist.github.com/saul/766b8f8...553cd708db6338 |
Re: m_hViewModel is nullptr afer updating sourcemod
1.11 has gained proper support for legacy array props. You need to get the array contents prop and add its offset, as FindSendPropInfo now gives you the array wrapper instead. See the changes in https://github.com/alliedmodders/sourcemod/pull/1550 - we might be able to fiddle the C++ API to work if you do open an issue though.
|
Re: m_hViewModel is nullptr afer updating sourcemod
asherkin, Thanks, I checked the code and see that some adjustment is to be made to get correct offsets, so technically the issue is on my side.
|
All times are GMT -4. The time now is 05:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.