From b414e918833999ae0c2b11cefd864ad3c07fc18f Mon Sep 17 00:00:00 2001 From: archshift Date: Tue, 2 Sep 2014 22:56:39 -0700 Subject: EntityEffect.cpp: Enable 1.8's leaping potion --- src/Entities/EntityEffect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Entities') diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp index 3e28392f4..a33955a6a 100644 --- a/src/Entities/EntityEffect.cpp +++ b/src/Entities/EntityEffect.cpp @@ -34,6 +34,7 @@ cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage) case 0x08: return cEntityEffect::effWeakness; case 0x09: return cEntityEffect::effStrength; case 0x0a: return cEntityEffect::effSlowness; + case 0x0b: return cEntityEffect::effJumpBoost; case 0x0c: return cEntityEffect::effInstantDamage; case 0x0d: return cEntityEffect::effWaterBreathing; case 0x0e: return cEntityEffect::effInvisibility; @@ -41,7 +42,6 @@ cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage) // No effect potions case 0x00: case 0x07: - case 0x0b: // Will be potion of leaping in 1.8 case 0x0f: { break; -- cgit v1.2.3 From 1cc65b626462ca3e5aff1619e51450b5d33ff717 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 3 Sep 2014 10:29:10 +0200 Subject: Fixed style and alpha-sorting. --- src/Entities/Entity.cpp | 4 ++-- src/Entities/EntityEffect.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 89d1cffa1..9bcdcffeb 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -387,7 +387,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) case cMonster::mtGhast: case cMonster::mtZombiePigman: case cMonster::mtMagmaCube: - { + { break; }; default: StartBurning(BurnTicks * 20); @@ -417,7 +417,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) } if (!Player->IsOnGround()) - { + { if ((a_TDI.DamageType == dtAttack) || (a_TDI.DamageType == dtArrowAttack)) { a_TDI.FinalDamage += 2; diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp index a33955a6a..f08755674 100644 --- a/src/Entities/EntityEffect.cpp +++ b/src/Entities/EntityEffect.cpp @@ -34,11 +34,11 @@ cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage) case 0x08: return cEntityEffect::effWeakness; case 0x09: return cEntityEffect::effStrength; case 0x0a: return cEntityEffect::effSlowness; - case 0x0b: return cEntityEffect::effJumpBoost; + case 0x0b: return cEntityEffect::effJumpBoost; case 0x0c: return cEntityEffect::effInstantDamage; case 0x0d: return cEntityEffect::effWaterBreathing; case 0x0e: return cEntityEffect::effInvisibility; - + // No effect potions case 0x00: case 0x07: -- cgit v1.2.3 From 472efa8174626a00ffdf5b39e1a44ac419cd3698 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 3 Sep 2014 16:12:43 -0700 Subject: Globals.h: Added Floor and Ciel casting, C++ cast cleanups, etc Snow Golems must also be above 64Y to spawn snow (as of 1.8). --- src/Entities/Entity.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index b9c280b6b..73e8a0d8b 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -27,9 +27,9 @@ return super::GetClass(); \ } -#define POSX_TOINT (int)floor(GetPosX()) -#define POSY_TOINT (int)floor(GetPosY()) -#define POSZ_TOINT (int)floor(GetPosZ()) +#define POSX_TOINT FloorD(GetPosX()) +#define POSY_TOINT FloorD(GetPosY()) +#define POSZ_TOINT FloorD(GetPosZ()) #define POS_TOINT Vector3i(POSXTOINT, POSYTOINT, POSZTOINT) #define GET_AND_VERIFY_CURRENT_CHUNK(ChunkVarName, X, Z) cChunk * ChunkVarName = a_Chunk.GetNeighborChunk(X, Z); if ((ChunkVarName == NULL) || !ChunkVarName->IsValid()) { return; } -- cgit v1.2.3 From e1206568ec71c0e7017c1f764fdc146ba86ce30a Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 3 Sep 2014 16:22:04 -0700 Subject: Revert "Globals.h: Added Floor and Ciel casting, C++ cast cleanups, etc" This reverts commit 472efa8174626a00ffdf5b39e1a44ac419cd3698. Apparently we don't support some of these features quite yet (darn you C++98!) --- src/Entities/Entity.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 73e8a0d8b..b9c280b6b 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -27,9 +27,9 @@ return super::GetClass(); \ } -#define POSX_TOINT FloorD(GetPosX()) -#define POSY_TOINT FloorD(GetPosY()) -#define POSZ_TOINT FloorD(GetPosZ()) +#define POSX_TOINT (int)floor(GetPosX()) +#define POSY_TOINT (int)floor(GetPosY()) +#define POSZ_TOINT (int)floor(GetPosZ()) #define POS_TOINT Vector3i(POSXTOINT, POSYTOINT, POSZTOINT) #define GET_AND_VERIFY_CURRENT_CHUNK(ChunkVarName, X, Z) cChunk * ChunkVarName = a_Chunk.GetNeighborChunk(X, Z); if ((ChunkVarName == NULL) || !ChunkVarName->IsValid()) { return; } -- cgit v1.2.3