Skip to content
Browse files

implemented vanilla engine background flag

  • Loading branch information...
1 parent bb63267 commit 432227687c107e9690a298cd9d0f277b16a2606a @AvengerTeamBG AvengerTeamBG committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 gemrb/core/Projectile.h
View
9 gemrb/core/Projectile.h
@@ -61,6 +61,7 @@ namespace GemRB {
#define PSF_LOOPING 4 //looping sound
#define PSF_LOOPING2 8 //looping second sound
#define PSF_IGNORE_CENTER 16
+#define PSF_BACKGROUND 32
//gemrb specific internal flag
#define PSF_SOUND2 0x80000000//already started sound2
@@ -70,7 +71,7 @@ namespace GemRB {
#define PTF_TINT 8 //tint projectile
#define PTF_SHADOW 32 //has shadow bam
#define PTF_LIGHT 64 //has light shadow
-#define PTF_BLEND 128 //blend colours (use alpha)
+#define PTF_BLEND 128 //blend colours (use alpha)
#define PTF_BRIGHTEN 256 //brighten alpha
//projectile extended travel flags (gemrb specific)
@@ -296,7 +297,11 @@ class GEM_EXPORT Projectile
}
//no idea if projectiles got height, using y
inline int GetHeight() const {
- //if projectile is drawn behind target
+ //if projectile is drawn absolutely on the ground
+ if (SFlags&PSF_BACKGROUND) {
+ return 0;
+ }
+ //if projectile is drawn behind target (not behind everyone)
if (ExtFlags&PEF_BACKGROUND) {
return Pos.y-BACK_DEPTH;
}

0 comments on commit 4322276

Please sign in to comment.
Something went wrong with that request. Please try again.