mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
add Loading to zone hud
This commit is contained in:
parent
03d44c9d23
commit
f344fddcdf
@ -1290,6 +1290,15 @@ native void Shavit_SetClientTimescale(int client, float scale);
|
||||
*/
|
||||
native float Shavit_GetClientTimescale(int client);
|
||||
|
||||
/**
|
||||
* asdf
|
||||
*
|
||||
* @param client Client index
|
||||
*
|
||||
* @return asdf
|
||||
*/
|
||||
native bool Shavit_Core_CookiesRetrieved(int client);
|
||||
|
||||
public SharedPlugin __pl_shavit_core =
|
||||
{
|
||||
name = "shavit",
|
||||
@ -1353,6 +1362,7 @@ public void __pl_shavit_core_SetNTVOptional()
|
||||
MarkNativeAsOptional("Shavit_SetStyleSettingFloat");
|
||||
MarkNativeAsOptional("Shavit_SetStyleSettingBool");
|
||||
MarkNativeAsOptional("Shavit_SetStyleSettingInt");
|
||||
MarkNativeAsOptional("Shavit_Core_CookiesRetrieved");
|
||||
|
||||
__pl_shavit_bhopstats_SetNTVOptional();
|
||||
}
|
||||
|
||||
@ -208,6 +208,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
||||
CreateNative("Shavit_GetMaxVelocity", Native_GetMaxVelocity);
|
||||
CreateNative("Shavit_SetAvgVelocity", Native_SetAvgVelocity);
|
||||
CreateNative("Shavit_SetMaxVelocity", Native_SetMaxVelocity);
|
||||
CreateNative("Shavit_Core_CookiesRetrieved", Native_Core_CookiesRetrieved);
|
||||
|
||||
// registers library, check "bool LibraryExists(const char[] name)" in order to use with other plugins
|
||||
RegPluginLibrary("shavit");
|
||||
@ -2028,6 +2029,11 @@ public any Native_SetMaxVelocity(Handle plugin, int numParams)
|
||||
gA_Timers[GetNativeCell(1)].fMaxVelocity = GetNativeCell(2);
|
||||
}
|
||||
|
||||
public any Native_Core_CookiesRetrieved(Handle plugin, int numParams)
|
||||
{
|
||||
return gB_CookiesRetrieved[GetNativeCell(1)];
|
||||
}
|
||||
|
||||
public Action Shavit_OnStartPre(int client, int track)
|
||||
{
|
||||
if (GetTimerStatus(client) == Timer_Paused && gCV_PauseMovement.BoolValue)
|
||||
|
||||
@ -1165,6 +1165,13 @@ int AddHUDToBuffer_Source2013(int client, huddata_t data, char[] buffer, int max
|
||||
int iLines = 0;
|
||||
char sLine[128];
|
||||
|
||||
if (client == data.iTarget && !Shavit_Core_CookiesRetrieved(client))
|
||||
{
|
||||
FormatEx(sLine, sizeof(sLine), "%T", "TimerLoading", client);
|
||||
AddHUDLine(buffer, maxlen, sLine, iLines);
|
||||
iLines++;
|
||||
}
|
||||
|
||||
if (gCV_DebugTargetname.BoolValue && IsValidClient(data.iTarget))
|
||||
{
|
||||
char targetname[64], classname[64];
|
||||
|
||||
@ -47,4 +47,9 @@
|
||||
"#format" "{1:s}"
|
||||
"en" "{1} seconds remaining."
|
||||
}
|
||||
// ----------- Random ----------- //
|
||||
"TimerLoading"
|
||||
{
|
||||
"en" "Loading.."
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user