Add new actor[].flags flag 2048 (SPRITE_NOCLIP), for 'spriteflags' CON usage.

Actors are always moved such that _they_ clip against blocking sprites, even
if their blocking bit is clear. Setting the new bit make them not clip against
anything.  The promary use of this is for decorative moving sprites that are
spawned in masses, such as rain or snow.

git-svn-id: https://svn.eduke32.com/eduke32@2184 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-17 18:51:50 +00:00
parent 60bb16693b
commit 9b0ea0366e
3 changed files with 6 additions and 1 deletions

View file

@ -11969,6 +11969,9 @@ int32_t clipmove(vec3_t *pos, int16_t *sectnum,
if (curspr)
continue; // next sector of this index
if (!dasprclipmask)
continue;
for (j=headspritesect[dasect]; j>=0; j=nextspritesect[j])
{
spr = &sprite[j];

View file

@ -128,6 +128,7 @@ enum sflags_t {
SPRITE_NOLIGHT = 0x00000100,
SPRITE_USEACTIVATOR = 0x00000200,
SPRITE_NULL = 0x00000400, // null sprite in multiplayer
SPRITE_NOCLIP = 0x00000800, // clipmove it with cliptype 0
};
// custom projectiles

View file

@ -670,7 +670,8 @@ dead:
(daxvel*(sintable[angdif&2047]))>>14, vm.g_sp->zvel
};
actor[vm.g_i].movflag = A_MoveSprite(vm.g_i,&tmpvect,CLIPMASK0);
actor[vm.g_i].movflag = A_MoveSprite(
vm.g_i,&tmpvect, (A_CheckSpriteFlags(vm.g_i, SPRITE_NOCLIP) ? 0 : CLIPMASK0));
}
}