aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2026-03-01 18:00:51 -0300
committerfusion32 <marcopuzziello@gmail.com>2026-03-01 18:00:51 -0300
commit16edba1729a06b86da1002783d756313cc3611ed (patch)
tree53cc049f492c0c55c4da6bdfe9b7f6638b537aec /src
parent1738b5f5c82ec942ab0b1ca176559e071767138b (diff)
downloadgame-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')
-rw-r--r--src/crnonpl.cc10
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
}
}