From: terencehill Date: Wed, 19 Oct 2016 01:11:41 +0000 (+0200) Subject: Onslaught: fix clientcamera support when round restarts X-Git-Tag: xonotic-v0.8.2~487^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d343e893d804438f50c8013e498aa11704be05c4;p=xonotic%2Fxonotic-data.pk3dir.git Onslaught: fix clientcamera support when round restarts --- 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); }