Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2019-05-22 00:00:00Z and 2019-05-23 00:00:00Z
Avatar
is there a reason, that messages have a targetID?
Avatar
whispers?
Avatar
ah, from client to server
16:37
from server to client, there is no reason
Avatar
whisper source
16:38
ah, wait
16:38
if a client sends to a targetID, the message shouldnt contain that target ID
16:38
any other client shouldn't recieve a whisper anyways
Avatar
well you have to differentiate outgoing and ingoing whispers
Avatar
but yeah you can more or less ignore it
Avatar
sendID is usefull, but if you recieve a whisper it is always for you, all informations are provided
16:40
I think the targetID field is useless
Avatar
if you send a whisper, it is sent back by the server afaik, so you know it was sent properly
16:40
if(Line.m_ClientID == LocalCID && Line.m_TargetID >= 0) Graphics()->QuadsSetSubset(1, 0, 0, 1); // To else if(Line.m_TargetID == LocalCID) Graphics()->QuadsSetSubset(0, 0, 1, 1); // From
Avatar
so its only purpose is to divide ingoing and outgoing whispers
Avatar
it could be compressed, yes
Avatar
can't you do it by sourceID?
16:42
sendID? Since if you recieve a whisper with your own ID it must be outgoing
Avatar
what is sourceid
16:42
FromID
16:42
From?
Avatar
yeah, you can probably compress that stuff
Avatar
okay, just wondering ^^ so TargetID is useless 😄
Avatar
it's a bit more complicated than that. you can self-whisper actually
Avatar
but yeah it could be removed/compressed
Avatar
why should I ever selfwhisper?
Avatar
no reason
16:44
it's just not restricted (edited)
Avatar
but servers and clients use that protocol now so there is little benefit to try to break it to get some benefits
Avatar
"never touch a running system"
Avatar
Love that phrase
Exported 36 message(s)