diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
| commit | 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch) | |
| tree | 69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/Enchantment.cpp | |
| parent | a9be52c41a02d207233199e98898fe7483d7e817 (diff) | |
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.World/Enchantment.cpp')
| -rw-r--r-- | Minecraft.World/Enchantment.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Minecraft.World/Enchantment.cpp b/Minecraft.World/Enchantment.cpp index c2f981a6..ae638b27 100644 --- a/Minecraft.World/Enchantment.cpp +++ b/Minecraft.World/Enchantment.cpp @@ -7,34 +7,34 @@ EnchantmentArray Enchantment::enchantments = EnchantmentArray( 256 ); vector<Enchantment *> Enchantment::validEnchantments; -Enchantment *Enchantment::allDamageProtection = nullptr; -Enchantment *Enchantment::fireProtection = nullptr; -Enchantment *Enchantment::fallProtection = nullptr; -Enchantment *Enchantment::explosionProtection = nullptr; -Enchantment *Enchantment::projectileProtection = nullptr; -Enchantment *Enchantment::drownProtection = nullptr; -Enchantment *Enchantment::waterWorker = nullptr; -Enchantment *Enchantment::thorns = nullptr; +Enchantment *Enchantment::allDamageProtection = NULL; +Enchantment *Enchantment::fireProtection = NULL; +Enchantment *Enchantment::fallProtection = NULL; +Enchantment *Enchantment::explosionProtection = NULL; +Enchantment *Enchantment::projectileProtection = NULL; +Enchantment *Enchantment::drownProtection = NULL; +Enchantment *Enchantment::waterWorker = NULL; +Enchantment *Enchantment::thorns = NULL; // weapon -Enchantment *Enchantment::damageBonus = nullptr; -Enchantment *Enchantment::damageBonusUndead = nullptr; -Enchantment *Enchantment::damageBonusArthropods = nullptr; -Enchantment *Enchantment::knockback = nullptr; -Enchantment *Enchantment::fireAspect = nullptr; -Enchantment *Enchantment::lootBonus = nullptr; +Enchantment *Enchantment::damageBonus = NULL; +Enchantment *Enchantment::damageBonusUndead = NULL; +Enchantment *Enchantment::damageBonusArthropods = NULL; +Enchantment *Enchantment::knockback = NULL; +Enchantment *Enchantment::fireAspect = NULL; +Enchantment *Enchantment::lootBonus = NULL; // digger -Enchantment *Enchantment::diggingBonus = nullptr; -Enchantment *Enchantment::untouching = nullptr; -Enchantment *Enchantment::digDurability = nullptr; -Enchantment *Enchantment::resourceBonus = nullptr; +Enchantment *Enchantment::diggingBonus = NULL; +Enchantment *Enchantment::untouching = NULL; +Enchantment *Enchantment::digDurability = NULL; +Enchantment *Enchantment::resourceBonus = NULL; // bows -Enchantment *Enchantment::arrowBonus = nullptr; -Enchantment *Enchantment::arrowKnockback = nullptr; -Enchantment *Enchantment::arrowFire = nullptr; -Enchantment *Enchantment::arrowInfinite = nullptr; +Enchantment *Enchantment::arrowBonus = NULL; +Enchantment *Enchantment::arrowKnockback = NULL; +Enchantment *Enchantment::arrowFire = NULL; +Enchantment *Enchantment::arrowInfinite = NULL; void Enchantment::staticCtor() { @@ -70,7 +70,7 @@ void Enchantment::staticCtor() for(unsigned int i = 0; i < 256; ++i) { Enchantment *enchantment = enchantments[i]; - if (enchantment != nullptr) + if (enchantment != NULL) { validEnchantments.push_back(enchantment); } @@ -79,7 +79,7 @@ void Enchantment::staticCtor() void Enchantment::_init(int id) { - if (enchantments[id] != nullptr) + if (enchantments[id] != NULL) { app.DebugPrintf("Duplicate enchantment id!"); #ifndef _CONTENT_PACKAGE |
