mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-13 07:21:31 +00:00
Only autosave when health is picked up
This commit is contained in:
parent
aa36b04130
commit
8597423e7a
2 changed files with 9 additions and 9 deletions
|
@ -617,7 +617,14 @@
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "QuakeSpasm" */;
|
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "QuakeSpasm" */;
|
||||||
compatibilityVersion = "Xcode 2.4";
|
compatibilityVersion = "Xcode 2.4";
|
||||||
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 1;
|
hasScannedForEncodings = 1;
|
||||||
|
knownRegions = (
|
||||||
|
English,
|
||||||
|
Japanese,
|
||||||
|
French,
|
||||||
|
German,
|
||||||
|
);
|
||||||
mainGroup = 29B97314FDCFA39411CA2CEA /* QuakeSpasm */;
|
mainGroup = 29B97314FDCFA39411CA2CEA /* QuakeSpasm */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
|
|
11
Quake/host.c
11
Quake/host.c
|
@ -664,16 +664,9 @@ void Host_ServerFrame (void)
|
||||||
lastautosave = 0;
|
lastautosave = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: have a sliding scale where autosaving after:
|
// Only autosave when health is picked up
|
||||||
// 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
|
|
||||||
|
|
||||||
if ((sv.time - lastautosave) > 30.0
|
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];
|
char command[MAX_QPATH + 10];
|
||||||
sprintf(command, "save auto_%s", sv.name);
|
sprintf(command, "save auto_%s", sv.name);
|
||||||
|
|
Loading…
Reference in a new issue