From 87859b2950931a2d6692dc2d6115ddba6559dec7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 29 Jan 2019 02:08:53 +0100 Subject: [PATCH] - add Level parameter to G_LeavingHub --- src/g_hub.cpp | 18 +++++++++--------- src/g_hub.h | 2 +- src/g_level.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/g_hub.cpp b/src/g_hub.cpp index 3cac5b17f..677b99160 100644 --- a/src/g_hub.cpp +++ b/src/g_hub.cpp @@ -76,7 +76,7 @@ struct FHubInfo static TArray hubdata; -void G_LeavingHub(int mode, cluster_info_t * cluster, wbstartstruct_t * wbs) +void G_LeavingHub(FLevelLocals *Level, int mode, cluster_info_t * cluster, wbstartstruct_t * wbs) { unsigned int i, j; @@ -84,7 +84,7 @@ void G_LeavingHub(int mode, cluster_info_t * cluster, wbstartstruct_t * wbs) { for (i = 0; i < hubdata.Size(); i++) { - if (hubdata[i].levelnum == level.levelnum) + if (hubdata[i].levelnum == Level->levelnum) { hubdata[i] = *wbs; break; @@ -95,13 +95,13 @@ void G_LeavingHub(int mode, cluster_info_t * cluster, wbstartstruct_t * wbs) hubdata[hubdata.Reserve(1)] = *wbs; } - hubdata[i].levelnum = level.levelnum; + hubdata[i].levelnum = Level->levelnum; if (!multiplayer && !deathmatch) { // The player counters don't work in hubs - hubdata[i].plyr[0].skills = level.killed_monsters; - hubdata[i].plyr[0].sitems = level.found_items; - hubdata[i].plyr[0].ssecret = level.found_secrets; + hubdata[i].plyr[0].skills = Level->killed_monsters; + hubdata[i].plyr[0].sitems = Level->found_items; + hubdata[i].plyr[0].ssecret = Level->found_secrets; } @@ -129,11 +129,11 @@ void G_LeavingHub(int mode, cluster_info_t * cluster, wbstartstruct_t * wbs) { if (cluster->flags & CLUSTER_LOOKUPNAME) { - level.LevelName = GStrings(cluster->ClusterName); + Level->LevelName = GStrings(cluster->ClusterName); } else { - level.LevelName = cluster->ClusterName; + Level->LevelName = cluster->ClusterName; } } } @@ -185,4 +185,4 @@ void G_SerializeHub(FSerializer &arc) void G_ClearHubInfo() { hubdata.Clear(); -} \ No newline at end of file +} diff --git a/src/g_hub.h b/src/g_hub.h index 372546b83..bc7c89df3 100644 --- a/src/g_hub.h +++ b/src/g_hub.h @@ -6,7 +6,7 @@ struct wbstartstruct_t; class FSerializer; void G_SerializeHub (FSerializer &file); -void G_LeavingHub(int mode, cluster_info_t * cluster, struct wbstartstruct_t * wbs); +void G_LeavingHub(FLevelLocals *Level, int mode, cluster_info_t * cluster, struct wbstartstruct_t * wbs); #endif diff --git a/src/g_level.cpp b/src/g_level.cpp index 940b912b3..19052d44f 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -855,7 +855,7 @@ void G_DoCompleted (void) } // Intermission stats for entire hubs - G_LeavingHub(mode, thiscluster, &wminfo); + G_LeavingHub(&level, mode, thiscluster, &wminfo); for (i = 0; i < MAXPLAYERS; i++) {