diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2026-03-01 18:00:51 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2026-03-01 18:00:51 -0300 |
| commit | 16edba1729a06b86da1002783d756313cc3611ed (patch) | |
| tree | 53cc049f492c0c55c4da6bdfe9b7f6638b537aec /src/crnonpl.cc | |
| parent | 1738b5f5c82ec942ab0b1ca176559e071767138b (diff) | |
| download | game-16edba1729a06b86da1002783d756313cc3611ed.tar.gz game-16edba1729a06b86da1002783d756313cc3611ed.zip | |
missing try-catch block in TMonster::IdleStimulus
On rare occasions this would cause an EXHAUSTED exception to bubble
up all the way to main, causing the server to shutdown without saving.
Diffstat (limited to 'src/crnonpl.cc')
| -rw-r--r-- | src/crnonpl.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/crnonpl.cc b/src/crnonpl.cc index 691846c..3a6c053 100644 --- a/src/crnonpl.cc +++ b/src/crnonpl.cc @@ -2816,9 +2816,13 @@ void TMonster::IdleStimulus(void){ case 3: DestY += 1; break; } - if(this->MovePossible(DestX, DestY, DestZ, true, false)){ - FoundDest = true; - break; + try{ + if(this->MovePossible(DestX, DestY, DestZ, true, false)){ + FoundDest = true; + break; + } + }catch(RESULT r){ + // no-op } } |
