From 38bb444bf05310dc3d2392310ab33c6fd73217a3 Mon Sep 17 00:00:00 2001 From: Bryce Hutchings Date: Thu, 11 Jul 2002 04:26:46 +0000 Subject: [PATCH] new debug function to save a string to a file --- reaction/game/g_utils.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/reaction/game/g_utils.c b/reaction/game/g_utils.c index 7727c6a6..ff8cb6a9 100644 --- a/reaction/game/g_utils.c +++ b/reaction/game/g_utils.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.15 2002/07/11 04:26:46 niceass +// new debug function to save a string to a file +// // Revision 1.14 2002/07/09 03:31:25 niceass // oops // @@ -817,3 +820,15 @@ int G_PlayerAlive(gentity_t *ent) return qfalse; } } + +/* + Want to save data right before RQ3 crashes? Ues this =D +*/ +void G_DebugSaveData(char *Data) { + fileHandle_t f; + + if (trap_FS_FOpenFile("debugout.txt", &f, FS_WRITE) >= 0) { + trap_FS_Write(Data, strlen(Data), f); + trap_FS_FCloseFile(f); + } +} \ No newline at end of file