mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
misc. beautifying some game code...
git-svn-id: https://svn.eduke32.com/eduke32@2192 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6b913a39aa
commit
f12bd9f13d
4 changed files with 62 additions and 69 deletions
|
@ -8061,7 +8061,7 @@ int32_t A_CheckEnemyTile(int32_t pn)
|
|||
return 0;
|
||||
}
|
||||
|
||||
inline int32_t A_CheckEnemySprite(spritetype *s)
|
||||
inline int32_t A_CheckEnemySprite(const spritetype *s)
|
||||
{
|
||||
return(A_CheckEnemyTile(s->picnum));
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ extern projectile_t ProjectileData[MAXTILES];
|
|||
extern projectile_t SpriteProjectile[MAXSPRITES];
|
||||
|
||||
void A_AddToDeleteQueue(int32_t i);
|
||||
int32_t A_CheckEnemySprite(spritetype *s);
|
||||
int32_t A_CheckEnemySprite(const spritetype *s);
|
||||
int32_t A_CheckEnemyTile(int32_t pn);
|
||||
int32_t A_CheckSwitchTile(int32_t i);
|
||||
void A_DeleteSprite(int32_t s);
|
||||
|
|
|
@ -6510,8 +6510,7 @@ skip:
|
|||
}
|
||||
|
||||
if (s->statnum == STAT_DUMMYPLAYER || A_CheckEnemySprite(s) || A_CheckSpriteFlags(t->owner,SPRITE_SHADOW) || (s->picnum == APLAYER && s->owner >= 0))
|
||||
if (t->statnum != TSPR_TEMP && s->picnum != EXPLOSION2 && s->picnum != HANGLIGHT && s->picnum != DOMELITE)
|
||||
if (s->picnum != HOTMEAT)
|
||||
if (t->statnum != TSPR_TEMP && s->picnum != EXPLOSION2 && s->picnum != HANGLIGHT && s->picnum != DOMELITE && s->picnum != HOTMEAT)
|
||||
{
|
||||
if (actor[i].dispicnum < 0)
|
||||
{
|
||||
|
|
|
@ -282,13 +282,13 @@ void A_GetZLimits(int32_t iActor)
|
|||
|
||||
// if (s->statnum == STAT_PLAYER || s->statnum == STAT_STANDABLE || s->statnum == STAT_ZOMBIEACTOR || s->statnum == STAT_ACTOR || s->statnum == STAT_PROJECTILE)
|
||||
{
|
||||
int32_t hz,lz,zr = 127L;
|
||||
int32_t hz,lz,zr = 127;
|
||||
int32_t cstat = s->cstat;
|
||||
|
||||
s->cstat = 0;
|
||||
|
||||
if (s->statnum == STAT_PROJECTILE)
|
||||
zr = 4L;
|
||||
zr = 4;
|
||||
|
||||
s->z -= ZOFFSET;
|
||||
getzrange((vec3_t *)s,s->sectnum,&actor[iActor].ceilingz,&hz,&actor[iActor].floorz,&lz,zr,CLIPMASK0);
|
||||
|
@ -298,24 +298,18 @@ void A_GetZLimits(int32_t iActor)
|
|||
|
||||
if ((lz&49152) == 49152 && (sprite[lz&(MAXSPRITES-1)].cstat&48) == 0)
|
||||
{
|
||||
const spritetype *hitspr = &sprite[lz&(MAXSPRITES-1)];
|
||||
|
||||
lz &= (MAXSPRITES-1);
|
||||
if (A_CheckEnemySprite(&sprite[lz]) && sprite[lz].pal != 1)
|
||||
{
|
||||
if (s->statnum != 4)
|
||||
|
||||
if ((A_CheckEnemySprite(hitspr) && hitspr->pal != 1 && s->statnum != STAT_PROJECTILE)
|
||||
|| (hitspr->picnum == APLAYER && A_CheckEnemySprite(s)))
|
||||
{
|
||||
actor[iActor].dispicnum = -4; // No shadows on actors
|
||||
s->xvel = -256;
|
||||
A_SetSprite(iActor,CLIPMASK0);
|
||||
}
|
||||
}
|
||||
else if (sprite[lz].picnum == APLAYER && A_CheckEnemySprite(s))
|
||||
{
|
||||
actor[iActor].dispicnum = -4; // No shadows on actors
|
||||
s->xvel = -256;
|
||||
A_SetSprite(iActor,CLIPMASK0);
|
||||
}
|
||||
else if (s->statnum == STAT_PROJECTILE && sprite[lz].picnum == APLAYER)
|
||||
if (s->owner == lz)
|
||||
else if (s->statnum == STAT_PROJECTILE && hitspr->picnum == APLAYER && s->owner==lz)
|
||||
{
|
||||
actor[iActor].ceilingz = sector[s->sectnum].ceilingz;
|
||||
actor[iActor].floorz = sector[s->sectnum].floorz;
|
||||
|
|
Loading…
Reference in a new issue