mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- 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. SVN r243 (trunk)
This commit is contained in:
parent
a9470f8642
commit
133a035c76
3 changed files with 14 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue