cl.entities[i].state_current = defaultstate;
}
- if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
+ if (IS_NEXUIZ_DERIVED(gamemode))
{
VectorSet(cl.playerstandmins, -16, -16, -24);
VectorSet(cl.playerstandmaxs, 16, 16, 45);
return;
// clear menu's connect error message
+#ifdef CONFIG_MENU
M_Update_Return_Reason("");
+#endif
cls.demonum = -1;
// stop demo loop in case this fails
*cls.connect_userinfo = 0;
}
+#ifdef CONFIG_MENU
M_Update_Return_Reason("Trying to connect...");
+#endif
}
else
{
Con_Print("Unable to find a suitable network socket to connect to server.\n");
+#ifdef CONFIG_MENU
M_Update_Return_Reason("No network");
+#endif
}
}
{
if (e->render.effects & EF_BRIGHTFIELD)
{
- if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
+ if (IS_NEXUIZ_DERIVED(gamemode))
trailtype = EFFECT_TR_NEXUIZPLASMA;
else
CL_EntityParticles(e);
{
if (e->render.effects & EF_BRIGHTFIELD)
{
- if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
+ if (IS_NEXUIZ_DERIVED(gamemode))
trailtype = EFFECT_TR_NEXUIZPLASMA;
}
if (e->render.effects & EF_DIMLIGHT)
trace_t trace;
matrix4x4_t tempmatrix;
Matrix4x4_Transform(&e->render.matrix, muzzleflashorigin, v2);
- trace = CL_TraceLine(origin, v2, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_SKY, true, false, NULL, false, false);
+ trace = CL_TraceLine(origin, v2, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_SKY, 0, 0, collision_extendmovelength.value, true, false, NULL, false, false);
Matrix4x4_Normalize(&tempmatrix, &e->render.matrix);
Matrix4x4_SetOrigin(&tempmatrix, trace.endpos[0], trace.endpos[1], trace.endpos[2]);
Matrix4x4_Scale(&tempmatrix, 150, 1);
CL_UpdateRenderEntity(&ent->render);
r_refdef.scene.worldentity = &ent->render;
r_refdef.scene.worldmodel = cl.worldmodel;
+
+ // if the world is q2bsp, animate the textures
+ if (ent->render.model && ent->render.model->brush.isq2bsp)
+ ent->render.framegroupblend[0].frame = (int)(cl.time * 2.0f);
}
static void CL_RelinkStaticEntities(void)
entrender = CL_NewTempEntity (0);
if (!entrender)
return;
- //VectorCopy (org, ent->render.origin);
entrender->model = b->model;
- //ent->render.effects = EF_FULLBRIGHT;
- //ent->render.angles[0] = pitch;
- //ent->render.angles[1] = yaw;
- //ent->render.angles[2] = rand()%360;
Matrix4x4_CreateFromQuakeEntity(&entrender->matrix, org[0], org[1], org[2], -pitch, yaw, lhrandom(0, 360), 1);
CL_UpdateRenderEntity(entrender);
VectorMA(org, 30, dist, org);
CL_RelinkStaticEntities();
CL_RelinkBeams();
CL_RelinkEffects();
+ CL_RelinkLightFlashes();
// link stuff
if (drawmask & ENTMASK_ENGINE)
// update the engine-based viewmodel
CL_UpdateViewModel();
- CL_RelinkLightFlashes();
CSQC_RelinkAllEntities(ENTMASK_ENGINE | ENTMASK_ENGINEVIEWMODELS);
// decals, particles, and explosions will be updated during rneder
int namelen;
if (!name)
name = "";
- namelen = strlen(name);
+ namelen = (int)strlen(name);
node = (cl_locnode_t *) Mem_Alloc(cls.levelmempool, sizeof(cl_locnode_t) + namelen + 1);
VectorSet(node->mins, min(mins[0], maxs[0]), min(mins[1], maxs[1]), min(mins[2], maxs[2]));
VectorSet(node->maxs, max(mins[0], maxs[0]), max(mins[1], maxs[1]), max(mins[2], maxs[2]));