Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Slime loading, line 13: you're converting a pointer into a reference, I would expect that not to compile at all; then you're leaking the slime object if it doesn't load successfully. Use the same technique as in skeleton-loading - auto_ptr. I don't see why the skeleton loading should fail, no apparent problems there. Maybe push it to a branch so that I can give it a try with the debugger.
Posts: 952
Threads: 16
Joined: May 2013
Thanks: 66
Given 105 thank(s) in 89 post(s)
11-16-2013, 10:15 PM
(This post was last modified: 11-16-2013, 10:16 PM by tigerw.)
Code #2:
It runs, I can sometimes even see the skeleton, but it immediately stops responding and after a while the deadlock detector asserts. I'll push to a branch soon, thanks!
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
So is a_Entity a pointer or a reference? On line 1 you're using it as a pointer, on line 5 as a reference. If it's a pointer, cast it to cMonster * and it should work.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
The mobsaving code was a mess, mixing references with pointers. I've fixed it and it seems to work; didn't test much though.
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
I tested it and it's working very well. Why don't merge it?