X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=cl_parse.c;h=dc4e748dc92b566fb571b0705fc687a3324401a7;hp=54eee3193b09c8abdc4066cecf130ff36524e994;hb=e779ed3e51e7171d93367661bffd70953d0127cd;hpb=f8466893a06854bfc7ebc12cf97cec393c66175e diff --git a/cl_parse.c b/cl_parse.c index 54eee319..dc4e748d 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -182,6 +182,7 @@ static void QW_CL_NextUpload(void); void QW_CL_StartUpload(unsigned char *data, int size); //static qboolean QW_CL_IsUploading(void); static void QW_CL_StopUpload(void); +void CL_VM_UpdateIntermissionState(int intermission); /* ================== @@ -1634,30 +1635,25 @@ void CL_ValidateState(entity_state_t *s) if (s->modelindex >= MAX_MODELS) Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)\n", s->modelindex, MAX_MODELS); + // these warnings are only warnings, no corrections are made to the state + // because states are often copied for decoding, which otherwise would + // propogate some of the corrections accidentally + // (this used to happen, sometimes affecting skin and frame) + // colormap is client index + 1 if ((!s->flags & RENDER_COLORMAPPED) && s->colormap > cl.maxclients) - { Con_DPrintf("CL_ValidateState: colormap (%i) > cl.maxclients (%i)\n", s->colormap, cl.maxclients); - s->colormap = 0; - } model = cl.model_precache[s->modelindex]; if (model && model->type && s->frame >= model->numframes) - { Con_DPrintf("CL_ValidateState: no such frame %i in \"%s\" (which has %i frames)\n", s->frame, model->name, model->numframes); - s->frame = 0; - } if (model && model->type && s->skin > 0 && s->skin >= model->numskins && !(s->lightpflags & PFLAGS_FULLDYNAMIC)) - { Con_DPrintf("CL_ValidateState: no such skin %i in \"%s\" (which has %i skins)\n", s->skin, model->name, model->numskins); - s->skin = 0; - } } void CL_MoveLerpEntityStates(entity_t *ent) { float odelta[3], adelta[3]; - CL_ValidateState(&ent->state_current); VectorSubtract(ent->state_current.origin, ent->persistent.neworigin, odelta); VectorSubtract(ent->state_current.angles, ent->persistent.newangles, adelta); if (!ent->state_previous.active || ent->state_previous.modelindex != ent->state_current.modelindex) @@ -3699,12 +3695,14 @@ void CL_ParseServerMessage(void) if(!cl.intermission) cl.completed_time = cl.time; cl.intermission = 1; + CL_VM_UpdateIntermissionState(cl.intermission); break; case svc_finale: if(!cl.intermission) cl.completed_time = cl.time; cl.intermission = 2; + CL_VM_UpdateIntermissionState(cl.intermission); SCR_CenterPrint(MSG_ReadString ()); break; @@ -3712,6 +3710,7 @@ void CL_ParseServerMessage(void) if(!cl.intermission) cl.completed_time = cl.time; cl.intermission = 3; + CL_VM_UpdateIntermissionState(cl.intermission); SCR_CenterPrint(MSG_ReadString ()); break;