I am trying to make IsVisibleToPlayer Windows signature.
PHP Code:
IsVisibleToPlayer(Vector const&, CBasePlayer *, int, int, float, CBaseEntity const*, TerrorNavArea **, bool *)
The call sequence is probably like this:
PHP Code:
CanZombieSpawnHere -> IsVisibleToTeam -> IsVisibleToPlayer
Fortunately, "CanZombieSpawnHere" function has unique text: "Witch converted to a normal Infected!".
By searching for this unique text, we can find the "CanZombieSpawnHere" function in the server.dll binary.
By comparison, "sub_1028C920" should be "IsVisibleToTeam" function.
PHP Code:
-------- server_srv.so ---------
v24 = *((_DWORD *)TheDirector + 346);
v32[0] = *(_DWORD *)a2;
v32[1] = *(_DWORD *)(a2 + 4);
*(float *)&v32[2] = *(float *)(a2 + 8) + 56.799999;
if ( (unsigned __int8)CDirectorTacticalServices::IsVisibleToTeam(v24, v32, 2, 3, 0, a3, 0)
|| (v33[0] = *(_DWORD *)a2,
v33[1] = *(_DWORD *)(a2 + 4),
*(float *)&v33[2] = *(float *)(a2 + 8) + 35.5,
(unsigned __int8)CDirectorTacticalServices::IsVisibleToTeam(v24, v33, 2, 3, 0, a3, 0))
|| (v34 = *(float *)a2,
v35 = *(float *)(a2 + 4),
v36 = *(float *)(a2 + 8) + 1.0,
(unsigned __int8)CDirectorTacticalServices::IsVisibleToTeam(v24, &v34, 2, 3, 0, a3, 0)) )
{
v6 = CDirector::IsLocationFoggedToSurvivors(TheDirector, a2);
-------- server.dll ---------
v17 = *(_DWORD *)a1;
v18 = *((_DWORD *)a1 + 1);
v19 = a1[2] + 56.799999;
if ( (unsigned __int8)sub_1028C920(&v17, 2, 3, 0.0, v5, 0)
|| (v17 = *(_DWORD *)a1,
v18 = *((_DWORD *)a1 + 1),
v19 = a1[2] + 35.5,
(unsigned __int8)sub_1028C920(&v17, 2, 3, 0.0, v5, 0))
|| (v17 = *(_DWORD *)a1,
v18 = *((_DWORD *)a1 + 1),
v19 = a1[2] + 1.0,
(unsigned __int8)sub_1028C920(&v17, 2, 3, 0.0, v5, 0)) )
{
if ( !(unsigned __int8)sub_10262D00(a1) )
But, here's the problem, the contents of the "sub_1028C920" and "IsVisibleToTeam" functions look completely different. The windows version seems to have merged "IsVisibleToTeam" and "IsVisibleToPlayer" together, not separated.
So, how to make the signature of the windwos version of "IsVisibleToPlayer".