X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fonslaught%2Fsv_onslaught.qc;h=572611c5d3f874169b7312c224888758d64f26a3;hb=8c965aa90470cfa8cbfaff88db71b6b5899a90ce;hp=f84a42eb6f567d5e760d89a738e6a4eac973ed2a;hpb=dfd83905b964f87db1a9b206767a5b207991038a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index f84a42eb6..572611c5d 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -835,8 +835,6 @@ void ons_Generator_UpdateSprite(entity e) void ons_camSetup(entity this) { - if(cam) return; - vector dir; vector ang = '0 0 0'; vector best_ang = '0 0 0'; @@ -857,8 +855,6 @@ void ons_camSetup(entity this) if(ang.y == 360) ang.y = 45; } - - cam = new(objective_camera); cam.origin = this.origin; setorigin(cam, cam.origin); cam.angles = best_ang; @@ -983,7 +979,8 @@ void ons_GeneratorReset(entity this) this.lasthealth = this.max_health = this.health = autocvar_g_onslaught_gen_health; this.takedamage = DAMAGE_AIM; this.bot_attack = true; - IL_PUSH(g_bot_targets, this); + if(!IL_CONTAINS(g_bot_targets, this)) + IL_PUSH(g_bot_targets, this); this.iscaptured = true; this.islinked = true; this.isshielded = true; @@ -1678,6 +1675,7 @@ MUTATOR_HOOKFUNCTION(ons, reset_map_global) STAT(ROUNDLOST, it) = false; it.ons_deathloc = '0 0 0'; PutClientInServer(it); + it.clientcamera = it; }); return false; } @@ -2194,5 +2192,7 @@ void ons_Initialize() g_onslaught = true; ons_captureshield_force = autocvar_g_onslaught_shield_force; + cam = new(objective_camera); + InitializeEntity(NULL, ons_DelayedInit, INITPRIO_GAMETYPE); }