mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
add kzcheckpoints_ladders style setting
This commit is contained in:
parent
361826908e
commit
48d8e01769
@ -50,6 +50,7 @@
|
||||
"block_pright" "0" // Block +right. 2 to stop timer.
|
||||
"block_pstrafe" "0" // Prevent button inconsistencies (including +pstrafe). May have false positives when players lag. Will prevent some strafe hacks too. Set this to 2 to also stop the timer.
|
||||
"kzcheckpoints" "0" // KZ styled checkpoints. They reset upon timer start and you don't get reverted to a save state, and you cannot save when airborne or someone else's checkpoints.
|
||||
"kzcheckpoints_ladders" "0" // KZ styled checkpoints allowed to checkpoint onto ladders (like GOKZ)
|
||||
|
||||
// Feature excluding
|
||||
"unranked" "0" // Unranked style. No ranking points and no records.
|
||||
|
||||
@ -190,6 +190,7 @@ public SMCResult OnStyleEnterSection(SMCParser smc, const char[] name, bool opt_
|
||||
SetStyleSettingInt(gI_CurrentParserIndex, "inaccessible", 0);
|
||||
SetStyleSettingInt(gI_CurrentParserIndex, "enabled", 1);
|
||||
SetStyleSettingInt(gI_CurrentParserIndex, "kzcheckpoints", 0);
|
||||
SetStyleSettingInt(gI_CurrentParserIndex, "kzcheckpoints_ladders", 0);
|
||||
SetStyleSettingInt(gI_CurrentParserIndex, "force_groundkeys", 0);
|
||||
|
||||
gI_OrderedStyles[gI_CurrentParserIndex] = gI_CurrentParserIndex;
|
||||
|
||||
@ -1178,17 +1178,21 @@ bool SaveCheckpoint(int client)
|
||||
|
||||
if(Shavit_GetStyleSettingInt(gI_Style[client], "kzcheckpoints"))
|
||||
{
|
||||
if((GetEntityFlags(client) & FL_ONGROUND) == 0 || client != target)
|
||||
if (client != target)
|
||||
{
|
||||
Shavit_PrintToChat(client, "%T", "CommandSaveCPKZInvalid", client);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(GetEntityFlags(target) & FL_ONGROUND) && (!Shavit_GetStyleSettingBool(gI_Style[client], "kzcheckpoints_ladders") || GetEntityMoveType(client) != MOVETYPE_LADDER))
|
||||
{
|
||||
Shavit_PrintToChat(client, "%T", "CommandSaveCPKZInvalid", client);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(Shavit_InsideZone(client, Zone_Start, -1))
|
||||
{
|
||||
Shavit_PrintToChat(client, "%T", "CommandSaveCPKZZone", client);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user