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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user