]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_save.c
pr_comp: Add the rest of FTEQW's opcodes
[xonotic/darkplaces.git] / sv_save.c
index 3c7940b8afae637524e3dfb2287eaac1fbe4a69f..a08e33a58b37cd965bf5ce62867ddd4f205d90bf 100644 (file)
--- a/sv_save.c
+++ b/sv_save.c
@@ -185,7 +185,6 @@ void SV_Savegame_f(cmd_state_t *cmd)
 {
        prvm_prog_t *prog = SVVM_prog;
        char    name[MAX_QPATH];
-       qbool deadflag = false;
 
        if (!sv.active)
        {
@@ -193,25 +192,11 @@ void SV_Savegame_f(cmd_state_t *cmd)
                return;
        }
 
-       deadflag = cl.islocalgame && svs.clients[0].active && PRVM_serveredictfloat(svs.clients[0].edict, deadflag);
-
-       if (cl.islocalgame)
+       if(host.hook.SV_CanSave)
        {
-               // singleplayer checks
-               if (cl.intermission)
-               {
-                       Con_Print("Can't save in intermission.\n");
-                       return;
-               }
-
-               if (deadflag)
-               {
-                       Con_Print("Can't savegame with a dead player\n");
+               if(!host.hook.SV_CanSave())
                        return;
-               }
        }
-       else
-               Con_Print(CON_WARN "Warning: saving a multiplayer game may have strange results when restored (to properly resume, all players must join in the same player slots and then the game can be reloaded).\n");
 
        if (Cmd_Argc(cmd) != 2)
        {