neworg[2] += 8;
}
trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, neworg, MOVE_NORMAL, ent);
-#if COLLISIONPARANOID >= 1
- {
- int endstuck;
- vec3_t temp;
- VectorCopy(trace.endpos, temp);
- endstuck = SV_Move(temp, ent->v->mins, ent->v->maxs, temp, MOVE_WORLDONLY, ent).startsolid;
-#if COLLISIONPARANOID < 2
- if (trace.startsolid || endstuck)
-#endif
- {
- Con_Printf("%s{e%i:%f %f %f:%f %f %f:%f:%f %f %f%s%s}\n", (trace.startsolid || endstuck) ? "\002" : "", ent - sv.edicts, ent->v->origin[0], ent->v->origin[1], ent->v->origin[2], neworg[0] - ent->v->origin[0], neworg[1] - ent->v->origin[1], neworg[2] - ent->v->origin[2], trace.fraction, trace.endpos[0] - ent->v->origin[0], trace.endpos[1] - ent->v->origin[1], trace.endpos[2] - ent->v->origin[2], trace.startsolid ? " startstuck" : "", endstuck ? " endstuck" : "");
- //Con_Printf("trace %f %f %f : %f : %f %f %f\n", trace.endpos[0], trace.endpos[1], trace.endpos[2], trace.fraction, trace.plane.normal[0], trace.plane.normal[1], trace.plane.normal[2]);
- if (endstuck)
- Cbuf_AddText("disconnect\n");
- }
- }
-#endif
if (trace.fraction == 1)
{
VectorMA(ent->v->origin, time, ent->v->velocity, end);
trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, end, MOVE_NORMAL, ent);
//Con_Printf("trace %f %f %f : %f : %f %f %f\n", trace.endpos[0], trace.endpos[1], trace.endpos[2], trace.fraction, trace.plane.normal[0], trace.plane.normal[1], trace.plane.normal[2]);
-#if COLLISIONPARANOID >= 1
- {
- int endstuck;
- vec3_t temp;
- VectorCopy(trace.endpos, temp);
- endstuck = SV_Move(temp, ent->v->mins, ent->v->maxs, temp, MOVE_WORLDONLY, ent).startsolid;
-#if COLLISIONPARANOID < 2
- if (trace.startsolid || endstuck)
-#endif
- {
- Con_Printf("%s{e%i:%i:%f %f %f:%f %f %f:%f:%f %f %f%s%s}\n", (trace.startsolid || endstuck) ? "\002" : "", ent - sv.edicts, bumpcount, ent->v->origin[0], ent->v->origin[1], ent->v->origin[2], end[0] - ent->v->origin[0], end[1] - ent->v->origin[1], end[2] - ent->v->origin[2], trace.fraction, trace.endpos[0] - ent->v->origin[0], trace.endpos[1] - ent->v->origin[1], trace.endpos[2] - ent->v->origin[2], trace.startsolid ? " startstuck" : "", endstuck ? " endstuck" : "");
- //Con_Printf("trace %f %f %f : %f : %f %f %f\n", trace.endpos[0], trace.endpos[1], trace.endpos[2], trace.fraction, trace.plane.normal[0], trace.plane.normal[1], trace.plane.normal[2]);
- if (endstuck)
- Cbuf_AddText("disconnect\n");
- }
- }
-#endif
/*
if (trace.startsolid)
trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, end, MOVE_NOMONSTERS, ent);
else
trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, end, MOVE_NORMAL, ent);
-#if COLLISIONPARANOID >= 1
- {
- int endstuck;
- vec3_t temp;
- VectorCopy(trace.endpos, temp);
- endstuck = SV_Move(temp, ent->v->mins, ent->v->maxs, temp, MOVE_WORLDONLY, ent).startsolid;
-#if COLLISIONPARANOID < 2
- if (trace.startsolid || endstuck)
-#endif
- {
- Con_Printf("%s{e%i:%f %f %f:%f %f %f:%f:%f %f %f%s%s}\n", (trace.startsolid || endstuck) ? "\002" : "", ent - sv.edicts, ent->v->origin[0], ent->v->origin[1], ent->v->origin[2], end[0] - ent->v->origin[0], end[1] - ent->v->origin[1], end[2] - ent->v->origin[2], trace.fraction, trace.endpos[0] - ent->v->origin[0], trace.endpos[1] - ent->v->origin[1], trace.endpos[2] - ent->v->origin[2], trace.startsolid ? " startstuck" : "", endstuck ? " endstuck" : "");
- //Con_Printf("trace %f %f %f : %f : %f %f %f\n", trace.endpos[0], trace.endpos[1], trace.endpos[2], trace.fraction, trace.plane.normal[0], trace.plane.normal[1], trace.plane.normal[2]);
- if (endstuck)
- Cbuf_AddText("disconnect\n");
- }
- }
-#endif
VectorCopy (trace.endpos, ent->v->origin);
// FIXME: turn players specially
ent->v->angles[1] += trace.fraction * pushangles[1];
SV_LinkEdict (ent, true);
- if (trace.fraction < 1 && trace.ent && (!((int)ent->v->flags & FL_ONGROUND) || ent->v->groundentity != EDICT_TO_PROG(trace.ent)))
+ if (trace.ent && (!((int)ent->v->flags & FL_ONGROUND) || ent->v->groundentity != EDICT_TO_PROG(trace.ent)))
SV_Impact (ent, trace.ent);
return trace;
}
-n darkplaces: server is starting before the "port" cvar is set by commandline and scripts? (yummyluv)
-n darkplaces: typing ip in join game menu should show 'trying' and 'no response' after a while, or 'no network' if networking is not initialized (yummyluv)
-n dpmod: make grapple off-hand (joe hill)
+0 darkplaces: mini scoreboard (the deathmatch overlay) shows player names multiple times in some cases?
4 darkplaces: add qw protocol support (making darkplaces work as a qwcl client) (tell Fuh)
0 darkplaces: add some cl_explosions_ cvars to control settings - start alpha, end alpha, start size, end size, life time (Supajoe, Mercury)
0 darkplaces: "edict -1" and other invalid numbers cause an error, should just complain (Supajoe)
0 darkplaces: change sky handling to draw sky even if fog is on (Deej, C0burn)
3 darkplaces: redesign startup script handling to simply stop execution until video inits, when it encounters certain commands (instead of delaying those commands)
d darkplaces: physics bug: rotating bmodels stop when the player blocks them instead of pushing the player
-0 darkplaces: physics bug: fiends can leap through the player
+d darkplaces: physics bug: fiends can leap through the player (thanks to Tomaz for massive assistance in tracking down this longstanding bug)
-n darkplaces: physics bug: bmodels (doors, etc) hurt player if player pushes against it, and sometimes gets stuck for a frame when falling onto it (Andrew A. Gilevsky)
0 darkplaces: add gl_polyblend cvar to control amount of viewblend effect (Andrew A. Gilevsky)
0 darkplaces: add r_waterwarp cvar to control amount of viewwarping underwater (Andrew A. Gilevsky)
if (ent->v->movetype != MOVETYPE_PUSH)
Host_Error("SV_ClipMoveToEntity: SOLID_BSP without MOVETYPE_PUSH");
}
+ Matrix4x4_CreateFromQuakeEntity(&matrix, ent->v->origin[0], ent->v->origin[1], ent->v->origin[2], ent->v->angles[0], ent->v->angles[1], ent->v->angles[2], 1);
}
+ else
+ Matrix4x4_CreateTranslate(&matrix, ent->v->origin[0], ent->v->origin[1], ent->v->origin[2]);
- Matrix4x4_CreateFromQuakeEntity(&matrix, ent->v->origin[0], ent->v->origin[1], ent->v->origin[2], ent->v->angles[0], ent->v->angles[1], ent->v->angles[2], 1);
Matrix4x4_Invert_Simple(&imatrix, &matrix);
Matrix4x4_Transform(&imatrix, start, starttransformed);
Matrix4x4_Transform(&imatrix, end, endtransformed);
else
Collision_ClipTrace_Box(&trace, ent->v->mins, ent->v->maxs, starttransformed, mins, maxs, endtransformed, SUPERCONTENTS_SOLID, SUPERCONTENTS_SOLID);
- if (trace.fraction < 1 || trace.startsolid)
+ if (trace.fraction < 1)
{
- trace.ent = ent;
VectorLerp(start, trace.fraction, end, trace.endpos);
VectorCopy(trace.plane.normal, tempnormal);
Matrix4x4_Transform3x3(&matrix, tempnormal, trace.plane.normal);
touch->e->areagridmarknumber = sv_areagrid_marknumber;
sv_areagrid_stats_entitychecks++;
+ // LordHavoc: this box comparison isn't much use with the high resolution areagrid
+ /*
if (clip->boxmins[0] > touch->v->absmax[0]
|| clip->boxmaxs[0] < touch->v->absmin[0]
|| clip->boxmins[1] > touch->v->absmax[1]
|| clip->boxmins[2] > touch->v->absmax[2]
|| clip->boxmaxs[2] < touch->v->absmin[2])
continue;
+ */
if (clip->type == MOVE_NOMONSTERS && touch->v->solid != SOLID_BSP)
continue;
if (clip->passedict)
{
+ if (touch == clip->passedict)
+ continue;
if (!clip->passedict->v->size[0] && !touch->v->size[0])
continue; // points never interact
if (PROG_TO_EDICT(touch->v->owner) == clip->passedict)
continue;
}
- if (touch == clip->passedict)
- continue;
if (touch->v->solid == SOLID_TRIGGER)
{
ED_Print(touch);
}
// might interact, so do an exact clip
- if (touch->v->solid == SOLID_BSP)
- trace = SV_ClipMoveToEntity(touch, clip->start, clip->mins, clip->maxs, clip->end, clip->type);
- else if ((int)touch->v->flags & FL_MONSTER)
+ if ((int)touch->v->flags & FL_MONSTER)
trace = SV_ClipMoveToEntity(touch, clip->start, clip->mins2, clip->maxs2, clip->end, clip->type);
else
trace = SV_ClipMoveToEntity(touch, clip->start, clip->mins, clip->maxs, clip->end, clip->type);
if (trace.startsolid)
{
clip->trace.startsolid = true;
- //if (!clip->trace.ent)
- // clip->trace.ent = trace.ent;
+ if (clip->trace.fraction == 1)
+ clip->trace.ent = touch;
}
if (trace.inopen)
clip->trace.inopen = true;
clip->trace.ent = touch;
}
clip->trace.startsupercontents |= trace.startsupercontents;
- //if (clip->trace.allsolid)
- // return;
}
}
SV_Move
==================
*/
+#if COLLISIONPARANOID >= 1
+trace_t SV_Move_(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, edict_t *passedict)
+#else
trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, edict_t *passedict)
+#endif
{
moveclip_t clip;
vec3_t hullmins, hullmaxs;
// clip to world
clip.trace = SV_ClipMoveToEntity(sv.edicts, clip.start, clip.mins, clip.maxs, clip.end, clip.type);
+ clip.trace.ent = sv.edicts;
if (clip.type == MOVE_WORLDONLY)
- //if (clip.trace.allsolid)
return clip.trace;
if (clip.type == MOVE_MISSILE)
return clip.trace;
}
+#if COLLISIONPARANOID >= 1
+trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, edict_t *passedict)
+{
+ int endstuck;
+ trace_t trace;
+ vec3_t temp;
+ trace = SV_Move_(start, mins, maxs, end, type, passedict);
+ if (passedict)
+ {
+ VectorCopy(trace.endpos, temp);
+ endstuck = SV_Move_(temp, mins, maxs, temp, type, passedict).startsolid;
+#if COLLISIONPARANOID < 3
+ if (trace.startsolid || endstuck)
+#endif
+ Con_Printf("%s{e%i:%f %f %f:%f %f %f:%f:%f %f %f%s%s}\n", (trace.startsolid || endstuck) ? "\002" : "", passedict ? passedict - sv.edicts : -1, passedict->v->origin[0], passedict->v->origin[1], passedict->v->origin[2], end[0] - passedict->v->origin[0], end[1] - passedict->v->origin[1], end[2] - passedict->v->origin[2], trace.fraction, trace.endpos[0] - passedict->v->origin[0], trace.endpos[1] - passedict->v->origin[1], trace.endpos[2] - passedict->v->origin[2], trace.startsolid ? " startstuck" : "", endstuck ? " endstuck" : "");
+ }
+ return trace;
+}
+#endif
+
int SV_PointSuperContents(const vec3_t point)
{
return SV_Move(point, vec3_origin, vec3_origin, point, MOVE_NOMONSTERS, NULL).startsupercontents;