diff options
author | Mattes D <github@xoft.cz> | 2015-03-21 15:18:17 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-03-21 15:18:17 +0100 |
commit | cc069ccb2a03db87e9de45ee84df9e2bd0b50545 (patch) | |
tree | e25723d95c7724505f7756a0dbbb0d48f68c7ddf /src/Items | |
parent | Unified cByteBuffer types. (diff) | |
download | cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.gz cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.bz2 cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.lz cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.xz cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.zst cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.zip |
Diffstat (limited to 'src/Items')
-rw-r--r-- | src/Items/ItemPotion.h | 2 | ||||
-rw-r--r-- | src/Items/ItemSpawnEgg.h | 2 | ||||
-rw-r--r-- | src/Items/ItemThrowable.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h index 398ef6805..798573846 100644 --- a/src/Items/ItemPotion.h +++ b/src/Items/ItemPotion.h @@ -39,7 +39,7 @@ public: Vector3d Pos = a_Player->GetThrowStartPos(); Vector3d Speed = a_Player->GetLookVector() * 7; - if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, cProjectileEntity::pkSplashPotion, a_Player, &a_Player->GetEquippedItem(), &Speed) < 0) + if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, cProjectileEntity::pkSplashPotion, a_Player, &a_Player->GetEquippedItem(), &Speed) == cEntity::INVALID_ID) { return false; } diff --git a/src/Items/ItemSpawnEgg.h b/src/Items/ItemSpawnEgg.h index dee8a9057..a07e4ef49 100644 --- a/src/Items/ItemSpawnEgg.h +++ b/src/Items/ItemSpawnEgg.h @@ -36,7 +36,7 @@ public: eMonsterType MonsterType = ItemDamageToMonsterType(a_Item.m_ItemDamage); if ( (MonsterType != mtInvalidType) && // Valid monster type - (a_World->SpawnMob(a_BlockX + 0.5, a_BlockY, a_BlockZ + 0.5, MonsterType) >= 0)) // Spawning succeeded + (a_World->SpawnMob(a_BlockX + 0.5, a_BlockY, a_BlockZ + 0.5, MonsterType) != cEntity::INVALID_ID)) // Spawning succeeded { if (!a_Player->IsGameModeCreative()) { diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h index c151c5d3a..cdcbdab3b 100644 --- a/src/Items/ItemThrowable.h +++ b/src/Items/ItemThrowable.h @@ -35,7 +35,7 @@ public: cFastRandom Random; a_World->BroadcastSoundEffect("random.bow", a_Player->GetPosX(), a_Player->GetPosY() - a_Player->GetHeight(), a_Player->GetPosZ(), 0.5f, 0.4f / (Random.NextFloat(1.0f) * 0.4f + 0.8f)); - if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, &a_Player->GetEquippedItem(), &Speed) < 0) + if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, &a_Player->GetEquippedItem(), &Speed) == cEntity::INVALID_ID) { return false; } @@ -135,7 +135,7 @@ public: return false; } - if (a_World->CreateProjectile(a_BlockX + 0.5, a_BlockY + 1, a_BlockZ + 0.5, m_ProjectileKind, a_Player, &a_Player->GetEquippedItem()) < 0) + if (a_World->CreateProjectile(a_BlockX + 0.5, a_BlockY + 1, a_BlockZ + 0.5, m_ProjectileKind, a_Player, &a_Player->GetEquippedItem()) == 0) { return false; } |