Allow disabling savefile UID checking in sysconf
This commit is contained in:
@@ -502,6 +502,13 @@ register struct obj *otmp;
|
||||
else otmp->spe = fruitadd(oldf->fname, (struct fruit *)0);
|
||||
}
|
||||
|
||||
|
||||
#ifdef SYSCF
|
||||
#define SYSOPT_CHECK_SAVE_UID sysopt.check_save_uid
|
||||
#else
|
||||
#define SYSOPT_CHECK_SAVE_UID TRUE
|
||||
#endif
|
||||
|
||||
STATIC_OVL
|
||||
boolean
|
||||
restgamestate(fd, stuckid, steedid)
|
||||
@@ -517,7 +524,7 @@ unsigned int *stuckid, *steedid;
|
||||
unsigned long uid;
|
||||
|
||||
mread(fd, (genericptr_t) &uid, sizeof uid);
|
||||
if (uid != (unsigned long)getuid()) { /* strange ... */
|
||||
if (SYSOPT_CHECK_SAVE_UID && uid != (unsigned long)getuid()) { /* strange ... */
|
||||
/* for wizard mode, issue a reminder; for others, treat it
|
||||
as an attempt to cheat and refuse to restore this file */
|
||||
pline("Saved game was not yours.");
|
||||
|
||||
Reference in New Issue
Block a user