mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
- fixed PointOnSide caclulation for dynamic lights.
This commit is contained in:
parent
bf2b61f61c
commit
273c1ea510
3 changed files with 4 additions and 5 deletions
|
@ -560,7 +560,7 @@ void ADynamicLight::CollectWithinRadius(const DVector3 &pos, subsector_t *subSec
|
||||||
if (seg->sidedef && seg->linedef && seg->linedef->validcount != ::validcount)
|
if (seg->sidedef && seg->linedef && seg->linedef->validcount != ::validcount)
|
||||||
{
|
{
|
||||||
// light is in front of the seg
|
// 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;
|
seg->linedef->validcount = validcount;
|
||||||
touching_sides = AddLightNode(&seg->sidedef->lighthead, seg->sidedef, this, touching_sides);
|
touching_sides = AddLightNode(&seg->sidedef->lighthead, seg->sidedef, this, touching_sides);
|
||||||
|
|
|
@ -547,7 +547,7 @@ inline int GLDrawList::CompareSprites(SortNode * a,SortNode * b)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
static GLDrawList * gd;
|
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);
|
return gd->CompareSprites(*(SortNode**)a,*(SortNode**)b);
|
||||||
}
|
}
|
||||||
|
@ -838,7 +838,7 @@ void GLDrawList::DrawDecals()
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
static GLDrawList * sortinfo;
|
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;
|
const GLDrawItem * di1 = (const GLDrawItem *)a;
|
||||||
GLWall * w1=&sortinfo->walls[di1->index];
|
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));
|
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;
|
const GLDrawItem * di1 = (const GLDrawItem *)a;
|
||||||
GLFlat * w1=&sortinfo->flats[di1->index];
|
GLFlat * w1=&sortinfo->flats[di1->index];
|
||||||
|
|
|
@ -84,7 +84,6 @@ typedef unsigned char byte;
|
||||||
typedef float FLOAT;
|
typedef float FLOAT;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); }
|
inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); }
|
||||||
#define __cdecl
|
|
||||||
#define _access(a,b) access(a,b)
|
#define _access(a,b) access(a,b)
|
||||||
#endif
|
#endif
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
|
Loading…
Reference in a new issue