diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index a538f3f5d..e050987fc 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -423,13 +423,15 @@ int32_t A_MoveSpriteClipdist(int32_t spritenum, const vec3_t *change, uint32_t c { // use that value } + else if (A_CheckSpriteFlags(spritenum, SFLAG_REALCLIPDIST)) + clipdist = spr->clipdist<<2; else if (badguy) { if (spr->xrepeat > 60) clipdist = 1024; else if (spr->picnum == LIZMAN) clipdist = 292; - else if (A_CheckSpriteTileFlags(spr->picnum, SFLAG_BADGUY)) + else if (A_CheckSpriteFlags(spritenum, SFLAG_BADGUY)) clipdist = spr->clipdist<<2; else clipdist = 192; @@ -733,7 +735,7 @@ static int32_t move_rotfixed_sprite(int32_t j, int32_t pivotspr, int32_t daang) { if ((ROTFIXSPR_STATNUMP(sprite[j].statnum) || ((sprite[j].statnum == STAT_ACTOR || sprite[j].statnum == STAT_ZOMBIEACTOR) && - A_CheckSpriteTileFlags(sprite[j].picnum, SFLAG_ROTFIXED))) && + A_CheckSpriteFlags(j, SFLAG_ROTFIXED))) && actor[j].t_data[7] == (ROTFIXSPR_MAGIC | pivotspr)) { rotatepoint(zerovec, *(vec2_t *)&actor[j].t_data[8], daang & 2047, (vec2_t *)&sprite[j].x); @@ -1035,8 +1037,8 @@ int32_t A_IncurDamage(int32_t sn) break; default: - if (A_CheckSpriteTileFlags(dmg->picnum, SFLAG_PROJECTILE) && - (SpriteProjectile[sn].workslike & PROJECTILE_RPG)) + if (A_CheckSpriteFlags(dmg->owner, SFLAG_PROJECTILE) && + (SpriteProjectile[dmg->owner].workslike & PROJECTILE_RPG)) P_Nudge(p, sn, 2); else P_Nudge(p, sn, 1); @@ -4396,7 +4398,7 @@ ACTOR_STATIC void G_MoveActors(void) { for (SPRITES_OF_SECT(sect, j)) { - if (A_CheckSpriteTileFlags(sprite[j].picnum, SFLAG_GREENSLIMEFOOD)) + if (A_CheckSpriteFlags(j, SFLAG_GREENSLIMEFOOD)) { if (ldist(s,&sprite[j]) < 768 && (klabs(s->z-sprite[j].z)<8192)) //Gulp them { diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 57555b776..4f10761b1 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -258,6 +258,7 @@ enum sflags_t { SFLAG_NOWATERDIP = 0x00200000, SFLAG_HURTSPAWNBLOOD = 0x00400000, SFLAG_GREENSLIMEFOOD = 0x00800000, + SFLAG_REALCLIPDIST = 0x01000000 }; // Custom projectiles "workslike" flags. diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 7cd0fb2cb..34b6b0c1c 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5275,7 +5275,7 @@ int32_t A_Spawn(int32_t j, int32_t pn) if (sp->xrepeat == 0 || sp->yrepeat == 0) sp->xrepeat = sp->yrepeat = 1; - if (A_CheckSpriteTileFlags(sp->picnum, SFLAG_BADGUY)) + if (A_CheckSpriteFlags(i, SFLAG_BADGUY)) { if (ud.monsters_off == 1) { @@ -5286,7 +5286,7 @@ int32_t A_Spawn(int32_t j, int32_t pn) A_Fall(i); - if (A_CheckSpriteTileFlags(sp->picnum, SFLAG_BADGUYSTAYPUT)) + if (A_CheckSpriteFlags(i, SFLAG_BADGUYSTAYPUT)) actor[i].actorstayput = sp->sectnum; g_player[myconnectindex].ps->max_actors_killed++; diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 191d05534..09309bbe0 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -6058,6 +6058,9 @@ static void C_AddDefaultDefinitions(void) C_AddDefinition("SFLAG_NOTELEPORT", SFLAG_NOTELEPORT, LABEL_DEFINE); C_AddDefinition("SFLAG_NODAMAGEPUSH", SFLAG_NODAMAGEPUSH, LABEL_DEFINE); C_AddDefinition("SFLAG_NOWATERDIP", SFLAG_NOWATERDIP, LABEL_DEFINE); + C_AddDefinition("SFLAG_HURTSPAWNBLOOD", SFLAG_HURTSPAWNBLOOD, LABEL_DEFINE); + C_AddDefinition("SFLAG_GREENSLIMEFOOD", SFLAG_GREENSLIMEFOOD, LABEL_DEFINE); + C_AddDefinition("SFLAG_REALCLIPDIST", SFLAG_REALCLIPDIST, LABEL_DEFINE); C_AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE); C_AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE); diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 148407bf3..b03cd2b89 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -983,7 +983,7 @@ static void G_SetupRotfixedSprites(void) // too useful with moving sectors anyway if ((ROTFIXSPR_STATNUMP(spr->statnum) && spr->picnum!=TRIPBOMB) || ((spr->statnum==STAT_ACTOR || spr->statnum==STAT_ZOMBIEACTOR) && - A_CheckSpriteTileFlags(spr->picnum, SFLAG_ROTFIXED))) + A_CheckSpriteFlags(j, SFLAG_ROTFIXED))) { int32_t pivot = i; diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index 5f8304984..613601b67 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -1527,7 +1527,7 @@ void A_DamageWall(int32_t spr, int32_t dawallnum, const vec3_t *pos, int32_t atw walltype *wal = &wall[dawallnum]; if (wal->overpicnum == MIRROR && wal->pal != 4 && - A_CheckSpriteTileFlags(atwith,SFLAG_PROJECTILE) && + A_CheckSpriteFlags(spr,SFLAG_PROJECTILE) && (SpriteProjectile[spr].workslike & PROJECTILE_RPG)) { if (wal->nextwall == -1 || wall[wal->nextwall].pal != 4) @@ -2273,7 +2273,7 @@ void A_DamageObject(int32_t i,int32_t sn) if ((PN != DRONE) && (PN != ROTATEGUN) && (PN != COMMANDER) && (PN < GREENSLIME || PN > GREENSLIME+7)) if (sprite[sn].picnum != FREEZEBLAST) - if (!A_CheckSpriteTileFlags(PN, SFLAG_BADGUY) || A_CheckSpriteTileFlags(PN, SFLAG_HURTSPAWNBLOOD)) + if (!A_CheckSpriteFlags(i, SFLAG_BADGUY) || A_CheckSpriteFlags(i, SFLAG_HURTSPAWNBLOOD)) { j = A_Spawn(sn,JIBS6); if (sprite[sn].pal == 6) @@ -2288,7 +2288,7 @@ void A_DamageObject(int32_t i,int32_t sn) if (j >= 0 && sprite[j].picnum == APLAYER && PN != ROTATEGUN && PN != DRONE) if (g_player[P_Get(j)].ps->curr_weapon == SHOTGUN_WEAPON) - if (!A_CheckSpriteTileFlags(PN, SFLAG_BADGUY) || A_CheckSpriteTileFlags(PN, SFLAG_HURTSPAWNBLOOD)) + if (!A_CheckSpriteFlags(i, SFLAG_BADGUY) || A_CheckSpriteFlags(i, SFLAG_HURTSPAWNBLOOD)) { A_Shoot(i,BLOODSPLAT3); A_Shoot(i,BLOODSPLAT1);