From a13339ff617e970d96f8b251c65e5574d605d6af Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 9 Jul 2011 15:30:00 +0300 Subject: [PATCH] Use Shorts instead of Coords, for fewer bandwidth usage. Also tweak the healthsize offset for shownames. --- data/defaultVT.cfg | 2 +- data/qcsrc/client/Main.qc | 12 ++++++------ data/qcsrc/server/cl_client.qc | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index ce3b29fd..ffcedac4 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1160,7 +1160,7 @@ seta hud_shownames_maxdistance 1500 "alpha/size is 0 at this distance" seta hud_shownames_antioverlap 1 "if two tags get too close to each other, fade out the one further away from you" seta hud_shownames_antioverlap_distance 125 "2d distance to other tag after which to fade out" seta hud_shownames_offset 52 "offset (along z-axis) tag from player origin by this many units" -seta hud_shownames_offset_healthsize 0.25 "offset (along z-axis) tag from player origin by this many units, based on player size" +seta hud_shownames_offset_healthsize 0.5 "offset (along z-axis) tag from player origin by this many units, based on player size" sbar_info_pos 50 seta sbar_alpha_bg 0.8 "alpha value of the HUD background" diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 626a56c2..6e731232 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -1049,17 +1049,17 @@ void Ent_Init() strunzone(forcefog); forcefog = strzone(ReadString()); - g_campaign = ReadCoord(); + g_campaign = ReadShort(); armorblockpercent = ReadByte() / 255.0; g_weaponswitchdelay = ReadByte() / 255.0; - g_vore = ReadCoord(); - g_balance_vore_swallow_limit = ReadCoord(); - g_healthsize = ReadCoord(); - g_healthsize_min = ReadCoord(); - g_healthsize_max = ReadCoord(); + g_vore = ReadShort(); + g_balance_vore_swallow_limit = ReadShort(); + g_healthsize = ReadShort(); + g_healthsize_min = ReadShort(); + g_healthsize_max = ReadShort(); armor_max = ReadCoord(); teamheal_max = ReadCoord(); diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index e020cddb..0e5a1ac3 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -1038,15 +1038,15 @@ float ClientInit_SendEntity(entity to, float sf) WriteString(MSG_ENTITY, world.fog); else WriteString(MSG_ENTITY, ""); - WriteCoord(MSG_ENTITY, cvar("g_campaign")); + WriteShort(MSG_ENTITY, cvar("g_campaign")); WriteByte(MSG_ENTITY, cvar("g_balance_armor_blockpercent") * 255.0); WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0); - WriteCoord(MSG_ENTITY, cvar("g_vore")); - WriteCoord(MSG_ENTITY, g_balance_vore_swallow_limit); - WriteCoord(MSG_ENTITY, cvar("g_healthsize")); - WriteCoord(MSG_ENTITY, cvar("g_healthsize_min")); - WriteCoord(MSG_ENTITY, cvar("g_healthsize_max")); + WriteShort(MSG_ENTITY, cvar("g_vore")); + WriteShort(MSG_ENTITY, g_balance_vore_swallow_limit); + WriteShort(MSG_ENTITY, cvar("g_healthsize")); + WriteShort(MSG_ENTITY, cvar("g_healthsize_min")); + WriteShort(MSG_ENTITY, cvar("g_healthsize_max")); // tell the client if this server uses armor float armor_max; -- 2.39.2