summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Hunsinger <mike.hunsinger@gmail.com>2014-01-24 04:01:08 +0100
committerMike Hunsinger <mike.hunsinger@gmail.com>2014-01-24 04:01:08 +0100
commit9926ea58e841af94ded4ea55e409020c732f6cb7 (patch)
tree563edff908999ed3b4a6736fc6315dda7b45c823 /src
parentFixed spacing and doxycomments. (diff)
downloadcuberite-9926ea58e841af94ded4ea55e409020c732f6cb7.tar
cuberite-9926ea58e841af94ded4ea55e409020c732f6cb7.tar.gz
cuberite-9926ea58e841af94ded4ea55e409020c732f6cb7.tar.bz2
cuberite-9926ea58e841af94ded4ea55e409020c732f6cb7.tar.lz
cuberite-9926ea58e841af94ded4ea55e409020c732f6cb7.tar.xz
cuberite-9926ea58e841af94ded4ea55e409020c732f6cb7.tar.zst
cuberite-9926ea58e841af94ded4ea55e409020c732f6cb7.zip
Diffstat (limited to 'src')
-rw-r--r--src/Entities/Player.cpp6
-rw-r--r--src/UI/Window.cpp24
2 files changed, 15 insertions, 15 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 64cd334d1..54de4dee9 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1389,8 +1389,8 @@ void cPlayer::TossHeldItem(char a_Amount)
}
}
- double vX = 0, vY = 0, vZ = 0;
- EulerToVector(-GetYaw(), GetPitch(), vZ, vX, vY);
+ double vX = 0, vY = 0, vZ = 0;
+ EulerToVector(-GetYaw(), GetPitch(), vZ, vX, vY);
vY = -vY * 2 + 1.f;
m_World->SpawnItemPickups(Drops, GetPosX(), GetEyeHeight(), GetPosZ(), vX * 3, vY * 3, vZ * 3, true); // 'true' because created by player
}
@@ -1402,7 +1402,7 @@ void cPlayer::TossHeldItem(char a_Amount)
void cPlayer::TossPickup(const cItem & a_Item)
{
cItems Drops;
- Drops.push_back(a_Item);
+ Drops.push_back(a_Item);
double vX = 0, vY = 0, vZ = 0;
EulerToVector(-GetYaw(), GetPitch(), vZ, vX, vY);
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 4261a58d9..dd058b304 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -170,7 +170,7 @@ void cWindow::Clicked(
const cItem & a_ClickedItem
)
{
- cPluginManager * PlgMgr = cRoot::Get()->GetPluginManager();
+ cPluginManager * PlgMgr = cRoot::Get()->GetPluginManager();
if (a_WindowID != m_WindowID)
{
LOGWARNING("%s: Wrong window ID (exp %d, got %d) received from \"%s\"; ignoring click.", __FUNCTION__, m_WindowID, a_WindowID, a_Player.GetName().c_str());
@@ -181,15 +181,15 @@ void cWindow::Clicked(
{
case caRightClickOutside:
{
- if (PlgMgr->CallHookPlayerTossingItem(a_Player))
+ if (PlgMgr->CallHookPlayerTossingItem(a_Player))
{
// A plugin doesn't agree with the tossing. The plugin itself is responsible for handling the consequences (possible inventory mismatch)
return;
}
- if (a_Player.IsGameModeCreative())
- {
- a_Player.TossPickup(a_ClickedItem);
- }
+ if (a_Player.IsGameModeCreative())
+ {
+ a_Player.TossPickup(a_ClickedItem);
+ }
// Toss one of the dragged items:
a_Player.TossHeldItem();
@@ -203,10 +203,10 @@ void cWindow::Clicked(
return;
}
- if (a_Player.IsGameModeCreative())
- {
- a_Player.TossPickup(a_ClickedItem);
- }
+ if (a_Player.IsGameModeCreative())
+ {
+ a_Player.TossPickup(a_ClickedItem);
+ }
// Toss all dragged items:
a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
@@ -285,8 +285,8 @@ bool cWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse)
// Checks whether the player is still holding an item
if (a_Player.IsDraggingItem())
{
- LOGD("Player holds item! Dropping it...");
- a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
+ LOGD("Player holds item! Dropping it...");
+ a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
}
cClientHandle * ClientHandle = a_Player.GetClientHandle();