mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Only autosave when health is picked up
This commit is contained in:
parent
07bfab72db
commit
93881c3a45
1 changed files with 2 additions and 9 deletions
11
Quake/host.c
11
Quake/host.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue