trace_t trace;
prvm_edict_t *ent;
prvm_edict_t *ignore;
- int svent;
+ int svent = 0;
prog->xfunction->builtinsprofile += 600;
Matrix4x4_FromVectors(&matrix, forward, left, up, org);
R_RTLight_Update(&r_refdef.scene.templights[r_refdef.scene.numlights], false, &matrix, col, style, cubemapname, castshadow, coronaintensity, coronasizescale, ambientscale, diffusescale, specularscale, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
- r_refdef.scene.lights[r_refdef.scene.numlights] = &r_refdef.scene.templights[r_refdef.scene.numlights++];
+ r_refdef.scene.lights[r_refdef.scene.numlights] = &r_refdef.scene.templights[r_refdef.scene.numlights];r_refdef.scene.numlights++;
prog->functions[prog->funcoffsets.CSQC_UpdateView].totaltime -= Sys_DoubleTime() - t;
}
*vmpartspawner.particle_velocityjitter = theme->velocityjitter;
*vmpartspawner.particle_qualityreduction = theme->qualityreduction;
*vmpartspawner.particle_stretch = theme->stretch;
- vmpartspawner.particle_staincolor1[0] = (theme->staincolor1 >> 16) & 0xFF;
- vmpartspawner.particle_staincolor1[1] = (theme->staincolor1 >> 8) & 0xFF;
- vmpartspawner.particle_staincolor1[2] = (theme->staincolor1 >> 0) & 0xFF;
- vmpartspawner.particle_staincolor2[0] = (theme->staincolor2 >> 16) & 0xFF;
- vmpartspawner.particle_staincolor2[1] = (theme->staincolor2 >> 8) & 0xFF;
- vmpartspawner.particle_staincolor2[2] = (theme->staincolor2 >> 0) & 0xFF;
+ vmpartspawner.particle_staincolor1[0] = ((int)theme->staincolor1 >> 16) & 0xFF;
+ vmpartspawner.particle_staincolor1[1] = ((int)theme->staincolor1 >> 8) & 0xFF;
+ vmpartspawner.particle_staincolor1[2] = ((int)theme->staincolor1 >> 0) & 0xFF;
+ vmpartspawner.particle_staincolor2[0] = ((int)theme->staincolor2 >> 16) & 0xFF;
+ vmpartspawner.particle_staincolor2[1] = ((int)theme->staincolor2 >> 8) & 0xFF;
+ vmpartspawner.particle_staincolor2[2] = ((int)theme->staincolor2 >> 0) & 0xFF;
*vmpartspawner.particle_staintex = (float)theme->staintex;
*vmpartspawner.particle_delayspawn = theme->delayspawn;
*vmpartspawner.particle_delaycollision = theme->delaycollision;
theme->velocityjitter = *vmpartspawner.particle_velocityjitter;
theme->qualityreduction = (*vmpartspawner.particle_qualityreduction) ? true : false;
theme->stretch = *vmpartspawner.particle_stretch;
- theme->staincolor1 = vmpartspawner.particle_staincolor1[0]*65536 + vmpartspawner.particle_staincolor1[1]*256 + vmpartspawner.particle_staincolor1[2];
- theme->staincolor2 = vmpartspawner.particle_staincolor2[0]*65536 + vmpartspawner.particle_staincolor2[1]*256 + vmpartspawner.particle_staincolor2[2];
+ theme->staincolor1 = ((int)vmpartspawner.particle_staincolor1[0])*65536 + (int)(vmpartspawner.particle_staincolor1[1])*256 + (int)(vmpartspawner.particle_staincolor1[2]);
+ theme->staincolor2 = (int)(vmpartspawner.particle_staincolor2[0])*65536 + (int)(vmpartspawner.particle_staincolor2[1])*256 + (int)(vmpartspawner.particle_staincolor2[2]);
theme->staintex =(int)*vmpartspawner.particle_staintex;
theme->delayspawn = *vmpartspawner.particle_delayspawn;
theme->delaycollision = *vmpartspawner.particle_delaycollision;
if (prog->argc < 3) // global-set particle
{
- part = CL_NewParticle((unsigned short)*vmpartspawner.particle_type, ((int)vmpartspawner.particle_color1[0] << 16) + ((int)vmpartspawner.particle_color1[1] << 8) + ((int)vmpartspawner.particle_color1[2]), ((int)vmpartspawner.particle_color2[0] << 16) + ((int)vmpartspawner.particle_color2[1] << 8) + ((int)vmpartspawner.particle_color2[2]), (int)*vmpartspawner.particle_tex, *vmpartspawner.particle_size, *vmpartspawner.particle_sizeincrease, (int)(*vmpartspawner.particle_alpha*256), (int)(*vmpartspawner.particle_alphafade*256), *vmpartspawner.particle_gravity, *vmpartspawner.particle_bounce, org[0], org[1], org[2], dir[0], dir[1], dir[2], *vmpartspawner.particle_airfriction, *vmpartspawner.particle_liquidfriction, *vmpartspawner.particle_originjitter, *vmpartspawner.particle_velocityjitter, (*vmpartspawner.particle_qualityreduction) ? true : false, *vmpartspawner.particle_time, *vmpartspawner.particle_stretch, (pblend_t)*vmpartspawner.particle_blendmode, (porientation_t)*vmpartspawner.particle_orientation, ((int)vmpartspawner.particle_staincolor1[0] << 16) + ((int)vmpartspawner.particle_staincolor1[1] << 8) + ((int)vmpartspawner.particle_staincolor1[2]), ((int)vmpartspawner.particle_staincolor2[0] << 16) + ((int)vmpartspawner.particle_staincolor2[1] << 8) + ((int)vmpartspawner.particle_staincolor2[2]), (int)*vmpartspawner.particle_staintex);
+ part = CL_NewParticle((unsigned short)*vmpartspawner.particle_type, ((int)(vmpartspawner.particle_color1[0]) << 16) + ((int)(vmpartspawner.particle_color1[1]) << 8) + ((int)(vmpartspawner.particle_color1[2])), ((int)vmpartspawner.particle_color2[0] << 16) + ((int)vmpartspawner.particle_color2[1] << 8) + ((int)vmpartspawner.particle_color2[2]), (int)*vmpartspawner.particle_tex, *vmpartspawner.particle_size, *vmpartspawner.particle_sizeincrease, (int)(*vmpartspawner.particle_alpha*256), (int)(*vmpartspawner.particle_alphafade*256), *vmpartspawner.particle_gravity, *vmpartspawner.particle_bounce, org[0], org[1], org[2], dir[0], dir[1], dir[2], *vmpartspawner.particle_airfriction, *vmpartspawner.particle_liquidfriction, *vmpartspawner.particle_originjitter, *vmpartspawner.particle_velocityjitter, (*vmpartspawner.particle_qualityreduction) ? true : false, *vmpartspawner.particle_time, *vmpartspawner.particle_stretch, (pblend_t)*vmpartspawner.particle_blendmode, (porientation_t)*vmpartspawner.particle_orientation, (int)(vmpartspawner.particle_staincolor1[0])*65536 + (int)(vmpartspawner.particle_staincolor1[1])*256 + (int)(vmpartspawner.particle_staincolor1[2]), (int)(vmpartspawner.particle_staincolor2[0])*65536 + (int)(vmpartspawner.particle_staincolor2[1])*256 + (int)(vmpartspawner.particle_staincolor2[2]), (int)*vmpartspawner.particle_staintex);
if (!part)
{
PRVM_G_FLOAT(OFS_RETURN) = 0;
if(polys->progstarttime != prog->starttime) // from other progs? won't draw these (this can cause crashes!)
return;
R_Mesh_ResetTextureState();
- R_Mesh_Matrix(&identitymatrix);
+ R_EntityMatrix(&identitymatrix);
GL_CullFace(GL_NONE);
R_Mesh_VertexPointer(polys->data_vertex3f, 0, 0);
R_Mesh_ColorPointer(polys->data_color4f, 0, 0);
R_Mesh_TexCoordPointer(0, 2, polys->data_texcoord2f, 0, 0);
- R_SetupGenericShader(true);
for (surfacelistindex = 0;surfacelistindex < numsurfaces;)
{
GL_BlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE);
else
GL_BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- R_Mesh_TexBind(0, R_GetTexture(tex));
+ R_SetupShader_Generic(tex, NULL, GL_MODULATE, 1);
numtriangles = 0;
for (;surfacelistindex < numsurfaces;surfacelistindex++)
{
Matrix4x4_Accumulate(&blendedmatrix, &skeleton->relativetransforms[bonenum], retainfrac);
for (blendindex = 0;blendindex < numblends;blendindex++)
{
- Matrix4x4_FromArray12FloatD3D(&matrix, model->data_poses + 12 * (frameblend[blendindex].subframe * model->num_bones + bonenum));
+ Matrix4x4_FromBonePose6s(&matrix, model->num_posescale, model->data_poses6s + 6 * (frameblend[blendindex].subframe * model->num_bones + bonenum));
Matrix4x4_Accumulate(&blendedmatrix, &matrix, frameblend[blendindex].lerp);
}
skeleton->relativetransforms[bonenum] = blendedmatrix;
NULL, // #623
VM_CL_getextresponse, // #624 string getextresponse(void)
NULL, // #625
+NULL, // #626
+VM_sprintf, // #627 string sprintf(string format, ...)
+NULL, // #628
};
const int vm_cl_numbuiltins = sizeof(vm_cl_builtins) / sizeof(prvm_builtin_t);