// now we can transform the data
for(i = 0; i < brush->numplanes; ++i)
{
- Matrix4x4_TransformPositivePlane(matrix, brush->planes[i].normal[0], brush->planes[i].normal[1], brush->planes[i].normal[2], brush->planes[i].dist, brush->planes[i].normal);
+ Matrix4x4_TransformPositivePlane(matrix, brush->planes[i].normal[0], brush->planes[i].normal[1], brush->planes[i].normal[2], brush->planes[i].dist, brush->planes[i].normal_and_dist);
}
for(i = 0; i < brush->numedgedirs; ++i)
{
// transform plane
// NOTE: this relies on plane.dist being directly after plane.normal
- Matrix4x4_TransformPositivePlane(matrix, trace->plane.normal[0], trace->plane.normal[1], trace->plane.normal[2], trace->plane.dist, trace->plane.normal);
+ Matrix4x4_TransformPositivePlane(matrix, trace->plane.normal[0], trace->plane.normal[1], trace->plane.normal[2], trace->plane.dist, trace->plane.normal_and_dist);
}
void Collision_ClipToWorld(trace_t *trace, dp_model_t *model, const vec3_t tstart, const vec3_t mins, const vec3_t maxs, const vec3_t tend, int hitsupercontents, float extend)
// transform plane
// NOTE: this relies on plane.dist being directly after plane.normal
- Matrix4x4_TransformPositivePlane(matrix, trace->plane.normal[0], trace->plane.normal[1], trace->plane.normal[2], trace->plane.dist, trace->plane.normal);
+ Matrix4x4_TransformPositivePlane(matrix, trace->plane.normal[0], trace->plane.normal[1], trace->plane.normal[2], trace->plane.dist, trace->plane.normal_and_dist);
}
void Collision_ClipLineToWorld(trace_t *trace, dp_model_t *model, const vec3_t tstart, const vec3_t tend, int hitsupercontents, float extend, qboolean hitsurfaces)
VectorCopy(start, trace->endpos);
// transform plane
// NOTE: this relies on plane.dist being directly after plane.normal
- Matrix4x4_TransformPositivePlane(matrix, trace->plane.normal[0], trace->plane.normal[1], trace->plane.normal[2], trace->plane.dist, trace->plane.normal);
+ Matrix4x4_TransformPositivePlane(matrix, trace->plane.normal[0], trace->plane.normal[1], trace->plane.normal[2], trace->plane.dist, trace->plane.normal_and_dist);
}
void Collision_ClipPointToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, int hitsupercontents)
Matrix4x4_Invert_Full(&mat, viewmatrix);
Matrix4x4_FromVectors(viewmatrix, forward, left, up, origin);
Matrix4x4_Concat(&matq, viewmatrix, &mat);
- Matrix4x4_TransformPositivePlane(&matq, clipplane->normal[0], clipplane->normal[1], clipplane->normal[2], clipplane->dist, &clipplane->normal[0]);
+ Matrix4x4_TransformPositivePlane(&matq, clipplane->normal[0], clipplane->normal[1], clipplane->normal[2], clipplane->dist, clipplane->normal_and_dist);
}
}
CSQC_END
if (protocol == PROTOCOL_QUAKEWORLD)
{
unsigned int sequence, sequence_ack;
- int reliable_ack, reliable_message;
+ qboolean reliable_ack, reliable_message;
int count;
//int qport;
}
conn->packetsReceived++;
- reliable_message = (sequence >> 31) & 1;
- reliable_ack = (sequence_ack >> 31) & 1;
+ reliable_message = (sequence >> 31) != 0;
+ reliable_ack = (sequence_ack >> 31) != 0;
sequence &= ~(1<<31);
sequence_ack &= ~(1<<31);
if (sequence <= conn->qw.incoming_sequence)