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