X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=prvm_cmds.c;h=e06c23f75a94a13390c4c05defba8f4864362633;hp=c68c3ab818e71263db7fe65cbc70c59dc9a80a1d;hb=e572ffa56f0883c1ac7c9cca37da359ddbac551c;hpb=d191d2aae518b7fe21132a6c159554a350966978 diff --git a/prvm_cmds.c b/prvm_cmds.c index c68c3ab8..e06c23f7 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1448,7 +1448,7 @@ void VM_fopen(void) modestring = "wb"; break; default: - Con_Printf("VM_fopen: %s no such mode %i (valid: 0 = read, 1 = append, 2 = write)\n", PRVM_NAME, mode); + Con_Printf("VM_fopen: %s: no such mode %i (valid: 0 = read, 1 = append, 2 = write)\n", PRVM_NAME, mode); PRVM_G_FLOAT(OFS_RETURN) = -3; return; } @@ -1459,9 +1459,17 @@ void VM_fopen(void) VM_FILES[filenum] = FS_Open(va("%s", filename), modestring, false, false); if (VM_FILES[filenum] == NULL) + { + if (developer.integer) + Con_Printf("VM_fopen: %s: %s mode %s failed\n", PRVM_NAME, filename, modestring); PRVM_G_FLOAT(OFS_RETURN) = -1; + } else + { + if (developer.integer) + Con_Printf("VM_fopen: %s: %s mode %s opened as #%i\n", PRVM_NAME, filename, modestring, filenum); PRVM_G_FLOAT(OFS_RETURN) = filenum; + } } /* @@ -1489,6 +1497,8 @@ void VM_fclose(void) Con_Printf("VM_fclose: no such file handle %i (or file has been closed) in %s\n", filenum, PRVM_NAME); return; } + if (developer.integer) + Con_Printf("VM_fclose: %s: #%i closed\n", PRVM_NAME, filenum); FS_Close(VM_FILES[filenum]); VM_FILES[filenum] = NULL; }