- e->state_current.colormap = ed->fields.client->colormap;
- e->state_current.effects = ed->fields.client->effects;
- e->state_current.frame = ed->fields.client->frame;
- e->state_current.skin = ed->fields.client->skin;
-
- if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_alpha)) && val->_float) e->state_current.alpha = val->_float*255;
- if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_scale)) && val->_float) e->state_current.scale = val->_float*16;
- if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_colormod)) && VectorLength2(val->vector)) VectorScale(val->vector, 32, e->state_current.colormod);
- if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_effects)) && val->_float) e->state_current.effects = val->_float;
+ e->state_current.colormap = (int)ed->fields.client->colormap;
+ e->state_current.effects = (int)ed->fields.client->effects;
+ e->state_current.frame = (int)ed->fields.client->frame;
+ e->state_current.skin = (int)ed->fields.client->skin;
+
+ if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_alpha)) && val->_float) e->state_current.alpha = (int)(val->_float*255);
+ if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_scale)) && val->_float) e->state_current.scale = (int)(val->_float*16);
+ if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_colormod)) && VectorLength2(val->vector)) {int j;for (j = 0;j < 3;j++) e->state_current.colormod[j] = (unsigned char)bound(0, val->vector[j] * 32.0f, 255);}
+ if((val = PRVM_GETEDICTFIELDVALUE(ed, csqc_fieldoff_effects)) && val->_float) e->state_current.effects = (int)val->_float;