Skip to content

Commit

Permalink
okay actually fr unbreak sm 1.12 workflow builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rtldg committed Nov 16, 2024
1 parent 54c04a0 commit 2dd385a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion addons/sourcemod/scripting/include/convar_class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ methodmap Convar < ConVar
savedValue.SetMin(hasMin, min);
savedValue.SetMax(hasMax, max);

convar = savedValue;
// Have to do it this way instead of `convar = savedValue;` because SM 1.12 is a whiny bitch.
convar.name = savedValue.name;
convar.cvar = savedValue.cvar;
convar.description = savedValue.description;
convar.defValue = convar.defValue;

_ConvarList.PushArray(savedValue);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public SMCResult OnStyleKeyValue(SMCParser smc, const char[] key, const char[] v
return SMCParse_Continue;
}

public int SortAscending_StyleOrder(int index1, int index2, const int[] array, any hndl)
public int SortAscending_StyleOrder(int index1, int index2, const int[] array, Handle hndl)
{
return GetStyleSettingInt(index1, "ordering") - GetStyleSettingInt(index2, "ordering");
}
Expand Down
6 changes: 3 additions & 3 deletions addons/sourcemod/scripting/shavit-chat.sp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void ReplaceFormats(char[] formatting, int maxlen, char[] name, char[] colon, ch
ReplaceString(formatting, maxlen, "{msg}", text);
}

public Action Hook_SayText2(UserMsg msg_id, any msg, const int[] players, int playersNum, bool reliable, bool init)
public Action Hook_SayText2(UserMsg msg_id, Handle msg, const int[] players, int playersNum, bool reliable, bool init)
{
if (!gCV_Enabled.BoolValue)
{
Expand All @@ -420,15 +420,15 @@ public Action Hook_SayText2(UserMsg msg_id, any msg, const int[] players, int pl

if(gB_Protobuf)
{
Protobuf pbmsg = UserMessageToProtobuf(msg);
Protobuf pbmsg = view_as<Protobuf>(msg);
client = pbmsg.ReadInt("ent_idx");
pbmsg.ReadString("msg_name", sMessage, 32);
pbmsg.ReadString("params", sOriginalName, MAXLENGTH_NAME, 0);
pbmsg.ReadString("params", sOriginalText, MAXLENGTH_TEXT, 1);
}
else
{
BfRead bfmsg = UserMessageToBfRead(msg);
BfRead bfmsg = view_as<BfRead>(msg);
client = bfmsg.ReadByte();
bfmsg.ReadByte(); // chat parameter
bfmsg.ReadString(sMessage, 32);
Expand Down
6 changes: 3 additions & 3 deletions addons/sourcemod/scripting/shavit-replay-playback.sp
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,7 @@ public Action BotEventsStopLogSpam(Event event, const char[] name, bool dontBroa
return Plugin_Continue;
}

public Action Hook_SayText2(UserMsg msg_id, any msg, const int[] players, int playersNum, bool reliable, bool init)
public Action Hook_SayText2(UserMsg msg_id, Handle msg, const int[] players, int playersNum, bool reliable, bool init)
{
if(!gB_HideNameChange || !gCV_Enabled.BoolValue)
{
Expand All @@ -2826,12 +2826,12 @@ public Action Hook_SayText2(UserMsg msg_id, any msg, const int[] players, int pl

if(um == UM_Protobuf)
{
Protobuf pbmsg = msg;
Protobuf pbmsg = view_as<Protobuf>(msg);
pbmsg.ReadString("msg_name", sMessage, 24);
}
else
{
BfRead bfmsg = msg;
BfRead bfmsg = view_as<BfRead>(msg);
bfmsg.ReadByte();
bfmsg.ReadByte();
bfmsg.ReadString(sMessage, 24);
Expand Down

0 comments on commit 2dd385a

Please sign in to comment.