X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fkeyhunt%2Fsv_keyhunt.qc;h=1c2eacffd4e4974932096d27c07c8cd5b2de3a4e;hb=0514f7948727cfa572b33bd29d1bdf2c13cd866d;hp=21d9208bf96b74746cbb7f35c074b2a5f228ad27;hpb=014563bb18d2fca287bd53fbde65b057e4ec6eef;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc index 21d9208bf..1c2eacffd 100644 --- a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc +++ b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc @@ -1,5 +1,11 @@ #include "sv_keyhunt.qh" +#include +#include +#include +#include +#include + float autocvar_g_balance_keyhunt_damageforcescale; float autocvar_g_balance_keyhunt_delay_collect; float autocvar_g_balance_keyhunt_delay_damage_return; @@ -541,7 +547,12 @@ void kh_WinnerTeam(int winner_team) // runs when a team wins midpoint += thisorigin; if(!first) - te_lightning2(NULL, lastorigin, thisorigin); + { + // TODO: this effect has been replaced due to a possible crash it causes + // see https://gitlab.com/xonotic/darkplaces/issues/123 + //te_lightning2(NULL, lastorigin, thisorigin); + Send_Effect(EFFECT_TR_NEXUIZPLASMA, lastorigin, thisorigin, 1); + } lastorigin = thisorigin; if(first) firstorigin = thisorigin; @@ -549,7 +560,8 @@ void kh_WinnerTeam(int winner_team) // runs when a team wins } if(NumTeams(kh_teams) > 2) { - te_lightning2(NULL, lastorigin, firstorigin); + //te_lightning2(NULL, lastorigin, firstorigin); // TODO see above + Send_Effect(EFFECT_TR_NEXUIZPLASMA, lastorigin, firstorigin, 1); } midpoint = midpoint * (1 / NumTeams(kh_teams)); te_customflash(midpoint, 1000, 1, Team_ColorRGB(winner_team) * 0.5 + '0.5 0.5 0.5'); // make the color >=0.5 in each component @@ -705,12 +717,10 @@ void key_reset(entity this) kh_Key_Remove(this); } -const string STR_ITEM_KH_KEY = "item_kh_key"; void kh_Key_Spawn(entity initial_owner, float _angle, float i) // runs every time a new flag is created, ie after all the keys have been collected { - entity key = spawn(); + entity key = new(item_kh_key); key.count = i; - key.classname = STR_ITEM_KH_KEY; settouch(key, kh_Key_Touch); setthink(key, kh_Key_Think); key.nextthink = time; @@ -971,7 +981,7 @@ void kh_Initialize() // sets up th KH environment kh_teams = BITS(bound(2, kh_teams, 4)); // make a KH entity for controlling the game - kh_controller = spawn(); + kh_controller = new(kh_controller); setthink(kh_controller, kh_Controller_Think); kh_Controller_SetThink(0, kh_WaitForPlayers); @@ -1037,7 +1047,7 @@ void havocbot_goalrating_kh(entity this, float ratingscale_team, float ratingsca navigation_routerating(this, head.owner, ratingscale_enemy * 10000, 100000); } - havocbot_goalrating_items(this, 1, this.origin, 10000); + havocbot_goalrating_items(this, 80000, this.origin, 10000); } void havocbot_role_kh_carrier(entity this)