Skip to content

Commit

Permalink
move TimerAction enum to shavit-checkpoints.sp
Browse files Browse the repository at this point in the history
  • Loading branch information
rtldg committed Apr 11, 2022
1 parent 6d208a8 commit 9d771df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
7 changes: 0 additions & 7 deletions addons/sourcemod/scripting/include/shavit/checkpoints.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@
#endif
#define _shavit_checkpoints_included

enum TimerAction
{
TimerAction_None,
TimerAction_OnStart,
TimerAction_OnTeleport
}

enum struct cp_cache_t
{
float fPosition[3];
Expand Down
12 changes: 9 additions & 3 deletions addons/sourcemod/scripting/shavit-checkpoints.sp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@

#define CP_DEFAULT (CP_ANGLES|CP_VELOCITY)

enum TimerAction
{
TimerAction_OnStart,
TimerAction_OnTeleport
}

enum struct persistent_data_t
{
int iSteamID;
Expand Down Expand Up @@ -404,7 +410,7 @@ public Action Timer_PersistCPMenu(Handle timer)
}

for(int i = 1; i <= MaxClients; i++)
{
{
if(IsClientInGame(i) && IsPlayerAlive(i) && !IsFakeClient(i) && ShouldReopenCheckpointMenu(i))
{
OpenCPMenu(i);
Expand Down Expand Up @@ -1052,7 +1058,7 @@ void OpenCPMenu(int client)
}
}



menu.Pagination = MENU_NO_PAGINATION;
menu.ExitButton = true;
Expand Down Expand Up @@ -1602,7 +1608,7 @@ void TeleportToCheckpoint(int client, int index, bool suppressMessage)
{
UpdateKZStyle(client, TimerAction_OnTeleport);
}

if(!suppressMessage)
{
Shavit_PrintToChat(client, "%T", "MiscCheckpointsTeleported", client, index, gS_ChatStrings.sVariable, gS_ChatStrings.sText);
Expand Down

0 comments on commit 9d771df

Please sign in to comment.