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_FLAME)
- CL_ParticleTrail(EFFECT_EF_FLAME, bound(0, cl.time - cl.oldtime, 0.1), origin, origin, vec3_origin, vec3_origin, NULL, 0, false, true, NULL, NULL);
+ CL_ParticleTrail(EFFECT_EF_FLAME, bound(0, cl.time - cl.oldtime, 0.1), origin, origin, vec3_origin, vec3_origin, NULL, 0, false, true, NULL, NULL, 1);
if (e->render.effects & EF_STARDUST)
- CL_ParticleTrail(EFFECT_EF_STARDUST, bound(0, cl.time - cl.oldtime, 0.1), origin, origin, vec3_origin, vec3_origin, NULL, 0, false, true, NULL, NULL);
+ CL_ParticleTrail(EFFECT_EF_STARDUST, bound(0, cl.time - cl.oldtime, 0.1), origin, origin, vec3_origin, vec3_origin, NULL, 0, false, true, NULL, NULL, 1);
}
if (e->render.internaleffects & (INTEF_FLAG1QW | INTEF_FLAG2QW))
{
len = 1.0f / len;
VectorScale(vel, len, vel);
// pass time as count so that trails that are time based (such as an emitter) will emit properly as long as they don't use trailspacing
- CL_ParticleTrail(trailtype, bound(0, cl.time - cl.oldtime, 0.1), e->persistent.trail_origin, origin, vel, vel, e, e->state_current.glowcolor, false, true, NULL, NULL);
+ CL_ParticleTrail(trailtype, bound(0, cl.time - cl.oldtime, 0.1), e->persistent.trail_origin, origin, vel, vel, e, e->state_current.glowcolor, false, true, NULL, NULL, 1);
}
// now that the entity has survived one trail update it is allowed to
// leave a real trail on later frames
{
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)
dlightcolor[2] += 1.50f;
}
if (e->render.effects & EF_FLAME)
- CL_ParticleTrail(EFFECT_EF_FLAME, 1, origin, origin, vec3_origin, vec3_origin, NULL, 0, true, false, NULL, NULL);
+ CL_ParticleTrail(EFFECT_EF_FLAME, 1, origin, origin, vec3_origin, vec3_origin, NULL, 0, true, false, NULL, NULL, 1);
if (e->render.effects & EF_STARDUST)
- CL_ParticleTrail(EFFECT_EF_STARDUST, 1, origin, origin, vec3_origin, vec3_origin, NULL, 0, true, false, NULL, NULL);
+ CL_ParticleTrail(EFFECT_EF_STARDUST, 1, origin, origin, vec3_origin, vec3_origin, NULL, 0, true, false, NULL, NULL, 1);
}
// muzzleflash fades over time, and is offset a bit
if (e->persistent.muzzleflash > 0 && r_refdef.scene.numlights < MAX_DLIGHTS)
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, 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);
if (e->state_current.traileffectnum)
trailtype = (effectnameindex_t)e->state_current.traileffectnum;
if (trailtype)
- CL_ParticleTrail(trailtype, 1, origin, origin, vec3_origin, vec3_origin, NULL, e->state_current.glowcolor, true, false, NULL, NULL);
+ CL_ParticleTrail(trailtype, 1, origin, origin, vec3_origin, vec3_origin, NULL, e->state_current.glowcolor, true, false, NULL, NULL, 1);
// don't show entities with no modelindex (note: this still shows
// entities which have a modelindex that resolved to a NULL model)
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)
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]));