tlongstretch / freeserf-with-AI-plus

THIS PROJECT WAS MOVED TO 'Forkserf', GO THERE INSTEAD
https://github.com/forkserf/forkserf
GNU General Public License v3.0
1 stars 0 forks source link

Freeserf bug? - game crashes when two knights die at the same time #27

Closed tlongstretch closed 3 years ago

tlongstretch commented 3 years ago

Game crashes during draw phase trying to do serf->get_state() but the serf is a nullptr. This looks to be reproducible in the attacked savegame from @JSettler

Watch the combat on Player0 (blue)'s lands ai_debug_107029.zip

tlongstretch commented 3 years ago

I don't think it is actually two knights at same time, but a lot of places where deleted objects as a result of combat outcomes results in nullptr on various functions for buildings and serfs. Made a bunch of updates to fix this, but it needs more work as the animations look wrong sometimes with knights jumping around a bit and disappearing briefly.