I'm not deferring path grid loading.
See update about lookup & structure
path grid recrod
Re: path grid recrod
Then you have an unnecessary ESM_Context member in your struct.
Also, I would use vectors for points and edges. In it's current state the pathgrid struct will not work, because it is violating the rule of three. We generally don't want to see new[]/delete[] in OpenMW.
Also, I would use vectors for points and edges. In it's current state the pathgrid struct will not work, because it is violating the rule of three. We generally don't want to see new[]/delete[] in OpenMW.
Re: path grid recrod
thanks for pointing out!
I'll use vector.
I'll use vector.
Re: path grid recrod
What if I'd break cell_store.hpp & reclists.hpp into header & implementation files?
Recompiling a lot of code after every change in header is a pain.
Recompiling a lot of code after every change in header is a pain.
Re: path grid recrod
Almost everything in there is a template, so that is not possible.
Re: path grid recrod
oh, ok.
Forgot about that feature of C++.
Forgot about that feature of C++.
Re: path grid recrod
I see two more problems with your code.
1. You still have redundant pointCount and edgeCount members in the PathGrid struct. Remove these, please.
2. You are storing a pointer to the PathGrid in the CellStore. Please don't! The CellStore is only for mutable cell data.
1. You still have redundant pointCount and edgeCount members in the PathGrid struct. Remove these, please.
2. You are storing a pointer to the PathGrid in the CellStore. Please don't! The CellStore is only for mutable cell data.
Re: path grid recrod
1. Fixed, but not pushed.
2. So I should retrieve path grid from esm store every time?
2. So I should retrieve path grid from esm store every time?
Re: path grid recrod
Encountered strange bug =\
I'm passing reference to ESMStore to Debugging, so I can get pathgrids from it on demand.
ESMStore always passed by reference, but somehow it duplicated, and Debugging refers to copy and almost any operation on PathgridList maps (intGrids & extGrids) leads to crash.
I've tried different approach: I'm passing reference to Environment to Debugging, and using mEnvironment.mWorld->getStore. This way it works ok.
It would be awesome if someone can review and find where I'm screwed up.
see RenderingManager & Debugging classes.
commit with workaround
commit with bug
I'm passing reference to ESMStore to Debugging, so I can get pathgrids from it on demand.
ESMStore always passed by reference, but somehow it duplicated, and Debugging refers to copy and almost any operation on PathgridList maps (intGrids & extGrids) leads to crash.
I've tried different approach: I'm passing reference to Environment to Debugging, and using mEnvironment.mWorld->getStore. This way it works ok.
It would be awesome if someone can review and find where I'm screwed up.
see RenderingManager & Debugging classes.
commit with workaround
commit with bug