git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12350
d7cf8633-e32d-0410-b094-
e92efae38249
prvm_prog_t *prog = SVVM_prog;
int i;
char s[17];
+ union {
+ int i;
+ float f;
+ } u;
if(!vm_customstats)
return;
break;
//float field sent as-is
case 8:
- stats[i+32] = PRVM_E_INT(ent, vm_customstats[i].fieldoffset);
+ // can't directly use PRVM_E_INT on the field because it may be PRVM_64 and a double is not the representation we want to send
+ u.f = PRVM_E_FLOAT(ent, vm_customstats[i].fieldoffset);
+ stats[i+32] = u.i;
break;
//integer value of float field
case 2: