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

This commit is contained in:
terminx 2009-01-14 10:40:30 +00:00
parent 3fa676fde8
commit 0ae4eac11e
3 changed files with 29 additions and 35 deletions

View file

@ -408,9 +408,7 @@ typedef struct BPACK {
typedef struct { typedef struct {
vec3_t pos; vec3_t pos;
int16_t hitsprite; int16_t hitsprite, hitwall, hitsect;
int16_t hitwall;
int16_t hitsect;
} hitdata_t; } hitdata_t;
int32_t preinitengine(void); // a partial setup of the engine used for launch windows int32_t preinitengine(void); // a partial setup of the engine used for launch windows

View file

@ -479,7 +479,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
int32_t retval; int32_t retval;
int16_t dasectnum, cd; int16_t dasectnum, cd;
int32_t bg = A_CheckEnemySprite(&sprite[spritenum]); int32_t bg = A_CheckEnemySprite(&sprite[spritenum]);
int32_t dazoff = ((tilesizy[sprite[spritenum].picnum]*sprite[spritenum].yrepeat)<<1); int32_t daz;
if (sprite[spritenum].statnum == 5 || (bg && sprite[spritenum].xrepeat < 4)) if (sprite[spritenum].statnum == 5 || (bg && sprite[spritenum].xrepeat < 4))
{ {
@ -493,7 +493,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
dasectnum = sprite[spritenum].sectnum; dasectnum = sprite[spritenum].sectnum;
// daz = sprite[spritenum].z - ; daz = sprite[spritenum].z - ((tilesizy[sprite[spritenum].picnum]*sprite[spritenum].yrepeat)<<1);
if (bg) if (bg)
{ {
@ -502,12 +502,16 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
if (sprite[spritenum].xrepeat > 60) if (sprite[spritenum].xrepeat > 60)
{ {
sprite[spritenum].z -= dazoff; int32_t oz = sprite[spritenum].z;
sprite[spritenum].z = daz;
retval = clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),1024L,(4<<8),(4<<8),cliptype); retval = clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),1024L,(4<<8),(4<<8),cliptype);
sprite[spritenum].z += dazoff; daz = sprite[spritenum].z;
sprite[spritenum].z = oz;
} }
else else
{ {
int32_t oz = sprite[spritenum].z;
if (sprite[spritenum].picnum == LIZMAN) if (sprite[spritenum].picnum == LIZMAN)
cd = 292L; cd = 292L;
else if ((ActorType[sprite[spritenum].picnum]&3)) else if ((ActorType[sprite[spritenum].picnum]&3))
@ -515,9 +519,10 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
else else
cd = 192L; cd = 192L;
sprite[spritenum].z -= dazoff; sprite[spritenum].z = daz;
retval = clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),cd,(4<<8),(4<<8),cliptype); retval = clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),cd,(4<<8),(4<<8),cliptype);
sprite[spritenum].z += dazoff; daz = sprite[spritenum].z;
sprite[spritenum].z = oz;
} }
if (dasectnum < 0 || (dasectnum >= 0 && if (dasectnum < 0 || (dasectnum >= 0 &&
@ -544,18 +549,19 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
} }
else else
{ {
sprite[spritenum].z -= dazoff; int32_t oz = sprite[spritenum].z;
sprite[spritenum].z = daz;
if (sprite[spritenum].statnum == 4) if (sprite[spritenum].statnum == 4)
retval = retval =
clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),8L,(4<<8),(4<<8),cliptype); clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),8L,(4<<8),(4<<8),cliptype);
else else
retval = retval =
clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),(int32_t)(sprite[spritenum].clipdist<<2),(4<<8),(4<<8),cliptype); clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),(int32_t)(sprite[spritenum].clipdist<<2),(4<<8),(4<<8),cliptype);
sprite[spritenum].z += dazoff; daz = sprite[spritenum].z;
} sprite[spritenum].z = oz;
{ }
int32_t daz;
if (dasectnum >= 0) if (dasectnum >= 0)
if ((dasectnum != sprite[spritenum].sectnum)) if ((dasectnum != sprite[spritenum].sectnum))
@ -565,7 +571,6 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
sprite[spritenum].z = daz; sprite[spritenum].z = daz;
else if (retval == 0) else if (retval == 0)
return(16384+dasectnum); return(16384+dasectnum);
}
return(retval); return(retval);
} }
@ -2477,11 +2482,6 @@ static void G_MoveWeapons(void)
for (f=1;f<=ActorExtra[i].projectile.velmult;f++) for (f=1;f<=ActorExtra[i].projectile.velmult;f++)
{ {
vec3_t tmpvect; vec3_t tmpvect;
/*
dax = s->x;
day = s->y;
daz = s->z;
*/
Bmemcpy(&davect,s,sizeof(vec3_t)); Bmemcpy(&davect,s,sizeof(vec3_t));
tmpvect.x = (k*(sintable[(s->ang+512)&2047]))>>14; tmpvect.x = (k*(sintable[(s->ang+512)&2047]))>>14;
@ -2716,9 +2716,7 @@ static void G_MoveWeapons(void)
} }
else else
{ {
// vec3_t tmpvect;
setsprite(i,&davect); setsprite(i,&davect);
// Bmemcpy(&tmpvect, s, sizeof(int32_t) * 3);
A_DamageWall(i,j,(vec3_t *)s,s->picnum); A_DamageWall(i,j,(vec3_t *)s,s->picnum);
if (ActorExtra[i].projectile.workslike & PROJECTILE_BOUNCESOFFWALLS) if (ActorExtra[i].projectile.workslike & PROJECTILE_BOUNCESOFFWALLS)
@ -3037,10 +3035,8 @@ static void G_MoveWeapons(void)
} }
else else
{ {
vec3_t tmpvect;
setsprite(i,&davect); setsprite(i,&davect);
Bmemcpy(&tmpvect, s, sizeof(vec3_t)); A_DamageWall(i,j,(vec3_t *)s,s->picnum);
A_DamageWall(i,j,&tmpvect,s->picnum);
if (s->picnum == FREEZEBLAST) if (s->picnum == FREEZEBLAST)
{ {

View file

@ -328,7 +328,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
p = -1; p = -1;
sa = s->ang; sa = s->ang;
Bmemcpy(&srcvect,s,sizeof(vec3_t)); Bmemcpy(&srcvect,s,sizeof(vec3_t));
srcvect.z -= ((s->yrepeat*tilesizy[s->picnum])<<1)+(4<<8); srcvect.z -= (((s->yrepeat*tilesizy[s->picnum])<<1)-(4<<8));
if (s->picnum != ROTATEGUN) if (s->picnum != ROTATEGUN)
{ {
@ -439,7 +439,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
sprite[k].xvel = -1; sprite[k].xvel = -1;
sprite[k].ang = getangle(wall[hitinfo.hitwall].x-wall[wall[hitinfo.hitwall].point2].x, sprite[k].ang = getangle(wall[hitinfo.hitwall].x-wall[wall[hitinfo.hitwall].point2].x,
wall[hitinfo.hitwall].y-wall[wall[hitinfo.hitwall].point2].y)+512; wall[hitinfo.hitwall].y-wall[wall[hitinfo.hitwall].point2].y)+512;
Bmemcpy(&sprite[k],hitinfo.pos,sizeof(vec3_t)); Bmemcpy(&sprite[k],&hitinfo.pos,sizeof(vec3_t));
/* /*
sprite[k].x = hitinfo.pos.x; sprite[k].x = hitinfo.pos.x;
sprite[k].y = hitinfo.pos.y; sprite[k].y = hitinfo.pos.y;