Skip to content

Commit 2dd385a

Browse files
committed
okay actually fr unbreak sm 1.12 workflow builds
1 parent 54c04a0 commit 2dd385a

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

addons/sourcemod/scripting/include/convar_class.inc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ methodmap Convar < ConVar
7979
savedValue.SetMin(hasMin, min);
8080
savedValue.SetMax(hasMax, max);
8181

82-
convar = savedValue;
82+
// Have to do it this way instead of `convar = savedValue;` because SM 1.12 is a whiny bitch.
83+
convar.name = savedValue.name;
84+
convar.cvar = savedValue.cvar;
85+
convar.description = savedValue.description;
86+
convar.defValue = convar.defValue;
8387

8488
_ConvarList.PushArray(savedValue);
8589

addons/sourcemod/scripting/include/shavit/style-settings.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public SMCResult OnStyleKeyValue(SMCParser smc, const char[] key, const char[] v
437437
return SMCParse_Continue;
438438
}
439439

440-
public int SortAscending_StyleOrder(int index1, int index2, const int[] array, any hndl)
440+
public int SortAscending_StyleOrder(int index1, int index2, const int[] array, Handle hndl)
441441
{
442442
return GetStyleSettingInt(index1, "ordering") - GetStyleSettingInt(index2, "ordering");
443443
}

addons/sourcemod/scripting/shavit-chat.sp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ void ReplaceFormats(char[] formatting, int maxlen, char[] name, char[] colon, ch
406406
ReplaceString(formatting, maxlen, "{msg}", text);
407407
}
408408

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

421421
if(gB_Protobuf)
422422
{
423-
Protobuf pbmsg = UserMessageToProtobuf(msg);
423+
Protobuf pbmsg = view_as<Protobuf>(msg);
424424
client = pbmsg.ReadInt("ent_idx");
425425
pbmsg.ReadString("msg_name", sMessage, 32);
426426
pbmsg.ReadString("params", sOriginalName, MAXLENGTH_NAME, 0);
427427
pbmsg.ReadString("params", sOriginalText, MAXLENGTH_TEXT, 1);
428428
}
429429
else
430430
{
431-
BfRead bfmsg = UserMessageToBfRead(msg);
431+
BfRead bfmsg = view_as<BfRead>(msg);
432432
client = bfmsg.ReadByte();
433433
bfmsg.ReadByte(); // chat parameter
434434
bfmsg.ReadString(sMessage, 32);

addons/sourcemod/scripting/shavit-replay-playback.sp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,7 +2807,7 @@ public Action BotEventsStopLogSpam(Event event, const char[] name, bool dontBroa
28072807
return Plugin_Continue;
28082808
}
28092809

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

28272827
if(um == UM_Protobuf)
28282828
{
2829-
Protobuf pbmsg = msg;
2829+
Protobuf pbmsg = view_as<Protobuf>(msg);
28302830
pbmsg.ReadString("msg_name", sMessage, 24);
28312831
}
28322832
else
28332833
{
2834-
BfRead bfmsg = msg;
2834+
BfRead bfmsg = view_as<BfRead>(msg);
28352835
bfmsg.ReadByte();
28362836
bfmsg.ReadByte();
28372837
bfmsg.ReadString(sMessage, 24);

0 commit comments

Comments
 (0)