]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Require booting of subsystems whenever spawning
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 22:59:07 +0000 (00:59 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 22:59:07 +0000 (00:59 +0200)
data/defaultVT.cfg
data/qcsrc/client/Main.qc
data/qcsrc/client/View.qc
data/qcsrc/client/main.qh
data/qcsrc/server/cl_client.qc

index 1fcaea2c69379f47211ceeab262c1110071724aa..dc8541ff053b616853a57c5b1d8dcb06b679012b 100644 (file)
@@ -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"\r
 \r
 set g_power 5 "when armor is below this level, the HUD, crosshair and helper will not work"\r
-set g_power_reboot 3 "amount of time it takes to boot a player's subsystems once he has enough armor"\r
+set g_power_reboot 2 "amount of time it takes to boot a player's subsystems once he has enough armor"\r
+set g_power_reboot_spawn 1 "when enabled, a player's subsystems must boot whenever he spawns"\r
 \r
 // part of an ugly hack for the menu audio sliders to work with the cutsound feature\r
 seta menu_volume 1\r
index bc4c745c08a3e0991af00b859ac7511dd32627b4..0d73a9a2354ad7d43a3d0fec84cc6d7994af8749 100644 (file)
@@ -1063,6 +1063,7 @@ void Ent_Init()
 \r
        g_power = ReadShort();\r
        g_power_reboot = ReadShort();\r
+       g_power_reboot_spawn = ReadByte();\r
 \r
        if(!postinit)\r
                PostInit();\r
index bf8ea4e6517a978bc24f80f1114c746804cfee81..cb513a18a675e897c1dc108e7bc37fcec4e32fa6 100644 (file)
@@ -417,19 +417,19 @@ void CSQC_UpdateView(float w, float h)
        }\r
 \r
        float apply_idlescale;\r
-       if(cvar("cl_vore_vieweffects_idlescale_prey"))\r
+       if(cvar("cl_vore_vieweffects_idlescale_prey") && frametime)\r
        {\r
                apply_idlescale += getstatf(STAT_VORE_PROGRESS_PREY) * cvar("cl_vore_vieweffects_idlescale_prey");\r
                if(cvar("v_idlescale") != apply_idlescale)\r
                        cvar_clientsettemp("v_idlescale", ftos(apply_idlescale));\r
        }\r
-       if(cvar("cl_vore_vieweffects_idlescale_predator"))\r
+       if(cvar("cl_vore_vieweffects_idlescale_predator") && frametime)\r
        {\r
                apply_idlescale += getstatf(STAT_VORE_PROGRESS_PRED) * cvar("cl_vore_vieweffects_idlescale_predator");\r
                if(cvar("v_idlescale") != apply_idlescale)\r
                        cvar_clientsettemp("v_idlescale", ftos(apply_idlescale));\r
        }\r
-       if(cvar("cl_vore_vieweffects_idlescale_stomach"))\r
+       if(cvar("cl_vore_vieweffects_idlescale_stomach") && frametime)\r
        {\r
                apply_idlescale += getstati(STAT_VORE_EATEN) * cvar("cl_vore_vieweffects_idlescale_stomach");\r
                if(cvar("v_idlescale") != apply_idlescale)\r
@@ -558,6 +558,14 @@ void CSQC_UpdateView(float w, float h)
                fov *= spawnfov_current;\r
        }\r
 \r
+       if(respawned)\r
+       {\r
+               if(g_power_reboot_spawn)\r
+                       power_boot = time + g_power_reboot;\r
+               else\r
+                       power_boot = time;\r
+       }\r
+\r
        R_SetView(VF_FOV, GetCurrentFov(fov));\r
 \r
        // Camera for demo playback\r
index 7045704351be5f0c95a0816363e2e9b41bb21184..ed68d7665669cce48ef8450b2e6c83e9869b3f78 100644 (file)
@@ -170,7 +170,7 @@ float g_vore;
 float g_healthsize_center, g_healthsize_min, g_healthsize_max;\r
 float armor_max;\r
 float teamheal_max;\r
-float g_power, g_power_reboot;\r
+float g_power, g_power_reboot, g_power_reboot_spawn;\r
 \r
 //hooks\r
 float calledhooks;\r
index 03bbc0aa91478966ff09c7a0c9276cfd7e20388c..c01fc3933bfd6eb84d59642e9b28989c7a5b3d5c 100644 (file)
@@ -1073,6 +1073,7 @@ float ClientInit_SendEntity(entity to, float sf)
 \r
        WriteShort(MSG_ENTITY, cvar("g_power"));\r
        WriteShort(MSG_ENTITY, cvar("g_power_reboot"));\r
+       WriteByte(MSG_ENTITY, cvar("g_power_reboot_spawn"));\r
 \r
        return TRUE;\r
 }\r