X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fassault.qc;h=2562dca3df803fa93725204eb01f7059ef1cd189;hb=6c9afd07ee6674fb287574d238dd0fb3043259da;hp=85009dd830967c11f8b9d1a3c08953db803f970d;hpb=128c68b3e475d812ab3aa81a1aab0648a7d80505;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/assault.qc b/qcsrc/server/assault.qc index 85009dd83..2562dca3d 100644 --- a/qcsrc/server/assault.qc +++ b/qcsrc/server/assault.qc @@ -47,6 +47,13 @@ void assault_objective_use() { self = oldself; } +vector target_objective_spawn_evalfunc(entity player, entity spot, vector current) +{ + if(self.health < 0 || self.health >= ASSAULT_VALUE_INACTIVE) + return '-1 0 0'; + return current; +} + void spawnfunc_target_objective() { if(!g_assault) { @@ -57,6 +64,7 @@ void spawnfunc_target_objective() { self.use = assault_objective_use; assault_objective_reset(); self.reset = assault_objective_reset; + self.spawn_evalfunc = target_objective_spawn_evalfunc; } @@ -103,7 +111,7 @@ void assault_objective_decrease_use() { centerprint(player, s); } } - + oldactivator = activator; activator = oldself; SUB_UseTargets(); @@ -115,7 +123,7 @@ void assault_objective_decrease_use() { void assault_setenemytoobjective() { - local entity objective; + entity objective; for(objective = world; (objective = find(objective, targetname, self.target)); ) { if(objective.classname == "target_objective") { if(self.enemy == world) @@ -207,6 +215,7 @@ void spawnfunc_func_assault_destructible() { return; } self.spawnflags = 3; + self.classname = "func_assault_destructible"; if(assault_attacker_team == COLOR_TEAM1) { self.team = COLOR_TEAM2; } else { @@ -271,7 +280,7 @@ void assault_roundstart_use() { activator = self; SUB_UseTargets(); - + #ifdef TTURRETS_ENABLED entity ent, oldself; @@ -315,7 +324,7 @@ void spawnfunc_target_assault_roundstart() { // reset objectives, toggle spawnpoints, reset triggers, ... void vehicles_clearrturn(); void vehicles_spawn(); -void assault_new_round() +void assault_new_round() { entity oldself; //bprint("ASSAULT: new round\n"); @@ -325,9 +334,9 @@ void assault_new_round() FOR_EACH_PLAYER(self) { if(self.vehicle) - vehicles_exit(VHEF_RELESE); + vehicles_exit(VHEF_RELESE); } - + self = findchainflags(vehicle_flags, VHF_ISVEHICLE); while(self) { @@ -349,7 +358,7 @@ void assault_new_round() } - local entity ent; + entity ent; for(ent = world; (ent = nextent(ent)); ) { if(clienttype(ent) == CLIENTTYPE_NOTACLIENT) @@ -360,8 +369,8 @@ void assault_new_round() ent.team_saved = COLOR_TEAM1; } } - + // reset the level with a countdown cvar_set("timelimit", ftos(ceil(time - game_starttime) / 60)); - ReadyRestartForce(); // sets game_starttime + ReadyRestart_force(); // sets game_starttime }