adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-wastesedge-commits] remove_sdl1_2 6003b54 16/29: FIXED deadlo


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] remove_sdl1_2 6003b54 16/29: FIXED deadlock during extro
Date: Mon, 25 Jul 2016 18:16:08 +0000 (UTC)

tag: remove_sdl1_2
commit 6003b54205921eb155f72b2ee6a06a43321ca116
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>

    FIXED deadlock during extro
    
    After carefully analysing the code, it seems that pathfinding can fail to
    ever reach the goal under the following condition:
    a new goal is set while the character is walking and thus offx_ or offy_
    are not 0.
    
    In that case mapcharacter::follow_path always returns false. And then Bjarn
    never makes it to his chest and the extro will hang indefinitely.
    
    While the proper fix might be in mapcharacter::set_goal, for now just
    reset the offsets to 0 once the final dialogue starts. Less likely to
    break other things that way.
---
 scripts/schedules/mapcharacters/to_cellar.py |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/schedules/mapcharacters/to_cellar.py 
b/scripts/schedules/mapcharacters/to_cellar.py
index df2dbbe..17043e2 100644
--- a/scripts/schedules/mapcharacters/to_cellar.py
+++ b/scripts/schedules/mapcharacters/to_cellar.py
@@ -85,6 +85,8 @@ class to_cellar(object):
             bjarn = adonthell.gamedata_get_character ("Bjarn Fingolson")
             bjarn.set_dialogue ("dialogues.extro")
             bjarn.pause ()
+            bjarn.stop_moving ()
+            bjarn.set_offset (0, 0)
             bjarn.launch_action (self.myself)
                         
         else:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]