From 9b0ea0366e71b6ed2e7ad1dbe943f3ef5fb059d4 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 17 Dec 2011 18:51:50 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/src/engine.c | 3 +++ polymer/eduke32/source/actors.h | 1 + polymer/eduke32/source/gameexec.c | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 9df3d5aad..52aab6d3c 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -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]; diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 0117dde2f..9f5101bb0 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -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 diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 0fdd8224e..c463fa0f9 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -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)); } }