auto-forceteam (new autoteam), shuffleteams (skill sorted), autosendmap fix, better arenaspawn distribution (unfinished)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2443 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2008-08-30 22:10:04 +00:00
parent f15b98402f
commit 863450c0e2
14 changed files with 272 additions and 60 deletions
+12
View File
@@ -144,6 +144,18 @@ const char *findfile(const char *filename, const char *mode)
return filename;
}
int getfilesize(const char *filename)
{
const char *found = findfile(filename, "rb");
if(!found) return -1;
FILE *fp = fopen(found, "rb");
if(!fp) return -1;
fseek(fp, 0, SEEK_END);
int len = ftell(fp);
fclose(fp);
return len;
}
FILE *openfile(const char *filename, const char *mode)
{
const char *found = findfile(filename, mode);