summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGargaj <gargaj@conspiracy.hu>2015-11-07 13:32:52 +0100
committerGargaj <gargaj@conspiracy.hu>2015-11-07 13:32:52 +0100
commitad1e24e50b9784c8f476091cf3842402065c28dc (patch)
tree2d5bf2c5a28ef912aaf5968f6bd7e457b9673532
parentimplement pushing/shoving based on @NiLSPACE's suggestion (diff)
downloadcuberite-ad1e24e50b9784c8f476091cf3842402065c28dc.tar
cuberite-ad1e24e50b9784c8f476091cf3842402065c28dc.tar.gz
cuberite-ad1e24e50b9784c8f476091cf3842402065c28dc.tar.bz2
cuberite-ad1e24e50b9784c8f476091cf3842402065c28dc.tar.lz
cuberite-ad1e24e50b9784c8f476091cf3842402065c28dc.tar.xz
cuberite-ad1e24e50b9784c8f476091cf3842402065c28dc.tar.zst
cuberite-ad1e24e50b9784c8f476091cf3842402065c28dc.zip
-rw-r--r--src/Entities/Pawn.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index eb503caa6..5ca0c6126 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -63,14 +63,14 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
// we only push other mobs, boats and minecarts
- if (a_Entity->GetEntityType() != etMonster && a_Entity->GetEntityType() != etMinecart && a_Entity->GetEntityType() != etBoat)
+ if ((a_Entity->GetEntityType() != etMonster) && (a_Entity->GetEntityType() != etMinecart) && (a_Entity->GetEntityType() != etBoat))
{
return false;
}
Vector3d v3Delta = a_Entity->GetPosition() - m_Pusher->GetPosition();
- v3Delta.y = 0.0; // we only push sideways
- v3Delta *= 1.0 / v3Delta.Length(); // we push harder if we're close
+ v3Delta.y = 0.0; // we only push sideways
+ v3Delta *= 1.0 / v3Delta.Length(); // we push harder if we're close
// QUESTION: is there an additional multiplier for this? current shoving seems a bit weak
a_Entity->AddSpeed(v3Delta);