Mapster32 crash fix and a couple of small projectile system changes

git-svn-id: https://svn.eduke32.com/eduke32@252 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-07-30 01:48:52 +00:00
parent 564b220add
commit 665a322312
4 changed files with 23 additions and 9 deletions

View file

@ -2391,11 +2391,10 @@ void moveweapons(void)
j = spawn(i,thisprojectile[i].trail);
if (thisprojectile[i].toffset != 0)
sprite[j].z += (thisprojectile[i].toffset<<8);
else
sprite[j].z += (1<<8);
if (thisprojectile[i].txrepeat >= 0) sprite[j].xrepeat=thisprojectile[i].txrepeat;
if (thisprojectile[i].tyrepeat >= 0) sprite[j].yrepeat=thisprojectile[i].tyrepeat;
if (thisprojectile[i].txrepeat >= 0)
sprite[j].xrepeat=thisprojectile[i].txrepeat;
if (thisprojectile[i].tyrepeat >= 0)
sprite[j].yrepeat=thisprojectile[i].tyrepeat;
}
}

View file

@ -2824,8 +2824,19 @@ void Keys3d(void)
Bsprintf(tempbuf,"LOCK");
if(tempbuf[0] != 0)
{
printext256(searchx+4+2,searchy+4+2,0,-1,tempbuf,!(xdimgame > 640));
printext256(searchx+4,searchy+4,whitecol,-1,tempbuf,!(xdimgame > 640));
i = (Bstrlen(tempbuf)<<3)+6;
if((searchx+i) < (xdim-1))
i = 0;
else i = (searchx+i)-(xdim-1);
if((searchy+16) < (ydim-1))
j = 0;
else j = (searchy+16)-(ydim-1);
// printext16(searchx+6-i,searchy+6-j,11,-1,tempbuf,0);
printext256(searchx+4+2-i,searchy+4+2-j,0,-1,tempbuf,!(xdimgame > 640));
printext256(searchx+4-i,searchy+4-j,whitecol,-1,tempbuf,!(xdimgame > 640));
// printext256(searchx+4+2,searchy+4+2,0,-1,tempbuf,!(xdimgame > 640));
// printext256(searchx+4,searchy+4,whitecol,-1,tempbuf,!(xdimgame > 640));
}
if(helpon==1)
{

View file

@ -5581,7 +5581,8 @@ void InitProjectiles(void)
projectile[i].extra = 100;
projectile[i].decal = BULLETHOLE;
projectile[i].trail = -1;
projectile[i].tnum = projectile[i].toffset = 0;
projectile[i].tnum = 0;
projectile[i].toffset = 1;
projectile[i].txrepeat = projectile[i].tyrepeat = -1;
projectile[i].drop = projectile[i].range = 0;
projectile[i].cstat = -1;

View file

@ -160,7 +160,10 @@ void hitscantrail(long x1, long y1, long z1, long x2, long y2, long z2, short an
n = ((FindDistance2D(x1-x2,y1-y2))>>8)+1;
z1 += (projectile[atwith].toffset<<8)+1024;
if(projectile[atwith].toffset != 0)
z1 += (projectile[atwith].toffset<<8);
z1 += 1024;
xv = (x2-x1)/n;
yv = (y2-y1)/n;