Blizzard, Bsw, Esw . . .

Discussion about Helbreath Server Files.
Post Reply
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

Long ago, I investigated those spell damage area, using special fixed damlage spells and fixed HP dummies, but recentlly I tryed to improve DirectionBow to strike all creatures from bowman to target AND creatures behind...

It failed....

I investigated further "line" damages spells and Direction Bow, and found that a little buggy. Siementec uses iErr =0, and 0 is wrong...
Image

So I investigated further. 1 is by far a beter value for iErr, but not optimal...
I discovered than choosing half of the biggest from dx & dy (rounded up) is very nice....
Image

So there is the fix:
void GetPoint2(int x0, int y0, int x1, int y1, int * pX, int * pY, int * pError, int iCount)
{register int dx, dy, x_inc, y_inc, error, index;
register int iResultX, iResultY, iCnt = 0;
if ((x0 == x1) && (y0 == y1))
{ *pX = x0;
  *pY = y0;
  return;
}
error = *pError;
iResultX = x0;
iResultY = y0;
dx = x1-x0;
dy = y1-y0;
if(dx>=0)
{ x_inc = 1;
}else
{ x_inc = -1;
  dx = -dx;
}
if(dy>=0)
{ y_inc = 1;
}else
{ y_inc = -1;
  dy = -dy;
}
if(dx>dy)
{  error = (dx+1)/2;
        Form1->Label1->Caption = error;
        for(index = 0; index <= iCount; index++)
  { error += dy;
  if(error > dx)
  { error -= dx;
    iResultY += y_inc;
  }
  iResultX += x_inc;
  iCnt++;
  if (iCnt >= iCount) goto CALC_OK;
  }
}else
{ error = (dy+1)/2;     
        Form1->Label1->Caption = error;
        for(index = 0; index <= iCount; index++)
  { error += dx;
  if(error > dy)
  { error -= dy;
    iResultX += x_inc;
  }
  iResultY += y_inc;
  iCnt++;
  if (iCnt >= iCount) goto CALC_OK;
  }
}
CALC_OK:;
*pX = iResultX;
*pY = iResultY;
*pError = error;
}
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
LittleDemon
Regular
Posts: 46
Joined: Sun Feb 22, 2004 7:50 am

Post by LittleDemon »

Impressive ;)

I've got nothing much to say but i though i'd just post in respect.
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Uh Oh...weird can you detail more information please B)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

No need, just compare HBx2.24b or Siementec server2.20 versions with mine.
Very few changes...
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
RageIlluminati
Outpost bitch
Posts: 559
Joined: Wed Mar 30, 2005 6:45 am

Post by RageIlluminati »

LittleDemon wrote: I've got nothing much to say
I have...

don't you have something better to do than waste your time on a dead game? :blink:
<img src='http://helbreath.pri.ee/userbars/hbest-gamemaster2.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/hbsoccer-owner.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/scorpa-rider.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/logout-master.jpg' border='0' alt='user posted image' /> <br>.<br>................................Ego sum Rage, flagellum Dei!<br><br>The problem with America is stupidity. I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? (bash.org)
kahn
Loyal fan
Posts: 203
Joined: Thu Oct 07, 2004 1:20 am

Post by kahn »

sweety snoopy im try it out after work hey ware can i dl ur item editor i have heard u have nice 1 but i waz searchig post and didnt find it and i cant erember what ur web page is
:(
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

don't you have something better to do than waste your time on a dead game?
Currentlly not...
ur item editor i have heard
HBmaster?
I just submitted shinning new v6.20 version on this forum...
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
Post Reply