project_files/frontlib/net/netprotocol.c
changeset 7497 7e1d72fc03c7
parent 7482 d70a5b0d1190
child 7566 57d343ee382f
equal deleted inserted replaced
7494:e65adfc99f15 7497:7e1d72fc03c7
    73 	}
    73 	}
    74 	flib_team_destroy(tmpTeam);
    74 	flib_team_destroy(tmpTeam);
    75 	return result;
    75 	return result;
    76 }
    76 }
    77 
    77 
    78 flib_scheme *flib_scheme_from_netmsg(flib_metascheme *meta, char **parts) {
    78 flib_scheme *flib_scheme_from_netmsg(char **parts) {
    79 	flib_scheme *result = flib_scheme_create(meta, parts[0]);
    79 	flib_scheme *result = flib_scheme_create(parts[0]);
    80 	if(result) {
    80 	if(result) {
    81 		for(int i=0; i<meta->modCount; i++) {
    81 		for(int i=0; i<flib_meta.modCount; i++) {
    82 			result->mods[i] = !strcmp(parts[i+1], "true");
    82 			result->mods[i] = !strcmp(parts[i+1], "true");
    83 		}
    83 		}
    84 		for(int i=0; i<meta->settingCount; i++) {
    84 		for(int i=0; i<flib_meta.settingCount; i++) {
    85 			result->settings[i] = atoi(parts[i+meta->modCount+1]);
    85 			result->settings[i] = atoi(parts[i+flib_meta.modCount+1]);
    86 		}
    86 		}
    87 	}
    87 	}
    88 	return result;
    88 	return result;
    89 }
    89 }
    90 
    90