From: FruitieX Date: Sat, 23 Oct 2010 14:24:30 +0000 (+0300) Subject: no ready restart counter in ca, fix bot behaviour when warmup is enabled in ca, new... X-Git-Tag: xonotic-v0.1.0preview~245^2~8^2~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=098b78e21b4dedb0a1d2fafe091a20d4ffc17957;p=xonotic%2Fxonotic-data.pk3dir.git no ready restart counter in ca, fix bot behaviour when warmup is enabled in ca, new scoring system for ca (round win = 1 point for team, 10 damage dealt = 1 point for a player) --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index e9cd073be..49c8483a1 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -615,6 +615,7 @@ set g_arena_respawn_delay 0 set g_arena_respawn_waves 0 set g_ca_respawn_delay 0 set g_ca_respawn_waves 0 +set g_ca_damage2score_multiplier 0.1 set g_nexball_respawn_delay 0 set g_nexball_respawn_waves 0 set g_as_respawn_delay 0 diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index ee4ce1b87..0c9d769e4 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -122,10 +122,14 @@ void reset_map(float dorespawn) if(g_keyhunt) kh_Controller_SetThink(cvar("g_balance_keyhunt_delay_round")+(game_starttime - time), "", kh_StartRound); - if(g_arena || g_ca) + if(g_arena) if(champion && champion.classname == "player" && player_count > 1) UpdateFrags(champion, +1); + if(g_ca) + if(champion && champion.classname == "player" && player_count > 1) + TeamScore_AddToTeam(champion.team, SP_SCORE, 1); + self = oldself; } @@ -199,7 +203,7 @@ void Arena_Warmup() allowed_to_spawn = 0; - if(g_ca && (ca_players < required_ca_players || inWarmupStage)) + if(inWarmupStage) allowed_to_spawn = 1; msg = NEWLINES; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index df6c8d4b2..bb2b753b8 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1305,7 +1305,12 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto void ClientKill (void) { - ClientKill_TeamChange(0); + if((g_arena || g_ca) && ((champion && champion.classname == "player" && player_count > 1) || player_count == 1)) // don't allow a kill in this case either + { + // do nothing + } + else + ClientKill_TeamChange(0); } void DoTeamChange(float destteam) diff --git a/qcsrc/server/clientcommands.qc b/qcsrc/server/clientcommands.qc index a9fd886bf..b705e9c09 100644 --- a/qcsrc/server/clientcommands.qc +++ b/qcsrc/server/clientcommands.qc @@ -430,7 +430,7 @@ void ReadyRestartForce() readyrestart_happened = 1; game_starttime = time; - if(!g_ca) + if(!g_ca && !g_arena) game_starttime += RESTART_COUNTDOWN; restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use @@ -448,7 +448,7 @@ void ReadyRestartForce() } //initiate the restart-countdown-announcer entity - if(cvar("sv_ready_restart_after_countdown")) + if(cvar("sv_ready_restart_after_countdown") && !g_ca && !g_arena) { restartTimer = spawn(); restartTimer.think = restartTimer_Think; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 6a636a16b..e4dc77d21 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -756,6 +756,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if(deathtype & HITTYPE_HEADSHOT) headshot = 1; } + if(g_ca) + PlayerScore_Add(attacker, SP_SCORE, damage * cvar("g_ca_damage2score_multiplier")); } } else