Author Topic: 2.517 Released  (Read 13384 times)

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: 2.517 Released
« Reply #15 on: July 26, 2006, 09:26:11 AM »
Please use the latest version to fix your compile problems.  If you don't want to upgrade you can fix them yourself, as they are quite trivial.  The easiest way is to selectively download the files you need from source control.

Oliver Smith

  • Full Member
  • ***
  • Posts: 173
  • Karma: 7
  • Oliver Smith
    • View Profile
    • Oliver's blog
Re: 2.517 Released
« Reply #16 on: July 26, 2006, 09:19:04 PM »
Need a sticky in this forum telling us how to get at it :) Incidentlly, it happens I use Source Off Site, could I point that directly at your vault server for read-only access? Or is it web only?

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: 2.517 Released
« Reply #17 on: July 26, 2006, 09:21:27 PM »
I don't know.  Just try it I guess.

Oliver Smith

  • Full Member
  • ***
  • Posts: 173
  • Karma: 7
  • Oliver Smith
    • View Profile
    • Oliver's blog
Re: 2.517 Released
« Reply #18 on: July 27, 2006, 02:51:26 AM »
Ok, *cough*
Need a sticky in this forum telling us how to get at it :)

Don't make me admit I couldn't find the instructions!

DOH!


Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: 2.517 Released
« Reply #19 on: July 27, 2006, 09:53:17 AM »
Oh, sorry I thought you were asking how to get the latest version of RakNet.

The source control instructions are here:

http://www.rakkarsoft.com/raknet/forum/index.php?topic=2.0

Oliver Smith

  • Full Member
  • ***
  • Posts: 173
  • Karma: 7
  • Oliver Smith
    • View Profile
    • Oliver's blog
Re: 2.517 Released
« Reply #20 on: July 31, 2006, 01:51:17 PM »
Some notes on CreatePatch.cpp:

- redefinition of "MIN", suggest you wrap with

#ifndef MIN
# define MIN ...
#endif

or #include <algorithm> and use std::min(...)

- off_t is signed, use size_t if you want unsigned to eliminate sign/unsign warnings

- "unsigned newsize" (etc). Unsigned what? Be aware that while VS allows this it's very port-problematic, including vs Win32 and Win64.

- Oliver

Oliver Smith

  • Full Member
  • ***
  • Posts: 173
  • Karma: 7
  • Oliver Smith
    • View Profile
    • Oliver's blog
Re: 2.517 Released
« Reply #21 on: July 31, 2006, 01:57:20 PM »
   y=y/256;buf[1]=y%256;y-=buf[1];
   y=y/256;buf[2]=y%256;y-=buf[2];

OUCH! Divide AND modulo! Woot! WORK THAT CPU BABY :) Remembering that modulo is usually implemented as

while ( VAL > LIM )
  VAL -= LIM ;

even in Microcode. So perhaps better written as

Code: [Select]
for ( int i =0 ; i < 8 ; ++i )
 {
   // Copy lower 8 bits
   buf[i] = y & 0x255 ;
   // And shift 8 bits down
   y >>= 8 ;
 }

or

  buf[0] = y & 0xff ; y >>= 8 ;
  buf[1] = y & 0xff ; y >>= 8 ;
  buf[2] = y & 0xff ; y >>= 8 ;
  buf[3] = y & 0xff ; y >>= 8 ;
  buf[4] = y & 0xff ; y >>= 8 ;
  buf[5] = y & 0xff ; y >>= 8 ;
  buf[6] = y & 0xff ; y >>= 8 ;
  buf[7] = y & 0x7f ; y >>= 8 ;


- Ol
« Last Edit: July 31, 2006, 02:01:10 PM by Oliver Smith »

Oliver Smith

  • Full Member
  • ***
  • Posts: 173
  • Karma: 7
  • Oliver Smith
    • View Profile
    • Oliver's blog
Re: 2.517 Released
« Reply #22 on: July 31, 2006, 01:58:33 PM »
Any time you're setting > 32 bytes to 0, calling memset is a good bet:

CreatePatch.cpp:130
   for(i=0;i<256;i++) buckets[ i ]=0;

vs

                 memset(buckets, 0, sizeof(buckets));
« Last Edit: July 31, 2006, 02:01:53 PM by Oliver Smith »

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: 2.517 Released
« Reply #23 on: July 31, 2006, 05:52:09 PM »
Thanks for the excellent posts.  I didn't write most of that code but will optimize it.

ChildeHarold

  • Not-a-newbie
  • *
  • Posts: 38
  • Karma: 0
    • View Profile
Re: 2.517 Released
« Reply #24 on: August 01, 2006, 02:43:36 AM »
Trying to update to Raknet 2.517 I got a compiler error:

VoiceComm.obj : error LNK2001: Nichtaufgelöstes externes Symbol "public: char * __thiscall PlayerID::ToString(void)const " (?ToString@PlayerID@@$$FQBEPADXZ)
Release/RakNetPlugin.dll : fatal error LNK1120: 1 unaufgelöste externe Verweise

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: 2.517 Released
« Reply #25 on: August 01, 2006, 09:12:36 AM »
Rebuild all.

ChildeHarold

  • Not-a-newbie
  • *
  • Posts: 38
  • Karma: 0
    • View Profile
Re: 2.517 Released
« Reply #26 on: August 01, 2006, 12:42:34 PM »
the problem remains...

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: 2.517 Released
« Reply #27 on: August 01, 2006, 09:13:04 PM »
The function now takes a boolean input parameter.