REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30")
#define g_keepaway IS_GAMETYPE(KEEPAWAY)
-REGISTER_GAMETYPE(_("Invasion"),invasion,g_invasion,INVASION,"timelimit=20 pointlimit=30")
+REGISTER_GAMETYPE(_("Invasion"),invasion,g_invasion,INVASION,"pointlimit=5")
#define g_invasion IS_GAMETYPE(INVASION)
float MAPINFO_FEATURE_WEAPONS = 1; // not defined for minstagib-only maps
FOR_EACH_PLAYER(head)
{
- float cs = PlayerScore_Add(head, SP_INVASION_KILLS, 0);
+ float cs = PlayerScore_Add(head, SP_KILLS, 0);
if(cs > winning_score)
{
winning_score = cs;
else
maxspawned = autocvar_g_invasion_monster_count;
- monster_skill += 0.01 * numplayers;
+ monster_skill += 0.1 * numplayers;
}
MUTATOR_HOOKFUNCTION(invasion_MonsterDies)
numkilled += 1;
if(IS_PLAYER(frag_attacker))
- PlayerScore_Add(frag_attacker, SP_INVASION_KILLS, +1);
+ PlayerScore_Add(frag_attacker, SP_KILLS, +1);
return FALSE;
}
sprint(self, strcat("roundcnt = ", ftos(roundcnt), "\n"));
sprint(self, strcat("monsters_total = ", ftos(monsters_total), "\n"));
sprint(self, strcat("monsters_killed = ", ftos(monsters_killed), "\n"));
+ sprint(self, strcat("monster_skill = ", ftos(monster_skill), "\n"));
return TRUE;
}
void invasion_ScoreRules()
{
- ScoreRules_basics(0, SFL_SORT_PRIO_SECONDARY, 0, FALSE);
- ScoreInfo_SetLabel_PlayerScore(SP_INVASION_KILLS, "kills", SFL_SORT_PRIO_PRIMARY);
+ ScoreRules_basics(0, 0, 0, FALSE);
+ ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "frags", SFL_SORT_PRIO_PRIMARY);
ScoreRules_basics_end();
}
void invasion_Initialize()
{
+ independent_players = 1; // to disable extra useless scores
+
invasion_ScoreRules();
+
+ independent_players = 0;
round_handler_Spawn(Invasion_CheckPlayers, Invasion_CheckWinner, Invasion_RoundStart);
round_handler_Init(5, autocvar_g_invasion_warmup, autocvar_g_invasion_round_timelimit);
allowed_to_spawn = TRUE;
- monster_skill = 0;
+ monster_skill = 0.5;
roundcnt = 0;
}