Skip to content

Commit

Permalink
Fixed Hexen: Fatal error attempting to play Deathkings of the Dark Ci…
Browse files Browse the repository at this point in the history
…tadel.
  • Loading branch information
danij-deng committed Apr 9, 2010
1 parent 15bca57 commit 0a5a41b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion doomsday/plugins/jhexen/src/p_mapinfo.c
Expand Up @@ -224,6 +224,12 @@ void P_InitMapInfo(void)
{
case MCMD_CLUSTER:
SC_MustGetNumber();
if(sc_Number < 1)
{
char buf[40];
dd_snprintf(buf, 40, "Invalid cluster %i", sc_Number);
SC_ScriptError(buf);
}
info->cluster = sc_Number;
break;

Expand Down Expand Up @@ -340,7 +346,8 @@ uint P_TranslateMap(uint map)
uint i;
for(i = 0; i < 99; ++i)
{
if(MapInfo[i].warpTrans == map)
const mapinfo_t* info = &MapInfo[i];
if(info->cluster && info->warpTrans == map)
return i;
}
return 0; // Not found, default to map zero.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jhexen/src/p_spec.c
Expand Up @@ -111,7 +111,7 @@ void P_InitSky(uint map)
fval = 0;
Rend_SkyParams(0, DD_OFFSET, &fval);
Rend_SkyParams(1, DD_OFFSET, &fval);
if(doubleSky)
if(doubleSky && sky2Material)
{
Rend_SkyParams(0, DD_ENABLE, NULL);
ival = DD_NO;
Expand Down

0 comments on commit 0a5a41b

Please sign in to comment.