diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-16 21:44:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-16 21:44:26 -0500 |
| commit | ce739f6045ec72127491286ea3f3f21e537c1b55 (patch) | |
| tree | f33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.World/Silverfish.cpp | |
| parent | 255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff) | |
| parent | 5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.World/Silverfish.cpp')
| -rw-r--r-- | Minecraft.World/Silverfish.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/Silverfish.cpp b/Minecraft.World/Silverfish.cpp index 5cd4c77e..98f559c9 100644 --- a/Minecraft.World/Silverfish.cpp +++ b/Minecraft.World/Silverfish.cpp @@ -72,7 +72,7 @@ int Silverfish::getDeathSound() bool Silverfish::hurt(DamageSource *source, float dmg) { if (isInvulnerable()) return false; - if (lookForFriends <= 0 && (dynamic_cast<EntityDamageSource *>(source) != NULL || source == DamageSource::magic)) + if (lookForFriends <= 0 && (dynamic_cast<EntityDamageSource *>(source) != nullptr || source == DamageSource::magic)) { // look for friends lookForFriends = 20; @@ -173,7 +173,7 @@ void Silverfish::serverAiStep() } } - if (attackTarget == NULL && !isPathFinding()) + if (attackTarget == nullptr && !isPathFinding()) { // if the silverfish isn't doing anything special, it will merge // with any rock tile it is nearby @@ -193,7 +193,7 @@ void Silverfish::serverAiStep() } } - else if (attackTarget != NULL && !isPathFinding()) + else if (attackTarget != nullptr && !isPathFinding()) { attackTarget = nullptr; } @@ -216,7 +216,7 @@ bool Silverfish::canSpawn() if (Monster::canSpawn()) { shared_ptr<Player> nearestPlayer = level->getNearestPlayer(shared_from_this(), 5.0); - return nearestPlayer == NULL; + return nearestPlayer == nullptr; } return false; } |
