pathdata:: no longer inline

This commit is contained in:
Zeno Rogue 2021-08-09 00:46:52 +02:00
parent fbc32c6bc4
commit bb77f035b0
1 changed files with 26 additions and 16 deletions

View File

@ -236,24 +236,34 @@ EX void computePathdist(eMonster param, bool include_allies IS(true)) {
#if HDR #if HDR
struct pathdata { struct pathdata {
void checklock() { void checklock();
if(pd_from) pd_from = NULL, clear_pathdata(); ~pathdata();
if(pathlock) printf("path error\n"); pathdata(eMonster m, bool include_allies IS(true));
pathlock++; pathdata(int i);
}
~pathdata() {
pathlock--;
clear_pathdata();
}
pathdata(eMonster m, bool include_allies IS(true)) {
checklock();
computePathdist(m, include_allies);
}
pathdata(int i) {
checklock();
}
}; };
#endif #endif
pathdata::~pathdata() {
pathlock--;
clear_pathdata();
}
void pathdata::checklock() {
if(pd_from) pd_from = NULL, clear_pathdata();
if(pathlock) printf("path error\n");
pathlock++;
}
pathdata::pathdata(int i) { checklock(); }
pathdata::pathdata(eMonster m, bool include_allies IS(true)) {
checklock();
if(isize(pathq))
println(hlog, "! we got tiles on pathq: ", isize(pathq));
computePathdist(m, include_allies);
}
// pathdist end // pathdist end
/** calculate cpdist, 'have' flags, and do general fixings */ /** calculate cpdist, 'have' flags, and do general fixings */