Skip to content

Commit

Permalink
Fix viewmodel related to Gunslinger
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo committed Aug 15, 2023
1 parent 281ae0b commit 781e2cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/superzombiefortress.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "include/superzombiefortress.inc"

#define PLUGIN_VERSION "4.6.1"
#define PLUGIN_VERSION "4.6.2"
#define PLUGIN_VERSION_REVISION "manual"

#define MAX_CONTROL_POINTS 8
Expand Down
3 changes: 1 addition & 2 deletions addons/sourcemod/scripting/szf/sdkhook.sp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ void SDKHook_UnhookClient(int iClient)

public Action Client_Spawn(int iClient)
{
Classes_SetClient(iClient);

// Reset arms so generated weapons don't get the wrong viewmodel
ViewModel_ResetArms(iClient);
Classes_SetClient(iClient);
return Plugin_Continue;
}

Expand Down
3 changes: 3 additions & 0 deletions addons/sourcemod/scripting/szf/viewmodel.sp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ void ViewModel_RemoveWearable(int iClient)

void ViewModel_ResetArms(int iClient)
{
if (!g_ClientClasses[iClient].bViewModelAnim)
return; // No need to set if we didn't override it to begin with

TFClassType nClass = TF2_GetPlayerClass(iClient);
if (!g_sViewModelsArms[nClass][0])
return;
Expand Down

0 comments on commit 781e2cd

Please sign in to comment.