AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Thermal Thruster Crash Fix (https://forums.alliedmods.net/showthread.php?t=309529)

Benoist3012 07-29-2018 11:54

[TF2] Thermal Thruster Crash Fix
 
1 Attachment(s)
Quote:

Originally Posted by Benoist3012 (Post 2609110)
Fixes CStudioHdr::GetSharedPoseParameter to avoid out of bound array crash.
Before:
Code:
int CStudioHdr::GetSharedPoseParameter( int iSequence, int iLocalPose ) const {     if (m_pVModel == NULL)     {         return iLocalPose;     }     if (iLocalPose == -1)         return iLocalPose;     Assert( m_pVModel );     int group = m_pVModel->m_seq[iSequence].group;     virtualgroup_t *pGroup = m_pVModel->m_group.IsValidIndex( group ) ? &m_pVModel->m_group[ group ] : NULL;     return pGroup ? pGroup->masterPose[iLocalPose] : iLocalPose; }

After:
Code:
int CStudioHdr::GetSharedPoseParameter(int iSequence, int iLocalPose) {     if (m_pVModel == NULL)     {         return iLocalPose;     }     if (iLocalPose == -1)         return iLocalPose;         if (!m_pVModel->m_seq.IsValidIndex(iSequence))         return iLocalPose;         int group = m_pVModel->m_seq[iSequence].group;     virtualgroup_t *pGroup = m_pVModel->m_group.IsValidIndex( group ) ? &m_pVModel->m_group[ group ] : NULL;     return (pGroup && pGroup->masterPose.IsValidIndex( iLocalPose )) ? pGroup->masterPose[iLocalPose] : iLocalPose; }

Remember this is a fix for unproperly setup models and shouldn't be used as a permanent fix. If you are able to contact the model maker then do so.

Downloads:
Linux
Windows
GameData

Don't forget to create poseparameter_fix.autoload 0 byte file inside your extensions folder, otherwise the extension will not load and you will still crash! Or download the zip attached to this post

Source:
Github


Mitchell 07-29-2018 11:59

Re: [TF2] Thermal Thruster Crash Fix
 
Quote:

Originally Posted by Silvers (Post 2606848)
Uploading .SMX isn't allowed unless it doesn't compile on the forum. You need to provide the source.

Its in the post??

Benoist3012 07-29-2018 12:08

Re: [TF2] Thermal Thruster Crash Fix
 
Quote:

Originally Posted by Silvers (Post 2606848)
Uploading .SMX isn't allowed unless it doesn't compile on the forum.

Yeah and I say in my post this requires as external dependencies dhooks.

Quote:

Originally Posted by Silvers (Post 2606848)
You need to provide the source.

I think you overlooked the github link.

Scag 07-29-2018 12:38

Re: [TF2] Thermal Thruster Crash Fix
 
Wonderful. Thanks for the fix!

JugadorXEI 07-29-2018 18:30

Re: [TF2] Thermal Thruster Crash Fix
 
Really nice work, Ben!

dedimark 08-01-2018 13:32

Re: [TF2] Thermal Thruster Crash Fix
 
Hi,

https://crash.limetech.org/gjqwhygqbtxw

still crashing with https://github.com/50DKP/TF2x10/blob...domizer_x10.sp
(server with bots)

Benoist3012 08-01-2018 15:00

Re: [TF2] Thermal Thruster Crash Fix
 
Quote:

Originally Posted by dedimark (Post 2607518)

Yeah I got reports that this crash also seems to happen with other sort of weapons, like "The Bread Bite" for heavy. I'll try to get build with a more general fix than just a test case for thermal thruster.

dedimark 08-01-2018 17:10

Re: [TF2] Thermal Thruster Crash Fix
 
Quote:

Originally Posted by Benoist3012 (Post 2607528)
Yeah I got reports that this crash also seems to happen with other sort of weapons, like "The Bread Bite" for heavy. I'll try to get build with a more general fix than just a test case for thermal thruster.

Thank you.

Benoist3012 08-01-2018 17:23

Re: [TF2] Thermal Thruster Crash Fix
 
Update
- Alright so this new version just block the function from executing and returns 0. Much easier fix :3

Edit: For those thinking this is a "lazy" fix, I've tried something deeper https://github.com/Benoist3012/JetPa...fix.sp#L51#L73
But the total sequencse on the VM model are always equal to 2 or 3 and the request sequence to play always above these two numbers so we end up with this deeper fix to always return 0 anyways which does no affect the server. VM animations are client controlled anyways.

epicwindow 08-03-2018 17:15

Re: [TF2] Thermal Thruster Crash Fix
 
wow thanks a lot man,so does it works on bread bite now as well?


All times are GMT -4. The time now is 15:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.