diff --git a/docs/rh-log.txt b/docs/rh-log.txt index b2f8ea9a2..8ac129f6f 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +July 10, 2006 (Changes by Graf Zahl) +- Fixed: The earthquake code needs to check whether a quake's spot is still valid. + Super Sonic Doom crashed due to this. +- Fixed: G_DoAutosave could divide by 0 if autosavecount was 0. + July 9, 2006 (Changes by Graf Zahl) - Fixed: The calls to DCanvas::Dim in c_console.cpp were missing some type casts. - Fixed: CCMD(dir) passes FStrings directly to Printf. diff --git a/src/g_game.cpp b/src/g_game.cpp index 770735232..6db53fac9 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1776,7 +1776,8 @@ void G_DoAutoSave () if (multiplayer || demoplayback || players[consoleplayer].playerstate != PST_LIVE || - disableautosave >= 2) + disableautosave >= 2 || + autosavecount == 0) { gameaction = ga_nothing; return; diff --git a/src/g_shared/a_quake.cpp b/src/g_shared/a_quake.cpp index 1c8a102cd..9ba7418a5 100644 --- a/src/g_shared/a_quake.cpp +++ b/src/g_shared/a_quake.cpp @@ -133,11 +133,14 @@ int DEarthquake::StaticGetQuakeIntensity (AActor *victim) while ( (quake = iterator.Next()) != NULL) { - fixed_t dist = P_AproxDistance (victim->x - quake->m_Spot->x, - victim->y - quake->m_Spot->y); - if (dist < quake->m_TremorRadius) + if (quake->m_Spot != NULL) { - intensity += quake->m_Intensity; + fixed_t dist = P_AproxDistance (victim->x - quake->m_Spot->x, + victim->y - quake->m_Spot->y); + if (dist < quake->m_TremorRadius) + { + intensity += quake->m_Intensity; + } } } return intensity;