summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-14 22:44:04 +0100
committerMattes D <github@xoft.cz>2015-03-14 22:44:04 +0100
commit65d2ef32e920580ab5408bd1e2fcb3da42c8eec1 (patch)
treebfbef765d31cf6b78490f013dad5d600e785195e /src/Entities
parentMerge pull request #1808 from tumultenrx/master (diff)
parentReverted non-functional changes (diff)
downloadcuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.gz
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.bz2
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.lz
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.xz
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.tar.zst
cuberite-65d2ef32e920580ab5408bd1e2fcb3da42c8eec1.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Player.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index e02c66bd3..3dae58dc1 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -314,8 +314,18 @@ public:
// tolua_end
- /** Sets a player's in-bed state; we can't be sure plugins will keep this value updated, so no exporting */
- void SetIsInBed(bool a_Flag) { m_bIsInBed = a_Flag; }
+ /** Sets a player's in-bed state
+ We can't be sure plugins will keep this value updated, so no exporting
+ If value is false (not in bed), will update players of the fact that they have been ejected from the bed
+ */
+ void SetIsInBed(bool a_Flag)
+ {
+ m_bIsInBed = a_Flag;
+ if (!a_Flag)
+ {
+ GetWorld()->BroadcastEntityAnimation(*this, 2);
+ }
+ }
/** Starts eating the currently equipped item. Resets the eating timer and sends the proper animation packet */
void StartEating(void);