X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fassault.qc;h=05b2cc750232e5fbc65a5136decf6d524c864fee;hb=7e831a7d912845a7139ee8deda891378bb4c2197;hp=f5b71b8533210ca1abca7f4063eda2ea328f74f8;hpb=77ff647e111d875369fe7a045b5da23030b1a949;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/assault.qc b/qcsrc/server/assault.qc index f5b71b853..05b2cc750 100644 --- a/qcsrc/server/assault.qc +++ b/qcsrc/server/assault.qc @@ -70,8 +70,12 @@ 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); + if(other.classname == "func_assault_destructible") + other.sprite = world; + } else return; // already activated! cannot activate again! @@ -92,6 +96,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(); @@ -137,15 +152,24 @@ void target_objective_decrease_activate() for(ent = world; (ent = find(ent, target, self.targetname)); ) { if(ent.assault_sprite != world) + { WaypointSprite_Disown(ent.assault_sprite, waypointsprite_deadlifetime); + if(ent.classname == "func_assault_destructible") + ent.sprite = world; + } 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"); + WaypointSprite_UpdateMaxHealth(spr, ent.max_health); + WaypointSprite_UpdateHealth(spr, ent.health); + ent.sprite = spr; + } else WaypointSprite_UpdateSprites(spr, "as-defend", "as-push", "as-push"); WaypointSprite_UpdateTeamRadar(spr, RADARICON_OBJECTIVE, '1 0.5 0'); @@ -251,31 +275,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 -*/ + }