]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Create cvars for power system
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 17:06:33 +0000 (19:06 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 17:06:33 +0000 (19:06 +0200)
data/defaultVT.cfg
data/qcsrc/client/Main.qc
data/qcsrc/client/main.qh
data/qcsrc/server/cl_client.qc

index 6f1052c56280fc5ec2c9e59fb25e462c88923a92..d9660c4c1d581f8302d1a4e906dd23705105fabe 100644 (file)
@@ -1631,6 +1631,9 @@ set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resiz
 set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the view weapon model"\r
 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\r
+set g_power_reboot 3\r
+\r
 // part of an ugly hack for the menu audio sliders to work with the cutsound feature\r
 seta menu_volume 1\r
 seta menu_bgmvolume 0.5\r
index 248074c2efc64a1abac378ebdcc635bf7c2789c3..154ac15215b0ea5aaf89b99e736e10f601c006c3 100644 (file)
@@ -1061,6 +1061,9 @@ void Ent_Init()
        armor_max = ReadCoord();\r
        teamheal_max = ReadCoord();\r
 \r
+       g_power = ReadCoord();\r
+       g_power_reboot = ReadCoord();\r
+\r
        if(!postinit)\r
                PostInit();\r
 }\r
index 1d495abf07bb0cb674b6eb4aa33ff7388f75d24a..7045704351be5f0c95a0816363e2e9b41bb21184 100644 (file)
@@ -170,6 +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
 \r
 //hooks\r
 float calledhooks;\r
index 29f39be31fe7813c3d08754451ecbaf12547fb45..6c3fc4ab3994a20439cc006323425f0ac004599f 100644 (file)
@@ -1060,6 +1060,9 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteShort(MSG_ENTITY, cvar("g_healthsize_min"));\r
        WriteShort(MSG_ENTITY, cvar("g_healthsize_max"));\r
 \r
+       WriteShort(MSG_ENTITY, cvar("g_power"));\r
+       WriteShort(MSG_ENTITY, cvar("g_power_reboot"));\r
+\r
        // tell the client if this server uses armor\r
        float armor_max;\r
        if(cvar("g_balance_armor_start") || (cvar("g_lms") && cvar("g_lms_start_armor")) /*|| (inWarmupStage && cvar("g_warmup_start_armor"))*/ || cvar("g_balance_armor_regen") || cvar("g_balance_armor_regenlinear"))\r
@@ -2592,8 +2595,7 @@ void PlayerPreThink (void)
                        LA = AnglesTransform_Multiply(LA, LF);\r
 \r
                        // fade the player back to normal rotation each frame\r
-                       if(self.leanangle_damage_force) // safety\r
-                               self.leanangle_damage_force = self.leanangle_damage_force * cvar("g_leanplayer_damage_fade");\r
+                       self.leanangle_damage_force = self.leanangle_damage_force * cvar("g_leanplayer_damage_fade");\r
                        // end of damage leaning\r
 \r
                        self.angles = AnglesTransform_Normalize(AnglesTransform_ToAngles(LA), TRUE);\r