From: lordhavoc Date: Wed, 23 Aug 2000 00:03:04 +0000 (+0000) Subject: HalfLife renderamt support (why? boredom...) X-Git-Tag: RELEASE_0_2_0_RC1~1014 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=b9c0ea4ce76e89a5c8858a63a5a6a10d6fd3abea HalfLife renderamt support (why? boredom...) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/pr_edict.c b/pr_edict.c index 27ba1355..c0ffb115 100644 --- a/pr_edict.c +++ b/pr_edict.c @@ -92,6 +92,8 @@ int eval_glow_color; int eval_items2; int eval_scale; int eval_alpha; +int eval_renderamt; // HalfLife support +int eval_rendertype; // HalfLife support int eval_fullbright; int eval_ammo_shells1; int eval_ammo_nails1; @@ -137,6 +139,8 @@ void FindEdictFieldOffsets() eval_items2 = FindFieldOffset("items2"); eval_scale = FindFieldOffset("scale"); eval_alpha = FindFieldOffset("alpha"); + eval_renderamt = FindFieldOffset("renderamt"); // HalfLife support + eval_rendertype = FindFieldOffset("rendertype"); // HalfLife support eval_fullbright = FindFieldOffset("fullbright"); eval_ammo_shells1 = FindFieldOffset("ammo_shells1"); eval_ammo_nails1 = FindFieldOffset("ammo_nails1"); diff --git a/progs.h b/progs.h index 7bcc6d19..f33e9550 100644 --- a/progs.h +++ b/progs.h @@ -72,6 +72,8 @@ extern int eval_glow_color; extern int eval_items2; extern int eval_scale; extern int eval_alpha; +extern int eval_renderamt; // HalfLife support +extern int eval_rendertype; // HalfLife support extern int eval_fullbright; extern int eval_ammo_shells1; extern int eval_ammo_nails1; diff --git a/sv_main.c b/sv_main.c index 5fbc78d4..454d6a03 100644 --- a/sv_main.c +++ b/sv_main.c @@ -485,6 +485,8 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg) if (val = GETEDICTFIELDVALUE(ent, eval_alpha)) if ((alpha = (int) (val->_float * 255.0)) == 0) alpha = 255; + if (val = GETEDICTFIELDVALUE(ent, eval_renderamt)) // HalfLife support + alpha -= (int) val->_float; if (alpha < 0) alpha = 0; if (alpha > 255) alpha = 255;