From d343e893d804438f50c8013e498aa11704be05c4 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 19 Oct 2016 03:11:41 +0200 Subject: [PATCH] Onslaught: fix clientcamera support when round restarts --- qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index f84a42eb6..f1e257369 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; @@ -1678,6 +1674,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 +2191,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); } -- 2.39.2