Fix line-based slopes' normals.
The game never uses the normals directly yet so it's been left unnoticed ever since. Signed-off-by: Nev3r <apophycens@gmail.com>
This commit is contained in:
parent
8a2e11ffa9
commit
83001a5bc9
|
@ -31,8 +31,8 @@ UINT16 slopecount = 0;
|
||||||
// Calculate line normal
|
// Calculate line normal
|
||||||
void P_CalculateSlopeNormal(pslope_t *slope) {
|
void P_CalculateSlopeNormal(pslope_t *slope) {
|
||||||
slope->normal.z = FINECOSINE(slope->zangle>>ANGLETOFINESHIFT);
|
slope->normal.z = FINECOSINE(slope->zangle>>ANGLETOFINESHIFT);
|
||||||
slope->normal.x = -FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.x);
|
slope->normal.x = FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.x);
|
||||||
slope->normal.y = -FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.y);
|
slope->normal.y = FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Setup slope via 3 vertexes.
|
/// Setup slope via 3 vertexes.
|
||||||
|
@ -51,7 +51,6 @@ static void ReconfigureViaVertexes (pslope_t *slope, const vector3_t v1, const v
|
||||||
if (vec1.z == 0 && vec2.z == 0)
|
if (vec1.z == 0 && vec2.z == 0)
|
||||||
{
|
{
|
||||||
/// \todo Fix fully flat cases.
|
/// \todo Fix fully flat cases.
|
||||||
CONS_Printf("Please fix me\n");
|
|
||||||
|
|
||||||
slope->zangle = slope->xydirection = 0;
|
slope->zangle = slope->xydirection = 0;
|
||||||
slope->zdelta = slope->d.x = slope->d.y = 0;
|
slope->zdelta = slope->d.x = slope->d.y = 0;
|
||||||
|
|
Loading…
Reference in New Issue