static void entremove(localentity_t *e)
{
memset(e, 0, sizeof(*e));
- e->freetime = gametime + 1;
+ e->freetime = (float)gametime + 1.0f;
}
static void phys_setupphysentities(void)
vec3_t impactpos, impactnormal, end;
int impactentnum;
float t, f, frac, bounce;
- t = frametime;
+ t = (float)frametime;
if (t == 0)
return;
VectorMA(e->draw.angles, t, e->avelocity, e->draw.angles);
{
if (gametime > self->dietime)
{
- self->draw.scale -= frametime * 3;
+ self->draw.scale -= (float)frametime * 3.0f;
if (self->draw.scale < 0.05f)
{
entremove(self);
e->draw.angles[2] = CGVM_RandomRange(0, 360);
VectorRandom(e->velocity);
VectorScale(e->velocity, 300, e->velocity);
- e->velocity[2] -= cg_gravity * 0.1;
+ e->velocity[2] -= (float)cg_gravity * 0.1f;
e->avelocity[0] = CGVM_RandomRange(0, 1440);
e->avelocity[1] = CGVM_RandomRange(0, 1440);
e->avelocity[2] = CGVM_RandomRange(0, 1440);
VectorSet(e->worldmaxs, 0, 0, -8);
VectorSet(e->entitymins, -8, -8, -8);
VectorSet(e->entitymaxs, 8, 8, 8);
- e->bouncescale = 1.4;
+ e->bouncescale = 1.4f;
e->gravityscale = 1;
e->airfrictionscale = 1;
e->framethink = explosiondebris_framethink;
- e->dietime = time + 5;
+ e->dietime = (float)time + 5.0f;
}
}
{
num = CGVM_MSG_ReadByte();
if (cgvm_networkcode[num])
- cgvm_networkcode[num](num);
+ cgvm_networkcode[num]((byte)num);
else
Host_Error("CL_CGVM_ParseNetwork: unregistered network code %i", num);
}
void CGVM_Free(void *mem)
{
- return Mem_Free(mem);
+ Mem_Free(mem);
}
float CGVM_RandomRange(const float r1, const float r2)
{
color = dq->color;
if (lighthalf)
- glColor4ub((color >> 25) & 0x7F, (color >> 17) & 0x7F, (color >> 9) & 0x7F, color & 0xFF);
+ glColor4ub((byte)((color >> 25) & 0x7F), (byte)((color >> 17) & 0x7F), (byte)((color >> 9) & 0x7F), (byte)(color & 0xFF));
else
- glColor4ub((color >> 24) & 0xFF, (color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF);
+ glColor4ub((byte)((color >> 24) & 0xFF), (byte)((color >> 16) & 0xFF), (byte)((color >> 8) & 0xFF), (byte)(color & 0xFF));
}
x = dq->x;
y = dq->y;