Fixed newlines in round start module.
This commit is contained in:
parent
6e464880f4
commit
eeba5b8e7b
@ -1,58 +1,58 @@
|
|||||||
/*
|
/*
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
*
|
*
|
||||||
* Zombie:Reloaded
|
* Zombie:Reloaded
|
||||||
*
|
*
|
||||||
* File: roundstart.inc
|
* File: roundstart.inc
|
||||||
* Type: Core
|
* Type: Core
|
||||||
* Description: Handles round start actions.
|
* Description: Handles round start actions.
|
||||||
*
|
*
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of objective entities.
|
* List of objective entities.
|
||||||
*/
|
*/
|
||||||
#define ROUNDSTART_OBJECTIVE_ENTITIES "func_bomb_target|func_hostage_rescue|c4|hostage_entity"
|
#define ROUNDSTART_OBJECTIVE_ENTITIES "func_bomb_target|func_hostage_rescue|c4|hostage_entity"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The round is starting.
|
* The round is starting.
|
||||||
*/
|
*/
|
||||||
RoundStartOnRoundStart()
|
RoundStartOnRoundStart()
|
||||||
{
|
{
|
||||||
// Kill all objective entities.
|
// Kill all objective entities.
|
||||||
RoundStartKillObjectives();
|
RoundStartKillObjectives();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kills all objective entities.
|
* Kills all objective entities.
|
||||||
*/
|
*/
|
||||||
RoundStartKillObjectives()
|
RoundStartKillObjectives()
|
||||||
{
|
{
|
||||||
decl String:classname[64];
|
decl String:classname[64];
|
||||||
|
|
||||||
// Get max entity count.
|
// Get max entity count.
|
||||||
new maxentities = GetMaxEntities();
|
new maxentities = GetMaxEntities();
|
||||||
|
|
||||||
// x = entity index.
|
// x = entity index.
|
||||||
for (new x = 0; x <= maxentities; x++)
|
for (new x = 0; x <= maxentities; x++)
|
||||||
{
|
{
|
||||||
// If entity isn't valid, then stop.
|
// If entity isn't valid, then stop.
|
||||||
if(!IsValidEdict(x))
|
if(!IsValidEdict(x))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get valid edict's classname.
|
// Get valid edict's classname.
|
||||||
GetEdictClassname(x, classname, sizeof(classname));
|
GetEdictClassname(x, classname, sizeof(classname));
|
||||||
|
|
||||||
// Check if it matches any objective entities, then stop if it doesn't.
|
// Check if it matches any objective entities, then stop if it doesn't.
|
||||||
if(StrContains(ROUNDSTART_OBJECTIVE_ENTITIES, classname) == -1)
|
if(StrContains(ROUNDSTART_OBJECTIVE_ENTITIES, classname) == -1)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entity is an objective, kill it.
|
// Entity is an objective, kill it.
|
||||||
RemoveEdict(x);
|
RemoveEdict(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user