Skip to content

Commit

Permalink
Console|libcommon: Read-only variable 'map-hub' is now a string
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Aug 12, 2014
1 parent 2fddb19 commit 8473fca
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
3 changes: 3 additions & 0 deletions doomsday/doc/libcommon/variable/map-hub.ame
@@ -0,0 +1,3 @@
@summary{
Current hub id.
}
3 changes: 0 additions & 3 deletions doomsday/doc/libhexen/variable/map-hub.ame

This file was deleted.

17 changes: 10 additions & 7 deletions doomsday/plugins/common/src/gamesession.cpp
Expand Up @@ -485,6 +485,13 @@ DENG2_PIMPL(GameSession), public SavedSession::IMapStateReaderFactory
// Update game status cvars:
Con_SetString2("map-episode", episodeId.toUtf8().constData(), SVF_WRITE_OVERRIDE);
Con_SetUri2 ("map-id", reinterpret_cast<uri_s *>(&::gameMapUri), SVF_WRITE_OVERRIDE);

String hubId;
if(Record const *hubRec = defn::Episode(*self.episodeDef()).tryFindHubByMapId(::gameMapUri.compose()))
{
hubId = hubRec->gets("id");
}
Con_SetString2("map-hub", hubId.toUtf8().constData(), SVF_WRITE_OVERRIDE);
}

/**
Expand Down Expand Up @@ -1281,10 +1288,8 @@ String GameSession::savedUserDescription(String const &saveName)
namespace {
int gsvRuleSkill;
char *gsvEpisode = (char *)"";
//uri_s *gsvMap;
#if __JHEXEN__
int gsvHub;
#endif
uri_s *gsvMap;
char *gsvHub = (char *)"";
}

void GameSession::consoleRegister() //static
Expand All @@ -1293,9 +1298,7 @@ void GameSession::consoleRegister() //static

C_VAR_INT ("game-skill", &gsvRuleSkill, READONLYCVAR, 0, 0);
C_VAR_CHARPTR("map-episode", &gsvEpisode, READONLYCVAR, 0, 0);
#if __JHEXEN__
//C_VAR_INT ("map-hub", &gsvHub, READONLYCVAR, 0, 0);
#endif
C_VAR_CHARPTR("map-hub", &gsvHub, READONLYCVAR, 0, 0);
C_VAR_URIPTR ("map-id", &gsvMap, READONLYCVAR, 0, 0);

#undef READONLYCVAR
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/doom/data/conhelp.txt
Expand Up @@ -412,6 +412,9 @@ desc = Door glow thickness in the automap (with map-door-colors).
[map-episode]
desc = Current episode id.

[map-hub]
desc = Current hub id.

[map-huddisplay]
desc = 0=No HUD when in the automap 1=Current HUD display shown when in the automap 2=Always show Status Bar when in the automap

Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/doom64/data/conhelp.txt
Expand Up @@ -347,6 +347,9 @@ desc = Current map name.
[map-episode]
desc = Current episode id.

[map-hub]
desc = Current hub id.

[game-music]
desc = Currently playing music (id).

Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/heretic/data/conhelp.txt
Expand Up @@ -415,6 +415,9 @@ desc = Door glow thickness in the automap (with map-door-colors).
[map-episode]
desc = Current episode id.

[map-hub]
desc = Current hub id.

[map-huddisplay]
desc = 0=No HUD when in the automap 1=Current HUD display shown when in the automap 2=Always show Status Bar when in the automap

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/hexen/data/conhelp.txt
Expand Up @@ -774,7 +774,7 @@ desc = Show mana when the status bar is hidden. 1=top, 2=bottom, 0=off
desc = 1=Unhide the HUD when player collects an inventory item.

[map-hub]
desc = Current hub.
desc = Current hub id.

[msg-hub-override]
desc = Override the transition hub message.
Expand Down

0 comments on commit 8473fca

Please sign in to comment.