[iortcw] 424/497: SP: Merge knightmare's g_episode cvar loading fix

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 8ed65cab27e0b5095574783bfac8f21146213e20
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Wed Nov 11 16:51:57 2015 -0500

    SP: Merge knightmare's g_episode cvar loading fix
---
 SP/code/game/g_save.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/SP/code/game/g_save.c b/SP/code/game/g_save.c
index 1c8b06b..45b150b 100644
--- a/SP/code/game/g_save.c
+++ b/SP/code/game/g_save.c
@@ -882,10 +882,11 @@ void ReadEntity( fileHandle_t f, gentity_t *ent, int size ) {
 			}
 		}
 
+/*
 		// set up current episode (for notebook de-briefing tabs)
 		trap_Cvar_Register( &cvar, "g_episode", "0", CVAR_ROM );
 		trap_Cvar_Set( "g_episode", va( "%d", ent->missionLevel ) );
-
+*/
 	}
 
 }
@@ -1380,6 +1381,7 @@ void G_LoadGame( char *filename ) {
 	cast_state_t    *cs;
 	qtime_t tm;
 	qboolean serverEntityUpdate = qfalse;
+	vmCvar_t episode;
 
 	if ( g_gametype.integer != GT_SINGLE_PLAYER ) {    // don't allow loads in MP
 		return;
@@ -1434,6 +1436,7 @@ void G_LoadGame( char *filename ) {
 	// read the 'episode'
 	if ( ver >= 13 ) {
 		trap_FS_Read( &i, sizeof( i ), f );
+		trap_Cvar_Register( &episode, "g_episode", "0", CVAR_ROM );
 		trap_Cvar_Set( "g_episode", va( "%i", i ) );
 	}
 //----(SA)	end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list