コード例 #1
0
void clinterface::sendwinddelta()
{
   msrand(time(NULL));
   char buf[100];
   int speed=mrand()%11-5;
   int direction=mrand()%21-10;
   sprintf(buf,"SERVER:*:%d:%d", speed, direction);
   sendpacket(NULL, NULL, NULL, CLIENT_ALL, -1, CL_WDELTA, buf);
}
コード例 #2
0
ファイル: 15131_1.c プロジェクト: B-Rich/osf_db
void BOcrypt(unsigned char *buff, int len)
{
int y;

if (!len)
return;

msrand(getkey());
for (y = 0; y < len; y++)
buff[y] = buff[y] ^ (mrand()%256);
}
コード例 #3
0
ファイル: mscr.cpp プロジェクト: mikelsv/opensource
bool msrrand16(unsigned char *b){
memcpy(b, mscrrand.cach, 16); msrand(1);
for(int i=0; i<16; i++){ *b+=mscrrand.cach[i]; b++; }
return 1;
}