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
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;
}