<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks Andrew. I think I’ve got my answer and will throw it out.<div class=""><br class=""></div><div class="">It took me a while to confirm that I wasn’t messing up big-endian / little-endian again. But 0 is 0 regardless of endianness ;-)</div><div class=""><br class=""></div><div class="">Darrell</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 3, 2020, at 12:43 PM, Andrew Sillers <<a href="mailto:apsillers@gmail.com" class="">apsillers@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Not an answer per se, but my client also throws away SP #14 (after optionally logging it, it does nothing else): <a href="https://github.com/apsillers/html5-netrek/blob/master/js/packets.js#L579" class="">https://github.com/apsillers/html5-netrek/blob/master/js/packets.js#L579</a><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Andrew</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 3, 2020, 2:45 PM Darrell Root <<a href="mailto:darrellroot@mac.com" class="">darrellroot@mac.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><br class=""></div><div class="">I login to <a href="http://pickled.netrek.org/" target="_blank" rel="noreferrer" class="">pickled.netrek.org</a> as guest. No t-mode in progress. Right at the start my client receives a SP_STATUS packet:</div><div class=""><br class=""></div><div class="">struct status_spacket { /* SP_STATUS py-struct "!bbxxIIIIIL" #14 */<br class=""> char type;<br class=""> char tourn;<br class=""> char pad1;<br class=""> char pad2;<br class=""> u_int armsbomb;<br class=""> u_int planets;<br class=""> u_int kills;<br class=""> u_int losses;<br class=""> u_int time;<br class=""> U_LONG timeprod;<br class="">};<br class=""><br class=""></div><div class="">That’s 28 bytes long. Here are the bytes:</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><span style="color:#5170ff" class=""><b class="">(lldb) </b></span><b class="">po data</b></div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">▿ 28 bytes</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - count : 28</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> ▿ pointer : 0x00006000002fc9e0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - pointerValue : 105553119398368</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> ▿ bytes : 28 elements</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 0 : 14</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 1 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 2 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 3 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 4 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 5 : 13</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 6 : 101</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 7 : 235</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 8 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 9 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 10 : 204</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 11 : 190</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 12 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 13 : 12</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 14 : 38</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 15 : 249</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 16 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 17 : 12</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 18 : 124</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 19 : 118</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 20 : 3</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 21 : 158</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 22 : 220</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 23 : 147</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 24 : 42</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 25 : 198</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 26 : 119</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 27 : 106</div></div><div class=""><br class=""></div><div class=""><div class=""><b class="">Lets look at armsbomb, which is bytes 4 through 7 inclusive interpreted as an unsigned int.</b></div><div class=""><b class=""><br class=""></b></div><div class=""><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 4 : 0</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 5 : 13</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 6 : 101</div><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> - 7 : 235</div></div><div class=""><br class=""></div></div><div class="">Why are those not all 0? I just joined the game as guest? My code interprets that as 878059 armsBomb.</div><div class=""><br class=""></div><div class="">I just switched my username to “username5” (brand new user) and got the same values. So it’s not a cumulative for “username guest for all time”. Looks like it might be cumulative for the server.</div><div class=""><br class=""></div><div class="">Is SP_STATUS 14 a server-wide stat? If yes then perhaps I should just throw the data I get from it away in my client (and use SP_STATS 23 instead).</div><div class=""><br class=""></div><div class="">Darrell</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><br class=""></div></div><div class=""><br class=""></div></div>_______________________________________________<br class="">
netrek-dev mailing list<br class="">
<a href="mailto:netrek-dev@us.netrek.org" target="_blank" rel="noreferrer" class="">netrek-dev@us.netrek.org</a><br class="">
<a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" rel="noreferrer noreferrer" target="_blank" class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br class="">
</blockquote></div>
_______________________________________________<br class="">netrek-dev mailing list<br class=""><a href="mailto:netrek-dev@us.netrek.org" class="">netrek-dev@us.netrek.org</a><br class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev<br class=""></div></blockquote></div><br class=""></div></body></html>