const int FRAGS_PLAYER = 0;
const int FRAGS_SPECTATOR = -666;
-const int FRAGS_LMS_LOSER = -616;
-const int FRAGS_PLAYER_NONSOLID = FRAGS_LMS_LOSER;
-// we can use this frags value for both
+const int FRAGS_PLAYER_OUT_OF_GAME = -616;
// server flags
const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
bool ca_isEliminated(entity e)
{
- if(e.caplayer == 1 && (IS_DEAD(e) || e.frags == FRAGS_LMS_LOSER))
+ if(e.caplayer == 1 && (IS_DEAD(e) || e.frags == FRAGS_PLAYER_OUT_OF_GAME))
return true;
if(e.caplayer == 0.5)
return true;
if (player.killindicator_teamchange == -2) // player wants to spectate
player.caplayer = 0;
if (player.caplayer)
- player.frags = FRAGS_LMS_LOSER;
+ player.frags = FRAGS_PLAYER_OUT_OF_GAME;
if (!warmup_stage)
eliminatedPlayers.SendFlags |= 1;
if (!player.caplayer)
{
entity first_player = NULL;
int totalplayers = 0;
- FOREACH_CLIENT(IS_PLAYER(it) && it.frags != FRAGS_LMS_LOSER, {
+ FOREACH_CLIENT(IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME, {
if (!totalplayers)
first_player = it;
++totalplayers;
if (!player_rank)
{
int pl_cnt = 0;
- FOREACH_CLIENT(IS_PLAYER(it) && it.frags != FRAGS_LMS_LOSER, {
+ FOREACH_CLIENT(IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME, {
pl_cnt++;
});
if (player.lms_spectate_warning < 2)
{
if(IS_BOT_CLIENT(player))
bot_clear(player);
- player.frags = FRAGS_LMS_LOSER;
+ player.frags = FRAGS_PLAYER_OUT_OF_GAME;
GameRules_scoring_add(player, LMS_RANK, pl_cnt + 1);
}
else
{
lms_lowest_lives = 999;
FOREACH_CLIENT(true, {
- if (it.frags == FRAGS_LMS_LOSER)
+ if (it.frags == FRAGS_PLAYER_OUT_OF_GAME)
{
float it_rank = GameRules_scoring_add(it, LMS_RANK, 0);
if (it_rank > player_rank && it_rank <= 256)
GameRules_scoring_add(player, LMS_LIVES, -GameRules_scoring_add(player, LMS_LIVES, 0));
++quitters;
}
- player.frags = FRAGS_LMS_LOSER;
+ player.frags = FRAGS_PLAYER_OUT_OF_GAME;
TRANSMUTE(Observer, player);
}
}
if(tl <= 0)
{
int pl_cnt = 0;
- FOREACH_CLIENT(IS_PLAYER(it) && it.frags != FRAGS_LMS_LOSER, {
+ FOREACH_CLIENT(IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME, {
pl_cnt++;
});
if(IS_BOT_CLIENT(frag_target))
bot_clear(frag_target);
- frag_target.frags = FRAGS_LMS_LOSER;
+ frag_target.frags = FRAGS_PLAYER_OUT_OF_GAME;
GameRules_scoring_add(frag_target, LMS_RANK, pl_cnt);
}
}
}
else
{
- if(player.frags != FRAGS_SPECTATOR && player.frags != FRAGS_LMS_LOSER)
+ if(player.frags != FRAGS_SPECTATOR && player.frags != FRAGS_PLAYER_OUT_OF_GAME)
{
player.lms_spectate_warning = 1;
sprint(player, "WARNING: you won't be able to enter the game again after spectating in LMS. Use the same command again to spectate anyway.\n");
bool independent_players;
#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
#define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
-#define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_NONSOLID))
+#define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_OUT_OF_GAME))
string clientstuff;
.float phase;