From 7a76ba7bf4b04168964e948aed9d6dc7e626e6c3 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Wed, 16 Nov 2011 00:59:07 +0200 Subject: [PATCH] Require booting of subsystems whenever spawning --- data/defaultVT.cfg | 3 ++- data/qcsrc/client/Main.qc | 1 + data/qcsrc/client/View.qc | 14 +++++++++++--- data/qcsrc/client/main.qh | 2 +- data/qcsrc/server/cl_client.qc | 1 + 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 1fcaea2c..dc8541ff 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1643,7 +1643,8 @@ set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the v set g_healthsize_weapon_scalefactor_pos 10 "Amount by which the view model is moved vertically based on player size" set g_power 5 "when armor is below this level, the HUD, crosshair and helper will not work" -set g_power_reboot 3 "amount of time it takes to boot a player's subsystems once he has enough armor" +set g_power_reboot 2 "amount of time it takes to boot a player's subsystems once he has enough armor" +set g_power_reboot_spawn 1 "when enabled, a player's subsystems must boot whenever he spawns" // part of an ugly hack for the menu audio sliders to work with the cutsound feature seta menu_volume 1 diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index bc4c745c..0d73a9a2 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -1063,6 +1063,7 @@ void Ent_Init() g_power = ReadShort(); g_power_reboot = ReadShort(); + g_power_reboot_spawn = ReadByte(); if(!postinit) PostInit(); diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index bf8ea4e6..cb513a18 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -417,19 +417,19 @@ void CSQC_UpdateView(float w, float h) } float apply_idlescale; - if(cvar("cl_vore_vieweffects_idlescale_prey")) + if(cvar("cl_vore_vieweffects_idlescale_prey") && frametime) { apply_idlescale += getstatf(STAT_VORE_PROGRESS_PREY) * cvar("cl_vore_vieweffects_idlescale_prey"); if(cvar("v_idlescale") != apply_idlescale) cvar_clientsettemp("v_idlescale", ftos(apply_idlescale)); } - if(cvar("cl_vore_vieweffects_idlescale_predator")) + if(cvar("cl_vore_vieweffects_idlescale_predator") && frametime) { apply_idlescale += getstatf(STAT_VORE_PROGRESS_PRED) * cvar("cl_vore_vieweffects_idlescale_predator"); if(cvar("v_idlescale") != apply_idlescale) cvar_clientsettemp("v_idlescale", ftos(apply_idlescale)); } - if(cvar("cl_vore_vieweffects_idlescale_stomach")) + if(cvar("cl_vore_vieweffects_idlescale_stomach") && frametime) { apply_idlescale += getstati(STAT_VORE_EATEN) * cvar("cl_vore_vieweffects_idlescale_stomach"); if(cvar("v_idlescale") != apply_idlescale) @@ -558,6 +558,14 @@ void CSQC_UpdateView(float w, float h) fov *= spawnfov_current; } + if(respawned) + { + if(g_power_reboot_spawn) + power_boot = time + g_power_reboot; + else + power_boot = time; + } + R_SetView(VF_FOV, GetCurrentFov(fov)); // Camera for demo playback diff --git a/data/qcsrc/client/main.qh b/data/qcsrc/client/main.qh index 70457043..ed68d766 100644 --- a/data/qcsrc/client/main.qh +++ b/data/qcsrc/client/main.qh @@ -170,7 +170,7 @@ float g_vore; float g_healthsize_center, g_healthsize_min, g_healthsize_max; float armor_max; float teamheal_max; -float g_power, g_power_reboot; +float g_power, g_power_reboot, g_power_reboot_spawn; //hooks float calledhooks; diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 03bbc0aa..c01fc393 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -1073,6 +1073,7 @@ float ClientInit_SendEntity(entity to, float sf) WriteShort(MSG_ENTITY, cvar("g_power")); WriteShort(MSG_ENTITY, cvar("g_power_reboot")); + WriteByte(MSG_ENTITY, cvar("g_power_reboot_spawn")); return TRUE; } -- 2.39.2