git-svn-id: https://svn.eduke32.com/eduke32@577 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2007-09-10 23:38:42 +00:00
parent 0da33eeaa0
commit 1753d91046
5 changed files with 18 additions and 13 deletions

View File

@ -10842,7 +10842,7 @@ void draw2dscreen(long posxe, long posye, short ange, long zoome, short gride)
char pointsize;
col = 6;
pointsize=2;
if (i == pointhighlight || ((wall[i].x == wall[pointhighlight].x) && (wall[i].y == wall[pointhighlight].y)))
if (i == pointhighlight || ((pointhighlight < MAXWALLS) && (wall[i].x == wall[pointhighlight].x) && (wall[i].y == wall[pointhighlight].y)))
{
if (totalclock & 16)
{
@ -10887,7 +10887,7 @@ void draw2dscreen(long posxe, long posye, short ange, long zoome, short gride)
}
if (editstatus == 1)
{
if (j+16384 == pointhighlight || ((sprite[j].x == sprite[pointhighlight-16384].x) && (sprite[j].y == sprite[pointhighlight-16384].y))) {
if (j+16384 == pointhighlight || ((pointhighlight-16384 < MAXSPRITES) && (sprite[j].x == sprite[pointhighlight-16384].x) && (sprite[j].y == sprite[pointhighlight-16384].y))) {
if (totalclock & 32) col += (2<<2);
}
else if ((highlightcnt > 0) && (editstatus == 1))

View File

@ -2865,7 +2865,7 @@ static int SetupOpenGL(int width, int height, int bitspp)
0,0,
width,height,
hWindow,
(HMENU)1,
(HMENU)0,
hInstance,
NULL);
if (!hGLWindow) {

View File

@ -12108,6 +12108,7 @@ FRAGBONUS:
{
int yy = 0, zz;
getpackets();
handleevents();
AudioUpdate();

View File

@ -4508,6 +4508,8 @@ static int parse(void)
{
int distvar = *insptr++, xvar = GetGameVarID(*insptr++, g_i, g_p), yvar = GetGameVarID(*insptr++, g_i, g_p), distx=0;
if (xvar > -1 && xvar < MAXSPRITES && yvar > -1 && yvar < MAXSPRITES)
{
switch (tw)
{
case CON_DIST:
@ -4517,6 +4519,7 @@ static int parse(void)
distx = ldist(&sprite[xvar],&sprite[yvar]);
break;
}
} else OSD_Printf("error: invalid sprite\n");
SetGameVarID(distvar, distx, g_i, g_p);
break;

View File

@ -198,10 +198,11 @@ int checkcursectnums(int sect)
long ldist(spritetype *s1,spritetype *s2)
{
long vx,vy;
long vx,vy,ret;
vx = s1->x - s2->x;
vy = s1->y - s2->y;
return(FindDistance2D(vx,vy) + 1);
ret = FindDistance2D(vx,vy);
return(ret?ret:1);
}
long dist(spritetype *s1,spritetype *s2)