2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-16 00:28:20 +03:00

Merge branch 'dreamstalker:master' into master

This commit is contained in:
cris840 2023-07-10 09:36:24 -05:00 committed by GitHub
commit c3933a81b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 5 deletions

View File

@ -277,7 +277,7 @@ jobs:
github.event.action == 'published' && github.event.action == 'published' &&
startsWith(github.ref, 'refs/tags/') startsWith(github.ref, 'refs/tags/')
run: | 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/ 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -aoa rehlds-dbg-${{ env.APP_VERSION }}.7z debug/
- name: Publish artifacts - name: Publish artifacts

View File

@ -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) 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]); 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_pSvBlendingAPI->SV_StudioSetupBones(
g_psv.models[pEdict->v.modelindex], g_psv.models[pEdict->v.modelindex],
pEdict->v.frame, pEdict->v.frame,
@ -906,14 +915,23 @@ void EXT_FUNC GetAttachment(const edict_t *pEdict, int iAttachment, float *rgflO
mstudioattachment_t *pattachment; mstudioattachment_t *pattachment;
vec3_t angles; 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[0] = -pEdict->v.angles[0];
angles[1] = pEdict->v.angles[1]; angles[1] = pEdict->v.angles[1];
angles[2] = pEdict->v.angles[2]; 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_pSvBlendingAPI->SV_StudioSetupBones(
g_psv.models[pEdict->v.modelindex], g_psv.models[pEdict->v.modelindex],
pEdict->v.frame, pEdict->v.frame,