Don't send player updates unless info changed (#389)

This commit is contained in:
in1tiate 2025-01-02 13:20:11 -06:00 committed by GitHub
parent ecc981ae53
commit 3ddd53e121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -502,9 +502,11 @@ QString AOClient::name() const { return m_ooc_name; }
void AOClient::setName(const QString &f_name)
{
if (f_name != m_ooc_name) {
m_ooc_name = f_name;
Q_EMIT nameChanged(m_ooc_name);
}
}
int AOClient::areaId() const
{
@ -513,9 +515,11 @@ int AOClient::areaId() const
void AOClient::setAreaId(const int f_area_id)
{
if (f_area_id != m_current_area) {
m_current_area = f_area_id;
Q_EMIT areaIdChanged(m_current_area);
}
}
QString AOClient::character() const
{
@ -524,17 +528,21 @@ QString AOClient::character() const
void AOClient::setCharacter(const QString &f_character)
{
if (f_character != m_current_char) {
m_current_char = f_character;
Q_EMIT characterChanged(m_current_char);
}
}
QString AOClient::characterName() const { return m_showname; }
void AOClient::setCharacterName(const QString &f_showname)
{
if (f_showname != m_showname) {
m_showname = f_showname;
Q_EMIT characterNameChanged(m_showname);
}
}
void AOClient::setSpectator(bool f_spectator)
{