Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
unzip sm-ripext-1.3.1-mac.zip "addons/sourcemod/scripting/include/*"
wget https://github.com/clugg/sm-json/archive/refs/tags/v5.0.1.tar.gz
tar --strip-components=1 -xvzf v5.0.1.tar.gz sm-json-5.0.1/addons/sourcemod/scripting/include
wget https://github.com/hermansimensen/eventqueue-fix/archive/refs/heads/main.tar.gz
tar --strip-components=1 -xvzf main.tar.gz -C addons/sourcemod
wget https://github.com/hermansimensen/eventqueue-fix/archive/refs/tags/1.4.0.tar.gz
tar --strip-components=1 -xvzf 1.4.0.tar.gz -C addons/sourcemod
rm -rf *.zip *.tar.gz addons/sourcemod/.git* addons/sourcemod/LICENSE
wget https://github.com/srcwr/eventqueuefixfix/releases/download/v1.0.1/eventqueuefixfix-v1.0.1-def5b0e-windows-x32.zip
unzip eventqueuefixfix-v1.0.1-def5b0e-windows-x32.zip "addons/sourcemod/extensions/*"
Expand Down
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/include/eventqueuefix.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ enum struct eventpack_t
{
ArrayList playerEvents;
ArrayList outputWaits;
ArrayList OnUser1_4[4];
}

enum struct entity_t
Expand All @@ -45,7 +46,7 @@ enum struct entity_t
*
* @return True if successful, false otherwise.
*/
native bool GetClientEvents(int client, any[] eventpack);
native bool GetClientEvents(int client, any[] eventpack, int packsize=sizeof(eventpack_t));

/*
* Sets the current pending events for a client.
Expand All @@ -55,7 +56,7 @@ native bool GetClientEvents(int client, any[] eventpack);
*
* @return True if successful, false otherwise.
*/
native bool SetClientEvents(int client, any[] eventpack);
native bool SetClientEvents(int client, any[] eventpack, int packsize=sizeof(eventpack_t));

/*
* Clears the current pending events for a client.
Expand Down
1 change: 1 addition & 0 deletions addons/sourcemod/scripting/include/shavit/checkpoints.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ enum struct cp_cache_t
int iSteamID;
ArrayList aEvents;
ArrayList aOutputWaits;
ArrayList aOnUser1_4[4];
float vecLadderNormal[3];
// This handle will be deleted when the checkpoint is deleted, or something like that...
// If you want to keep this (which you probably should) then you'd have
Expand Down
7 changes: 7 additions & 0 deletions addons/sourcemod/scripting/shavit-checkpoints.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1717,11 +1717,17 @@ void SaveCheckpointCache(int saver, int target, cp_cache_t cpcache, int index, H
delete ep.playerEvents;
cpcache.aOutputWaits = view_as<ArrayList>(CloneHandle(ep.outputWaits, plugin));
delete ep.outputWaits;
for (int N = 0; N < 4; N++)
{
cpcache.aOnUser1_4[N] = view_as<ArrayList>(CloneHandle(ep.OnUser1_4[N], plugin));
delete ep.OnUser1_4[N];
}
}
else
{
cpcache.aEvents = ep.playerEvents;
cpcache.aOutputWaits = ep.outputWaits;
cpcache.aOnUser1_4 = ep.OnUser1_4;
}
}
}
Expand Down Expand Up @@ -1942,6 +1948,7 @@ bool LoadCheckpointCache(int client, cp_cache_t cpcache, int index, bool force =
eventpack_t ep;
ep.playerEvents = cpcache.aEvents;
ep.outputWaits = cpcache.aOutputWaits;
ep.OnUser1_4 = cpcache.aOnUser1_4;
SetClientEvents(client, ep);

#if DEBUG
Expand Down
Loading