Add a detailed print in SV_HandleClientMessage

This commit is contained in:
s1lentq 2017-01-13 21:37:05 +07:00
parent 63a037af60
commit fedc99bb85
4 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# Rehlds [![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:Rehlds_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=Rehlds_Publish&guest=1) [![Download](http://rehlds.ru/version/rehlds/)](http://teamcity.rehlds.org/guestAuth/downloadArtifacts.html?buildTypeId=Rehlds_Publish&buildId=lastSuccessful)
# Rehlds [![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:Rehlds_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=Rehlds_Publish&guest=1) [![Download](https://camo.githubusercontent.com/65c70643ec7b40eea50971003624c2fb04d8d375/687474703a2f2f7265686c64732e6f72672f76657273696f6e2f7265686c64732e737667)](http://teamcity.rehlds.org/guestAuth/downloadArtifacts.html?buildTypeId=Rehlds_Publish&buildId=lastSuccessful)
Reverse-engineered (and bugfixed) HLDS

View File

@ -171,7 +171,7 @@ int EXT_FUNC PF_modelindex(const char *pstr)
int EXT_FUNC ModelFrames(int modelIndex)
{
if (modelIndex <= 0 || modelIndex >= 512)
if (modelIndex <= 0 || modelIndex >= MAX_MODELS)
{
Con_DPrintf("Bad sprite index!\n");
return 1;
@ -1990,7 +1990,7 @@ edict_t* EXT_FUNC PF_CreateFakeClient_I(const char *netname)
Info_SetValueForKey(fakeclient->userinfo, "model", "gordon", MAX_INFO_STRING);
Info_SetValueForKey(fakeclient->userinfo, "topcolor", "1", MAX_INFO_STRING);
Info_SetValueForKey(fakeclient->userinfo, "bottomcolor", "1", MAX_INFO_STRING);
fakeclient->sendinfo = 1;
fakeclient->sendinfo = TRUE;
SV_ExtractFromUserinfo(fakeclient);
fakeclient->network_userid.m_SteamID = ISteamGameServer_CreateUnauthenticatedUserConnection();

View File

@ -636,5 +636,6 @@ void* EXT_FUNC GetModelPtr(edict_t *pEdict)
{
return NULL;
}
return Mod_Extradata(g_psv.models[pEdict->v.modelindex]);
return Mod_Extradata(Mod_Handle(pEdict->v.modelindex));
}

View File

@ -1716,6 +1716,14 @@ void EXT_FUNC SV_HandleClientMessage_api(IGameClient* client, int8 opcode) {
void(*func)(client_t *) = sv_clcfuncs[opcode].pfnParse;
if (func)
func(cl);
#ifdef REHLDS_FIXES
if (msg_badread)
{
Con_Printf("SV_ReadClientMessage: badread on %s, opcode %s\n", host_client->name, sv_clcfuncs[opcode].pszname);
}
#endif
}
void SV_ExecuteClientMessage(client_t *cl)