I retrieve m_hViewModel via an extension.
If I do it in an smx plugin this way:
PHP Code:
int viewModel = GetEntPropEnt(client, Prop_Send, "m_hViewModel");
It works and returns correct index,
But in the extension I do it this way:
PHP Code:
unsigned int offset;
sm_sendprop_info_t info
if(gamehelpers->FindSendPropInfo("CCSPlayer", "m_hViewModel", &info))
{
offset = info.actual_offset;
}
And the returned offset is 0. (In 1.10 it prints correct offset: "InitProp m_hViewModel, 4056")
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