Only autosave when health is picked up

This commit is contained in:
Eric Wasylishen 2010-12-22 15:05:53 -07:00
parent aa36b04130
commit 8597423e7a
2 changed files with 9 additions and 9 deletions

View file

@ -617,7 +617,14 @@
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "QuakeSpasm" */;
compatibilityVersion = "Xcode 2.4";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* QuakeSpasm */;
projectDirPath = "";
projectRoot = "";

View file

@ -664,16 +664,9 @@ void Host_ServerFrame (void)
lastautosave = 0;
}
// FIXME: have a sliding scale where autosaving after:
// 30 seconds requires a health of 60
// 45 seconds requires a health of 50
// 60 seconds requires a health of 45
// etc.. or something along those lines
// FIXME: don't autosave if the player's health dropped vs. 3 seconds ago
// Only autosave when health is picked up
if ((sv.time - lastautosave) > 30.0
&& (sv_player->v.health >= 40 || sv_player->v.health > oldhealth))
&& (sv_player->v.health > oldhealth))
{
char command[MAX_QPATH + 10];
sprintf(command, "save auto_%s", sv.name);