Skip to content

Commit

Permalink
Fixed Juggernout restore model crash
Browse files Browse the repository at this point in the history
  • Loading branch information
azalty committed Jul 14, 2023
1 parent d221da7 commit aff3193
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Binary file modified addons/sourcemod/plugins/sm_hosties_e.smx
Binary file not shown.
10 changes: 5 additions & 5 deletions addons/sourcemod/scripting/hosties/lastrequest.sp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ char LR_C_sWeapon[MAXPLAYERS + 1][11][64];
int LR_C_WeaponCount[MAXPLAYERS + 1] = {0, ...};
int LR_C_FlashCounter[MAXPLAYERS + 1] = {0, ...};

char BeforeModel[MAXPLAYERS+1][PLATFORM_MAX_PATH],
char BeforeModel[MAXPLAYERS+1][PLATFORM_MAX_PATH+1],
g_sLastRequestPhrase[BASE_LR_Number][MAX_DISPLAYNAME_SIZE];

ConVar g_hRoundTime,
Expand Down Expand Up @@ -1352,7 +1352,7 @@ void CleanupLastRequest(int loser, int arrayIndex)
if (strlen(BeforeModel[LR_Player_Prisoner]) > 0)
{
SetEntityModel(LR_Player_Prisoner, BeforeModel[LR_Player_Prisoner]);
FormatEx(BeforeModel[LR_Player_Prisoner], sizeof(BeforeModel), "");
FormatEx(BeforeModel[LR_Player_Prisoner], sizeof(BeforeModel[]), "");
}
}
}
Expand All @@ -1367,7 +1367,7 @@ void CleanupLastRequest(int loser, int arrayIndex)
if (strlen(BeforeModel[LR_Player_Guard]) > 0)
{
SetEntityModel(LR_Player_Guard, BeforeModel[LR_Player_Guard]);
FormatEx(BeforeModel[LR_Player_Guard], sizeof(BeforeModel), "");
FormatEx(BeforeModel[LR_Player_Guard], sizeof(BeforeModel[]), "");
}
}
}
Expand Down Expand Up @@ -4015,8 +4015,8 @@ void InitializeGame(int iPartnersIndex)
{
if (GetEngineVersion() == Engine_CSGO)
{
GetEntPropString(LR_Player_Prisoner, Prop_Data, "m_ModelName", BeforeModel[LR_Player_Prisoner], sizeof(BeforeModel));
GetEntPropString(LR_Player_Guard, Prop_Data, "m_ModelName", BeforeModel[LR_Player_Guard], sizeof(BeforeModel));
GetEntPropString(LR_Player_Prisoner, Prop_Data, "m_ModelName", BeforeModel[LR_Player_Prisoner], sizeof(BeforeModel[]));
GetEntPropString(LR_Player_Guard, Prop_Data, "m_ModelName", BeforeModel[LR_Player_Guard], sizeof(BeforeModel[]));

if (g_cvSvSuit == INVALID_HANDLE)
g_cvSvSuit = FindConVar("mp_weapons_allow_heavyassaultsuit");
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/sm_hosties_e.sp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

#pragma semicolon 1

#define PLUGIN_VERSION "5.0.4"
#define PLUGIN_VERSION "5.0.5"
#define PLUGIN_NAME "Hosties+"
#define MAX_DISPLAYNAME_SIZE 64
#define MAX_DATAENTRY_SIZE 5
Expand Down

0 comments on commit aff3193

Please sign in to comment.