X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=clvm_cmds.c;h=6e35193ae39de8937a208a2a8e0b2906129999a4;hb=39ffc8f99e2ea7bed0b477ce5b9220821f93adc1;hp=43ca54ad9203899025b7d21636c881516d4d28bf;hpb=16742571f9a7d696a654668febdc10b4f4affd57;p=xonotic%2Fdarkplaces.git diff --git a/clvm_cmds.c b/clvm_cmds.c index 43ca54ad..6e35193a 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -351,8 +351,6 @@ int CSQC_EntitiesInBox (vec3_t mins, vec3_t maxs, int maxlist, prvm_edict_t **li { if (ent->priv.required->free) continue; -// VectorAdd(ent->fields.client->origin, ent->fields.client->mins, ent->fields.client->absmin); -// VectorAdd(ent->fields.client->origin, ent->fields.client->maxs, ent->fields.client->absmax); if(BoxesOverlap(mins, maxs, ent->fields.client->absmin, ent->fields.client->absmax)) list[k++] = ent; } @@ -644,8 +642,6 @@ static void VM_CL_R_AddEntities (void) ed = &prog->edicts[i]; if(ed->priv.required->free) continue; - VectorAdd(ed->fields.client->origin, ed->fields.client->mins, ed->fields.client->absmin); - VectorAdd(ed->fields.client->origin, ed->fields.client->maxs, ed->fields.client->absmax); CSQC_Think(ed); if(ed->priv.required->free) continue; @@ -758,25 +754,13 @@ static void VM_CL_R_SetView (void) PRVM_G_FLOAT(OFS_RETURN) = 1; } -extern void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit); //#304 void() renderscene (EXT_CSQC) static void VM_CL_R_RenderScene (void) { - int i; VM_SAFEPARMCOUNT(0, VM_CL_R_RenderScene); // we need to update any RENDER_VIEWMODEL entities at this point because // csqc supplies its own view matrix - for (i = 1;i < cl.num_entities;i++) - { - if (cl.entities_active[i]) - { - entity_t *ent = cl.entities + i; - if ((ent->render.flags & RENDER_VIEWMODEL) || ent->state_current.tagentity) - CL_UpdateNetworkEntity(ent, 32); - } - } - // and of course the engine viewmodel needs updating as well - CL_UpdateNetworkEntity(&cl.viewent, 32); + CL_UpdateViewEntities(); // now draw stuff! R_RenderView(); } @@ -1205,19 +1189,11 @@ static void VM_CL_makestatic (void) Matrix4x4_CreateFromQuakeEntity(&staticent->render.matrix, ent->fields.client->origin[0], ent->fields.client->origin[1], ent->fields.client->origin[2], ent->fields.client->angles[0], ent->fields.client->angles[1], ent->fields.client->angles[2], staticent->render.scale); CL_UpdateRenderEntity(&staticent->render); - // transparent stuff can't be lit during the opaque stage - if (staticent->render.effects & (EF_ADDITIVE | EF_NODEPTHTEST) || staticent->render.alpha < 1) - staticent->render.flags |= RENDER_TRANSPARENT; - // double sided rendering mode causes backfaces to be visible - // (mostly useful on transparent stuff) - if (staticent->render.effects & EF_DOUBLESIDED) - staticent->render.flags |= RENDER_NOCULLFACE; // either fullbright or lit if (!(staticent->render.effects & EF_FULLBRIGHT) && !r_fullbright.integer) staticent->render.flags |= RENDER_LIGHT; // turn off shadows from transparent objects - if (!(staticent->render.effects & EF_NOSHADOW) - && !(staticent->render.flags & RENDER_TRANSPARENT)) + if (!(staticent->render.effects & (EF_NOSHADOW | EF_ADDITIVE | EF_NODEPTHTEST)) && (staticent->render.alpha >= 1)) staticent->render.flags |= RENDER_SHADOW; } else @@ -3160,7 +3136,7 @@ VM_tan, // #475 float(float a) VM_tan (DP_QC_ASINACOSATANATAN2TAN) VM_strlennocol, // #476 float(string s) : DRESK - String Length (not counting color codes) (DP_QC_STRINGCOLORFUNCTIONS) VM_strdecolorize, // #477 string(string s) : DRESK - Decolorized String (DP_QC_STRINGCOLORFUNCTIONS) VM_strftime, // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME) -NULL, // #479 +VM_tokenizebyseparator, // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR) NULL, // #480 NULL, // #481 NULL, // #482