diff --git a/src/zr/roundstart.inc b/src/zr/roundstart.inc index ec0a629..2b49d40 100644 --- a/src/zr/roundstart.inc +++ b/src/zr/roundstart.inc @@ -1,58 +1,58 @@ -/* - * ============================================================================ - * - * Zombie:Reloaded - * - * File: roundstart.inc - * Type: Core - * Description: Handles round start actions. - * - * ============================================================================ - */ - -/** - * List of objective entities. - */ -#define ROUNDSTART_OBJECTIVE_ENTITIES "func_bomb_target|func_hostage_rescue|c4|hostage_entity" - -/** - * The round is starting. - */ -RoundStartOnRoundStart() -{ - // Kill all objective entities. - RoundStartKillObjectives(); -} - -/** - * Kills all objective entities. - */ -RoundStartKillObjectives() -{ - decl String:classname[64]; - - // Get max entity count. - new maxentities = GetMaxEntities(); - - // x = entity index. - for (new x = 0; x <= maxentities; x++) - { - // If entity isn't valid, then stop. - if(!IsValidEdict(x)) - { - continue; - } - - // Get valid edict's classname. - GetEdictClassname(x, classname, sizeof(classname)); - - // Check if it matches any objective entities, then stop if it doesn't. - if(StrContains(ROUNDSTART_OBJECTIVE_ENTITIES, classname) == -1) - { - continue; - } - - // Entity is an objective, kill it. - RemoveEdict(x); - } -} \ No newline at end of file +/* + * ============================================================================ + * + * Zombie:Reloaded + * + * File: roundstart.inc + * Type: Core + * Description: Handles round start actions. + * + * ============================================================================ + */ + +/** + * List of objective entities. + */ +#define ROUNDSTART_OBJECTIVE_ENTITIES "func_bomb_target|func_hostage_rescue|c4|hostage_entity" + +/** + * The round is starting. + */ +RoundStartOnRoundStart() +{ + // Kill all objective entities. + RoundStartKillObjectives(); +} + +/** + * Kills all objective entities. + */ +RoundStartKillObjectives() +{ + decl String:classname[64]; + + // Get max entity count. + new maxentities = GetMaxEntities(); + + // x = entity index. + for (new x = 0; x <= maxentities; x++) + { + // If entity isn't valid, then stop. + if(!IsValidEdict(x)) + { + continue; + } + + // Get valid edict's classname. + GetEdictClassname(x, classname, sizeof(classname)); + + // Check if it matches any objective entities, then stop if it doesn't. + if(StrContains(ROUNDSTART_OBJECTIVE_ENTITIES, classname) == -1) + { + continue; + } + + // Entity is an objective, kill it. + RemoveEdict(x); + } +}