2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

Merge pull request #134 from theAsmodai/master

Fixed mistake in HPAK_AddLump
This commit is contained in:
theAsmodai 2016-01-17 15:50:04 +03:00
commit 57bcc12469
3 changed files with 7 additions and 3 deletions

View File

@ -361,11 +361,15 @@ void HPAK_AddLump(qboolean bUseQueue, char *pakname, struct resource_s *pResourc
if (Q_memcmp(pResource->rgucMD5_hash, olddirectory.p_rgEntries[i].resource.rgucMD5_hash, 16) >= 0)
{
pNewEntry = &newdirectory.p_rgEntries[i];
#ifndef REHLDS_FIXES
while (i < olddirectory.nEntries)
{
Q_memcpy(&newdirectory.p_rgEntries[i + 1], &olddirectory.p_rgEntries[i + 1], sizeof(hash_pack_entry_t));
Q_memcpy(&newdirectory.p_rgEntries[i + 1], &olddirectory.p_rgEntries[i], sizeof(hash_pack_entry_t));
i++;
}
#else
Q_memcpy(&newdirectory.p_rgEntries[i + 1], &olddirectory.p_rgEntries[i], (olddirectory.nEntries - i) * sizeof(hash_pack_entry_t));
#endif
break;
}
}

View File

@ -350,7 +350,7 @@ IRehldsHookRegistry_Steam_GSGetSteamID* CRehldsHookchains::Steam_GSGetSteamID()
return &m_Steam_GSGetSteamID;
}
CRehldsHookRegistry_SV_TransferConsistencyInfo* CRehldsHookchains::SV_TransferConsistencyInfo() {
IRehldsHookRegistry_SV_TransferConsistencyInfo* CRehldsHookchains::SV_TransferConsistencyInfo() {
return &m_SV_TransferConsistencyInfo;
}

View File

@ -231,8 +231,8 @@ public:
virtual IRehldsHookRegistry_SV_ActivateServer* SV_ActivateServer();
virtual IRehldsHookRegistry_SV_WriteVoiceCodec* SV_WriteVoiceCodec();
virtual IRehldsHookRegistry_Steam_GSGetSteamID* Steam_GSGetSteamID();
virtual IRehldsHookRegistry_SV_TransferConsistencyInfo* SV_TransferConsistencyInfo();
virtual IRehldsHookRegistry_Steam_GSBUpdateUserData* Steam_GSBUpdateUserData();
virtual CRehldsHookRegistry_SV_TransferConsistencyInfo* SV_TransferConsistencyInfo();
};
extern CRehldsHookchains g_RehldsHookchains;