From ad22922393c7982b885840960222de64ff96ad36 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 14 Jan 2018 18:44:45 +0000 Subject: Rename cEntity swim states (#3996) * Replace cEntity:m_IsSubmerged with m_IsHeadInWater * Replace cEntity:m_IsSwimming with m_IsInWater * Add API documentation for new symbols * Apply SetSwimState to all entities, not just mobs and players * Pickups now use IsOnFire to check if they are on fire before destruction Fixes #3987 --- Server/Plugins/APIDump/APIDesc.lua | 44 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'Server') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index aeb217b7a..594e281e6 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -3724,6 +3724,46 @@ local Hash = cCryptoHash.sha1HexString("DataToHash") }, Notes = "Returns true if the entity is invisible", }, + IsInFire = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if any part of the entity is in a fire block", + }, + IsInLava = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if any part of the entity is in a lava block", + }, + IsInWater = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if any part of the entity is in a water block", + }, + IsHeadInWater = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if the entity's head is in a water block", + }, IsItemFrame = { Returns = @@ -3872,7 +3912,7 @@ local Hash = cCryptoHash.sha1HexString("DataToHash") Type = "boolean", }, }, - Notes = "Returns true if the mob or player is submerged in water (head is in a water block). Note, this function is only updated with mobs or players.", + Notes = "Returns true if the entity's head is in a water block Currently deprecated in favour of IsHeadInWater()", }, IsSwimming = { @@ -3882,7 +3922,7 @@ local Hash = cCryptoHash.sha1HexString("DataToHash") Type = "boolean", }, }, - Notes = "Returns true if the mob or player is swimming in water (feet are in a water block). Note, this function is only updated with mobs or players.", + Notes = "Returns true if any part of the entity is in a water block. Note, this function is only updated with mobs or players. Currently deprecated in favour of IsInWater()", }, IsTicking = { -- cgit v1.2.3