When deleting a player also delete the Multiplayer efficiency file
This commit is contained in:
parent
d17841fbc4
commit
9c4408adb2
|
@ -8,6 +8,7 @@ arch/sdl/window.c, main/automap.c, main/game.c, main/gamecntl.c, main/kconfig.c,
|
||||||
main/kconfig.c, main/newmenu.c: Tidy up newmenu_show/hide_cursor calls
|
main/kconfig.c, main/newmenu.c: Tidy up newmenu_show/hide_cursor calls
|
||||||
main/newmenu.c: Allow user to abort close, for whatever reason (helps with my next commit)
|
main/newmenu.c: Allow user to abort close, for whatever reason (helps with my next commit)
|
||||||
main/gamesave.c, main/newdemo.c, main/object.c, main/object.h, main/state.c: Improved Object signature assignment and made sure there will be no duplicates; Also used short-ranged values only so Demo system won't screw up
|
main/gamesave.c, main/newdemo.c, main/object.c, main/object.h, main/state.c: Improved Object signature assignment and made sure there will be no duplicates; Also used short-ranged values only so Demo system won't screw up
|
||||||
|
main/menu.c: When deleting a player also delete the Multiplayer efficiency file
|
||||||
|
|
||||||
20100127
|
20100127
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -441,7 +441,7 @@ int filename_menu_handler( listbox *lb, d_event *event, file_list *l )
|
||||||
x = nm_messagebox( NULL, 2, TXT_YES, TXT_NO, "%s %s?", TXT_DELETE_DEMO, items[citem]+(((l->mode == FILE_DEMO_MODE) && items[citem][0]=='$')?1:0) );
|
x = nm_messagebox( NULL, 2, TXT_YES, TXT_NO, "%s %s?", TXT_DELETE_DEMO, items[citem]+(((l->mode == FILE_DEMO_MODE) && items[citem][0]=='$')?1:0) );
|
||||||
if (x==0) {
|
if (x==0) {
|
||||||
char * p;
|
char * p;
|
||||||
char plxfile[PATH_MAX];
|
char plxfile[PATH_MAX], efffile[PATH_MAX];
|
||||||
int ret;
|
int ret;
|
||||||
char name[PATH_MAX];
|
char name[PATH_MAX];
|
||||||
|
|
||||||
|
@ -462,6 +462,10 @@ int filename_menu_handler( listbox *lb, d_event *event, file_list *l )
|
||||||
sprintf(plxfile, GameArg.SysUsePlayersDir? "Players/%.8s.plx" : "%.8s.plx", items[citem]);
|
sprintf(plxfile, GameArg.SysUsePlayersDir? "Players/%.8s.plx" : "%.8s.plx", items[citem]);
|
||||||
if (cfexist(plxfile))
|
if (cfexist(plxfile))
|
||||||
PHYSFS_delete(plxfile);
|
PHYSFS_delete(plxfile);
|
||||||
|
// delete EFF file
|
||||||
|
sprintf(efffile, GameArg.SysUsePlayersDir? "Players/%.8s.eff" : "%.8s.eff", items[citem]);
|
||||||
|
if (cfexist(efffile))
|
||||||
|
PHYSFS_delete(efffile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
Loading…
Reference in a new issue