m_yaw = readF1000(is);
m_hp = readS16(is);
num_messages = readU8(is);
- } else if (version == 0) { // In PROTOCOL_VERSION 13
- m_name = deSerializeString(is);
- m_is_player = readU8(is);
- m_position = readV3F1000(is);
- m_yaw = readF1000(is);
- m_hp = readS16(is);
- num_messages = readU8(is);
} else {
errorstream<<"GenericCAO: Unsupported init data version"
<<std::endl;
v3s16 GenericCAO::getLightPosition()
{
- return floatToInt(m_position + v3f(0, 0.5 * BS, 0), BS);
+ if (m_is_player)
+ return floatToInt(m_position + v3f(0, 0.5 * BS, 0), BS);
+
+ return floatToInt(m_position, BS);
}
void GenericCAO::updateNodePos()