Fix cg_function

This commit is contained in:
FutureRave 2022-03-11 16:06:14 +00:00
parent 123691e550
commit 1c647007b6
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 4 additions and 3 deletions

View File

@ -549,7 +549,8 @@ namespace game
}
}
void CG_GameMessage(LocalClientNum_t localClientNum, const char* msg)
// SP takes one extra argument, all possible values are undocumented
void CG_GameMessage(LocalClientNum_t localClientNum, const char* msg, int flags)
{
if (is_mp())
{
@ -557,7 +558,7 @@ namespace game
}
else if (is_sp())
{
reinterpret_cast<void(*)(LocalClientNum_t, const char*, int /*flags*/)>(0x4228A0)(localClientNum, msg, 17);
reinterpret_cast<void(*)(LocalClientNum_t, const char*, int)>(0x4228A0)(localClientNum, msg, flags);
}
}
}

View File

@ -168,7 +168,7 @@ namespace game
void TeleportPlayer(gentity_s* player, float* origin, float* angles);
void CG_GameMessage(LocalClientNum_t localClientNum, const char* msg);
void CG_GameMessage(LocalClientNum_t localClientNum, const char* msg, int flags = 0);
}
bool is_mp();