X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fassault.qc;h=0d7da73572a3083af09aff6a296b55afbe4fabf2;hb=d69f237a3430e4ad899d8eefd2ebee014e8a5399;hp=d67e288392bcac8cf884134034b8d1d4d67c6b11;hpb=0e7ed909bffb4ff21f0c68d163edfc17487e380a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/assault.qc b/qcsrc/server/assault.qc index d67e28839..0d7da7357 100644 --- a/qcsrc/server/assault.qc +++ b/qcsrc/server/assault.qc @@ -70,7 +70,7 @@ void assault_objective_decrease_use() { return; } - if(other.assault_sprite.classname == "assault_decreaser_sprite") + if(other.assault_sprite) WaypointSprite_Disown(other.assault_sprite, waypointsprite_deadlifetime); else return; // already activated! cannot activate again! @@ -92,6 +92,17 @@ void assault_objective_decrease_use() { oldself = self; self = oldself.enemy; + if(self.message) + { + entity player; + string s; + FOR_EACH_PLAYER(player) + { + s = strcat(self.message, "\n"); + centerprint(player, s); + } + } + oldactivator = activator; activator = oldself; SUB_UseTargets(); @@ -142,7 +153,7 @@ void target_objective_decrease_activate() spr = WaypointSprite_SpawnFixed("", 0.5 * (ent.absmin + ent.absmax), ent, assault_sprite); spr.assault_decreaser = self; spr.waypointsprite_visible_for_player = assault_decreaser_sprite_visible; - spr.classname = "assault_decreaser_sprite"; + spr.classname = "sprite_waypoint"; WaypointSprite_UpdateRule(spr, assault_attacker_team, SPRITERULE_TEAMPLAY); if(ent.classname == "func_assault_destructible") WaypointSprite_UpdateSprites(spr, "as-defend", "as-destroy", "as-destroy"); @@ -187,6 +198,11 @@ void spawnfunc_func_assault_destructible() { return; } self.spawnflags = 3; + if(assault_attacker_team == COLOR_TEAM1) { + self.team = COLOR_TEAM2; + } else { + self.team = COLOR_TEAM1; + } spawnfunc_func_breakable(); } @@ -246,31 +262,30 @@ void assault_roundstart_use() { activator = self; SUB_UseTargets(); - /* + #ifdef TTURRETS_ENABLED -entity ent,oldself; + entity ent, oldself; //(Re)spawn all turrets oldself = self; ent = find(world, classname, "turret_main"); while(ent) { - // Swap turret teams - if(ent.team == COLOR_TEAM1) - ent.team = COLOR_TEAM2; - else - ent.team = COLOR_TEAM1; + // Swap turret teams + if(ent.team == COLOR_TEAM1) + ent.team = COLOR_TEAM2; + else + ent.team = COLOR_TEAM1; - self = ent; + self = ent; - // Dubbles as teamchange - turret_stdproc_respawn(); - //ent.turret_spawnfunc(); + // Dubbles as teamchange + turret_stdproc_respawn(); - ent = find(ent, classname, "turret_main"); + ent = find(ent, classname, "turret_main"); } self = oldself; #endif -*/ + }