vistable: fix long-standing bug with saving vis counts
vistable: bumped version to 4, so all vistables will be rebuilded bot: reworked bot think mechanism timers fix: gimbal lock within bot aiming code on ladders fix: some fixes to aiming code that prevent bots 360 degree rotations fix: some mistakes in next and next-next node aiming when in idle state fix: improved seek covering from attack task nav: improved bot's crouch on marred-crouch nodes nav: overall improvements to ladder handling code Co-Authored-By: Max <161382234+dyspose@users.noreply.github.com>
This commit is contained in:
parent
0de53173f0
commit
38551eae21
11 changed files with 151 additions and 98 deletions
|
|
@ -183,7 +183,15 @@ template <typename U> bool BotStorage::load (SmallArray <U> &data, ExtenHeader *
|
|||
// tell graph about exten header
|
||||
graph.setExtenHeader (&extenHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for visibility tables load counts of stand/count numbers
|
||||
if (type.option & StorageOption::Vistable) {
|
||||
for (auto &path : graph) {
|
||||
file.read (&path.vis, sizeof (PathVis));
|
||||
}
|
||||
}
|
||||
|
||||
ctrl.msg ("Loaded Bots %s data v%d (Memory: %.2fMB).", type.name, hdr.version, static_cast <float> (data.capacity () * sizeof (U)) / 1024.0f / 1024.0f);
|
||||
file.close ();
|
||||
|
||||
|
|
@ -248,7 +256,14 @@ template <typename U> bool BotStorage::save (const SmallArray <U> &data, ExtenHe
|
|||
hdr.uncompressed = static_cast <int32_t> (rawLength);
|
||||
|
||||
file.write (&hdr, sizeof (StorageHeader));
|
||||
file.write (compressed.data (), sizeof (uint8_t), compressedLength);
|
||||
file.write (compressed.data (), sizeof (uint8_t), compressedLength);
|
||||
|
||||
// for visibility tables save counts of stand/count numbers
|
||||
if (type.option & StorageOption::Vistable) {
|
||||
for (auto &path : graph) {
|
||||
file.write (&path.vis, sizeof (PathVis));
|
||||
}
|
||||
}
|
||||
|
||||
// add extension
|
||||
if ((type.option & StorageOption::Exten) && exten != nullptr) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue