diff options
-rw-r--r-- | src/heretic/g_game.c | 17 | ||||
-rw-r--r-- | src/hexen/g_game.c | 18 |
2 files changed, 27 insertions, 8 deletions
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index 2ad9f4b3..5139c950 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -1735,12 +1735,18 @@ void G_DoPlayDemo(void) void G_TimeDemo(char *name) { skill_t skill; - int episode, map; + int episode, map, i; demobuffer = demo_p = W_CacheLumpName(name, PU_STATIC); skill = *demo_p++; episode = *demo_p++; map = *demo_p++; + + for (i = 0; i < MAXPLAYERS; i++) + { + playeringame[i] = *demo_p++; + } + G_InitNew(skill, episode, map); usergame = false; demoplayback = true; @@ -1761,13 +1767,16 @@ void G_TimeDemo(char *name) boolean G_CheckDemoStatus(void) { - int endtime; + int endtime, realtics; if (timingdemo) { + float fps; endtime = I_GetTime(); - I_Error("timed %i gametics in %i realtics", gametic, - endtime - starttime); + realtics = endtime - starttime; + fps = ((float) gametic * TICRATE) / realtics; + I_Error("timed %i gametics in %i realtics (%f fps)", + gametic, realtics, fps); } if (demoplayback) diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c index 4e40f578..bc58b128 100644 --- a/src/hexen/g_game.c +++ b/src/hexen/g_game.c @@ -1881,12 +1881,19 @@ void G_DoPlayDemo(void) void G_TimeDemo(char *name) { skill_t skill; - int episode, map; + int episode, map, i; demobuffer = demo_p = W_CacheLumpName(name, PU_STATIC); skill = *demo_p++; episode = *demo_p++; map = *demo_p++; + + for (i = 0; i < MAXPLAYERS; i++) + { + playeringame[i] = *demo_p++; + PlayerClass[i] = *demo_p++; + } + G_InitNew(skill, episode, map); usergame = false; demoplayback = true; @@ -1907,13 +1914,16 @@ void G_TimeDemo(char *name) boolean G_CheckDemoStatus(void) { - int endtime; + int endtime, realtics; if (timingdemo) { + float fps; endtime = I_GetTime(); - I_Error("timed %i gametics in %i realtics", gametic, - endtime - starttime); + realtics = endtime - starttime; + fps = ((float) gametic * TICRATE) / realtics; + I_Error("timed %i gametics in %i realtics (%f fps)", + gametic, realtics, fps); } if (demoplayback) |