- fixed PointOnSide caclulation for dynamic lights.

This commit is contained in:
Christoph Oelckers 2016-04-11 19:59:39 +02:00
parent bf2b61f61c
commit 273c1ea510
3 changed files with 4 additions and 5 deletions

View file

@ -560,7 +560,7 @@ void ADynamicLight::CollectWithinRadius(const DVector3 &pos, subsector_t *subSec
if (seg->sidedef && seg->linedef && seg->linedef->validcount != ::validcount)
{
// light is in front of the seg
if ((pos.Y - seg->v1->fY()) * (seg->v2->fX() - seg->v1->fX()) + (seg->v1->fX() - pos.X * (seg->v2->fY() - seg->v1->fY())) <= 0)
if ((pos.Y - seg->v1->fY()) * (seg->v2->fX() - seg->v1->fX()) + (seg->v1->fX() - pos.X) * (seg->v2->fY() - seg->v1->fY()) <= 0)
{
seg->linedef->validcount = validcount;
touching_sides = AddLightNode(&seg->sidedef->lighthead, seg->sidedef, this, touching_sides);

View file

@ -547,7 +547,7 @@ inline int GLDrawList::CompareSprites(SortNode * a,SortNode * b)
//
//==========================================================================
static GLDrawList * gd;
int __cdecl CompareSprite(const void * a,const void * b)
int CompareSprite(const void * a,const void * b)
{
return gd->CompareSprites(*(SortNode**)a,*(SortNode**)b);
}
@ -838,7 +838,7 @@ void GLDrawList::DrawDecals()
//==========================================================================
static GLDrawList * sortinfo;
static int __cdecl diwcmp (const void *a, const void *b)
static int diwcmp (const void *a, const void *b)
{
const GLDrawItem * di1 = (const GLDrawItem *)a;
GLWall * w1=&sortinfo->walls[di1->index];
@ -850,7 +850,7 @@ static int __cdecl diwcmp (const void *a, const void *b)
return ((w1->flags & 3) - (w2->flags & 3));
}
static int __cdecl difcmp (const void *a, const void *b)
static int difcmp (const void *a, const void *b)
{
const GLDrawItem * di1 = (const GLDrawItem *)a;
GLFlat * w1=&sortinfo->flats[di1->index];

View file

@ -84,7 +84,6 @@ typedef unsigned char byte;
typedef float FLOAT;
template <typename T>
inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); }
#define __cdecl
#define _access(a,b) access(a,b)
#endif
#ifndef _WIN32