mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Implement set current checkpoint
This commit is contained in:
parent
1387b5451a
commit
88ca8c8159
@ -1704,9 +1704,19 @@ native int Shavit_SaveCheckpoint(int client);
|
||||
*
|
||||
* @param client Client index
|
||||
*
|
||||
* @return The new current checkpoint
|
||||
* @return The current checkpoint
|
||||
*/
|
||||
native int GetCurrentCheckpoint(int client);
|
||||
native int Shavit_GetCurrentCheckpoint(int client);
|
||||
|
||||
/**
|
||||
* Sets the current checkpoint index.
|
||||
*
|
||||
* @param client Client index
|
||||
* @param index New index to use
|
||||
*
|
||||
* @noreturn
|
||||
*/
|
||||
native void Shavit_SetCurrentCheckpoint(int client, int index);
|
||||
|
||||
// same as Shavit_PrintToChat() but loops through the whole server
|
||||
// code stolen from the base halflife.inc file
|
||||
@ -1834,5 +1844,6 @@ public void __pl_shavit_SetNTVOptional()
|
||||
MarkNativeAsOptional("Shavit_SetClientTimescale");
|
||||
MarkNativeAsOptional("Shavit_SaveCheckpoint");
|
||||
MarkNativeAsOptional("Shavit_GetCurrentCheckpoint");
|
||||
MarkNativeAsOptional("Shavit_SetCurrentCheckpoint");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -192,6 +192,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
||||
CreateNative("Shavit_OpenCheckpointMenu", Native_OpenCheckpointMenu);
|
||||
CreateNative("Shavit_SaveCheckpoint", Native_SaveCheckpoint);
|
||||
CreateNative("Shavit_GetCurrentCheckpoint", Native_GetCurrentCheckpoint);
|
||||
CreateNative("Shavit_SetCurrentCheckpoint", Native_SetCurrentCheckpoint);
|
||||
|
||||
gB_Late = late;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user