From: havoc Date: Tue, 21 Feb 2012 19:21:05 +0000 (+0000) Subject: use both .items2 and serverflags in items stat, to finally fix the runes X-Git-Tag: xonotic-v0.6.0~10 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=ca2a5f8b223abbddb179bfce7343e11b84a0ce38;p=xonotic%2Fdarkplaces.git use both .items2 and serverflags in items stat, to finally fix the runes missing on the hud bug git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11719 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=5769728448bd944410a14a76e7c587d0e147cd8b --- diff --git a/sv_main.c b/sv_main.c index 8529655e..91716b8f 100644 --- a/sv_main.c +++ b/sv_main.c @@ -2008,15 +2008,10 @@ void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t host_client->fixangle_angles_set = FALSE; } - // stuff the sigil bits into the high bits of items for sbar, or else - // mix in items2 - // LordHavoc: detecting items2 turned out to be tricky, check if the field - // was forcefully declared, we want to override serverflags if it was - // declared by the qc intentionally, but not if we added it in the engine. - if (prog->fieldoffsets.items2 < (int)(prog->numfielddefs - SV_REQGLOBALS)) - items = (int)PRVM_serveredictfloat(ent, items) | ((int)PRVM_serveredictfloat(ent, items2) << 23); - else - items = (int)PRVM_serveredictfloat(ent, items) | ((int)PRVM_serverglobalfloat(serverflags) << 28); + // the runes are in serverflags, pack them into the items value, also pack + // in the items2 value for mission pack huds + // (used only in the mission packs, which do not use serverflags) + items = (int)PRVM_serveredictfloat(ent, items) | ((int)PRVM_serveredictfloat(ent, items2) << 23) | ((int)PRVM_serverglobalfloat(serverflags) << 28); VectorCopy(PRVM_serveredictvector(ent, punchvector), punchvector);