X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fgamemode_assault.qc;h=d14d9da8c7c5fe2bd42854510b8c1fb8c00a3f86;hb=6f37a8f8076a572097afb13de2c367a72717c927;hp=0325067f28fb396d795c693ba8608524ba473dc1;hpb=3b2bc1bdee04f4c454279bf14ac8ed6b37c6ddb5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/gamemode_assault.qc index 0325067f2..d14d9da8c 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/gamemode_assault.qc @@ -1,3 +1,10 @@ +#include "gamemode_assault.qh" +#include "../_.qh" + +#include "gamemode.qh" + +.entity sprite; + // random functions void assault_objective_use() { @@ -63,20 +70,13 @@ void assault_objective_decrease_use() PlayerTeamScore_Add(activator, SP_ASSAULT_OBJECTIVES, ST_ASSAULT_OBJECTIVES, 1); self.enemy.health = -1; - entity oldself, oldactivator; + entity oldself, oldactivator, head; oldself = self; self = oldself.enemy; if(self.message) - { - entity player; - string s; - FOR_EACH_PLAYER(player) - { - s = strcat(self.message, "\n"); - centerprint(player, s); - } - } + FOR_EACH_PLAYER(head) + centerprint(head, self.message); oldactivator = activator; activator = oldself; @@ -113,9 +113,9 @@ float assault_decreaser_sprite_visible(entity e) decreaser = self.assault_decreaser; if(decreaser.enemy.health >= ASSAULT_VALUE_INACTIVE) - return FALSE; + return false; - return TRUE; + return true; } void target_objective_decrease_activate() @@ -212,31 +212,8 @@ void assault_wall_think() // trigger new round // reset objectives, toggle spawnpoints, reset triggers, ... -void vehicles_clearrturn(); -void vehicles_spawn(); void assault_new_round() { - entity oldself; - //bprint("ASSAULT: new round\n"); - - oldself = self; - // Eject players from vehicles - FOR_EACH_PLAYER(self) - { - if(self.vehicle) - vehicles_exit(VHEF_RELESE); - } - - self = findchainflags(vehicle_flags, VHF_ISVEHICLE); - while(self) - { - vehicles_clearrturn(); - vehicles_spawn(); - self = self.chain; - } - - self = oldself; - // up round counter self.winning = self.winning + 1; @@ -376,7 +353,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) if (!ad.bot_attack) continue; - found = FALSE; + found = false; for(tod = world; (tod = find(tod, targetname, ad.target)); ) { if(tod.classname == "target_objective_decrease") @@ -384,7 +361,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) if(tod.enemy.health > 0 && tod.enemy.health < ASSAULT_VALUE_INACTIVE) { // dprint(etos(ad),"\n"); - found = TRUE; + found = true; break; } } @@ -404,7 +381,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) // te_lightning2(world, '0 0 0', p); // Find and rate waypoints around it - found = FALSE; + found = false; best = world; bestvalue = 99999999999; for(radius=0; radius<1500 && !found; radius+=500) @@ -415,7 +392,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) if(wp.classname=="waypoint") if(checkpvs(wp.origin, ad)) { - found = TRUE; + found = true; if(wp.cnt