From: MirceaKitsune Date: Tue, 15 Nov 2011 17:06:33 +0000 (+0200) Subject: Create cvars for power system X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bb1fa63d1bdd3908e4309ef4303338a25b5372be;p=voretournament%2Fvoretournament.git Create cvars for power system --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 6f1052c5..d9660c4c 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -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" set g_healthsize_weapon_scalefactor_pos 10 "Amount by which the view model is moved vertically based on player size" +set g_power 5 +set g_power_reboot 3 + // part of an ugly hack for the menu audio sliders to work with the cutsound feature seta menu_volume 1 seta menu_bgmvolume 0.5 diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 248074c2..154ac152 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -1061,6 +1061,9 @@ void Ent_Init() armor_max = ReadCoord(); teamheal_max = ReadCoord(); + g_power = ReadCoord(); + g_power_reboot = ReadCoord(); + if(!postinit) PostInit(); } diff --git a/data/qcsrc/client/main.qh b/data/qcsrc/client/main.qh index 1d495abf..70457043 100644 --- a/data/qcsrc/client/main.qh +++ b/data/qcsrc/client/main.qh @@ -170,6 +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; //hooks float calledhooks; diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 29f39be3..6c3fc4ab 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -1060,6 +1060,9 @@ float ClientInit_SendEntity(entity to, float sf) WriteShort(MSG_ENTITY, cvar("g_healthsize_min")); WriteShort(MSG_ENTITY, cvar("g_healthsize_max")); + WriteShort(MSG_ENTITY, cvar("g_power")); + WriteShort(MSG_ENTITY, cvar("g_power_reboot")); + // tell the client if this server uses armor float armor_max; 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")) @@ -2592,8 +2595,7 @@ void PlayerPreThink (void) LA = AnglesTransform_Multiply(LA, LF); // fade the player back to normal rotation each frame - if(self.leanangle_damage_force) // safety - self.leanangle_damage_force = self.leanangle_damage_force * cvar("g_leanplayer_damage_fade"); + self.leanangle_damage_force = self.leanangle_damage_force * cvar("g_leanplayer_damage_fade"); // end of damage leaning self.angles = AnglesTransform_Normalize(AnglesTransform_ToAngles(LA), TRUE);