mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-27 07:05:43 +03:00
Merge branch 'dreamstalker:master' into test-overflowfix-szgetspace
This commit is contained in:
commit
02a177eb52
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -277,7 +277,7 @@ jobs:
|
||||
github.event.action == 'published' &&
|
||||
startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
7z a -tzip rehlds-bin-${{ env.APP_VERSION }}.zip bin/linux32/ hlsdk/
|
||||
7z a -tzip rehlds-bin-${{ env.APP_VERSION }}.zip bin/ hlsdk/
|
||||
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -aoa rehlds-dbg-${{ env.APP_VERSION }}.7z debug/
|
||||
|
||||
- name: Publish artifacts
|
||||
|
@ -881,6 +881,15 @@ void EXT_FUNC AnimationAutomove(const edict_t *pEdict, float flTime)
|
||||
void EXT_FUNC GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles)
|
||||
{
|
||||
pstudiohdr = (studiohdr_t *)Mod_Extradata(g_psv.models[pEdict->v.modelindex]);
|
||||
|
||||
#ifdef REHLDS_FIXES
|
||||
if (!pstudiohdr)
|
||||
return;
|
||||
|
||||
if (iBone < 0 || iBone >= pstudiohdr->numbones)
|
||||
return; // invalid bone
|
||||
#endif
|
||||
|
||||
g_pSvBlendingAPI->SV_StudioSetupBones(
|
||||
g_psv.models[pEdict->v.modelindex],
|
||||
pEdict->v.frame,
|
||||
@ -906,14 +915,23 @@ void EXT_FUNC GetAttachment(const edict_t *pEdict, int iAttachment, float *rgflO
|
||||
mstudioattachment_t *pattachment;
|
||||
vec3_t angles;
|
||||
|
||||
pstudiohdr = (studiohdr_t *)Mod_Extradata(g_psv.models[pEdict->v.modelindex]);
|
||||
|
||||
#ifdef REHLDS_FIXES
|
||||
if (!pstudiohdr)
|
||||
return;
|
||||
|
||||
if (iAttachment < 0 || iAttachment >= pstudiohdr->numattachments)
|
||||
return; // invalid attachment
|
||||
#endif
|
||||
|
||||
pattachment = (mstudioattachment_t *)((char *)pstudiohdr + pstudiohdr->attachmentindex);
|
||||
pattachment += iAttachment;
|
||||
|
||||
angles[0] = -pEdict->v.angles[0];
|
||||
angles[1] = pEdict->v.angles[1];
|
||||
angles[2] = pEdict->v.angles[2];
|
||||
|
||||
pstudiohdr = (studiohdr_t *)Mod_Extradata(g_psv.models[pEdict->v.modelindex]);
|
||||
pattachment = (mstudioattachment_t *)((char *)pstudiohdr + pstudiohdr->attachmentindex);
|
||||
pattachment += iAttachment;
|
||||
|
||||
g_pSvBlendingAPI->SV_StudioSetupBones(
|
||||
g_psv.models[pEdict->v.modelindex],
|
||||
pEdict->v.frame,
|
||||
|
@ -680,22 +680,22 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
|
||||
|
||||
if (volume < 0 || volume > 255)
|
||||
{
|
||||
Con_Printf("%s: volume = %i", __func__, volume);
|
||||
Con_Printf("%s: volume = %i\n", __func__, volume);
|
||||
volume = (volume < 0) ? 0 : 255;
|
||||
}
|
||||
if (attenuation < 0.0f || attenuation > 4.0f)
|
||||
{
|
||||
Con_Printf("%s: attenuation = %f", __func__, attenuation);
|
||||
Con_Printf("%s: attenuation = %f\n", __func__, attenuation);
|
||||
attenuation = (attenuation < 0.0f) ? 0.0f : 4.0f;
|
||||
}
|
||||
if (channel < 0 || channel > 7)
|
||||
{
|
||||
Con_Printf("%s: channel = %i", __func__, channel);
|
||||
Con_Printf("%s: channel = %i\n", __func__, channel);
|
||||
channel = (channel < 0) ? CHAN_AUTO : CHAN_NETWORKVOICE_BASE;
|
||||
}
|
||||
if (pitch < 0 || pitch > 255)
|
||||
{
|
||||
Con_Printf("%s: pitch = %i", __func__, pitch);
|
||||
Con_Printf("%s: pitch = %i\n", __func__, pitch);
|
||||
pitch = (pitch < 0) ? 0 : 255;
|
||||
}
|
||||
|
||||
@ -707,7 +707,7 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
|
||||
sound_num = Q_atoi(sample + 1);
|
||||
if (sound_num >= CVOXFILESENTENCEMAX)
|
||||
{
|
||||
Con_Printf("%s: invalid sentence number: %s", __func__, sample + 1);
|
||||
Con_Printf("%s: invalid sentence number: %s\n", __func__, sample + 1);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -1112,8 +1112,18 @@ void SV_SendServerinfo_internal(sizebuf_t *msg, client_t *client)
|
||||
else
|
||||
MSG_WriteByte(msg, 0);
|
||||
|
||||
COM_FileBase(com_gamedir, message);
|
||||
MSG_WriteString(msg, message);
|
||||
const char *pszGameDir = message;
|
||||
|
||||
#ifdef REHLDS_FIXES
|
||||
// Give the client a chance to connect in to the server with different game
|
||||
const char *gd = Info_ValueForKey(client->userinfo, "_gd");
|
||||
if (gd[0])
|
||||
pszGameDir = gd;
|
||||
else
|
||||
#endif
|
||||
COM_FileBase(com_gamedir, message);
|
||||
|
||||
MSG_WriteString(msg, pszGameDir);
|
||||
MSG_WriteString(msg, Cvar_VariableString("hostname"));
|
||||
MSG_WriteString(msg, g_psv.modelname);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user