ref: 01271d8b49ba6ba3226373e656fda2fa42ae70fb
parent: 879855920811b9ac702ba76da9d3c8639b103f2b
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Dec 13 18:35:48 EST 2023
hl: convert "renderamt" to alpha
--- a/pr_edict.c
+++ b/pr_edict.c
@@ -829,7 +829,14 @@
{
if(strcmp(keyname, "alpha") == 0)
ent->alpha = f2alpha(atof(com_token));
- else
+ else if(strcmp(keyname, "renderamt") == 0){
+ ent->alpha = atoi(com_token);
+ if(ent->alpha == ZERO_ALPHA)
+ ent->alpha++;
+ else if(ent->alpha == 0)
+ ent->alpha = ZERO_ALPHA;
+ ent->alpha = clamp(ent->alpha, 1, 255);
+ }else
Con_Printf ("ED_ParseEdict: '%s' is not a field\n", keyname);
continue;
}