Open mrdude2478 opened 1 year ago
In ioq3\code\qcommon\common.c we can add our own keygen so that the user can generate their own key.
Code mod: Replace this line: Q_strncpyz( key, ikey, 17 );
With this:
//start of keygen static char charset[] = "237abcdghjlprstw"; char *randomString = NULL; srand ( time(NULL) ); int length = sizeof(charset)-1; randomString = malloc(length +1); if (randomString) { for (int n = 0;n < length;n++) { int key = rand() % (int)(sizeof(charset) -1); randomString[n] = charset[key]; } randomString[length] = '\0'; } //end of keygen Q_strncpyz( key, randomString, 17 );
At the top of the file add this: //keygen stuff
//keygen stuff
Regards.
In ioq3\code\qcommon\common.c we can add our own keygen so that the user can generate their own key.
Code mod: Replace this line: Q_strncpyz( key, ikey, 17 );
With this:
At the top of the file add this: //keygen stuff
include
//keygen stuff
Regards.