diff --git a/addons/sourcemod/configs/shavit-styles.cfg b/addons/sourcemod/configs/shavit-styles.cfg index 83f3267d..ae3bfc94 100644 --- a/addons/sourcemod/configs/shavit-styles.cfg +++ b/addons/sourcemod/configs/shavit-styles.cfg @@ -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. diff --git a/addons/sourcemod/scripting/include/shavit/style-settings.sp b/addons/sourcemod/scripting/include/shavit/style-settings.sp index 5157b1d3..2b60740d 100644 --- a/addons/sourcemod/scripting/include/shavit/style-settings.sp +++ b/addons/sourcemod/scripting/include/shavit/style-settings.sp @@ -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; diff --git a/addons/sourcemod/scripting/shavit-checkpoints.sp b/addons/sourcemod/scripting/shavit-checkpoints.sp index 6461dfa0..f522e567 100644 --- a/addons/sourcemod/scripting/shavit-checkpoints.sp +++ b/addons/sourcemod/scripting/shavit-checkpoints.sp @@ -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; } }