Difference between revisions of "Talk:Door"

Jump to navigation Jump to search
imported>Cipscis
m (Reverted edits by Tey (talk) to last revision by Cipscis)
(→‎Random teleports: new section)
Line 27: Line 27:


How do I set a patrol route, I'm new to modding, and sorry for the wait, I wasn't expecting a reply. [[User:GetTheJojDone|GetTheJojDone]] 09:25, 19 May 2012 (EDT)
How do I set a patrol route, I'm new to modding, and sorry for the wait, I wasn't expecting a reply. [[User:GetTheJojDone|GetTheJojDone]] 09:25, 19 May 2012 (EDT)
== Random teleports ==
The reason the assertion failure and subsequent crash occur when saving these is because the code to save them, within `TESObjectDOOR::SaveForm`, looks like this:
<pre lang="C++">
if (this->random_destinations.size() > 0) {
  uint32_t i = 0;
  do {
      uint32_t to_write = this->random_destinations[i]->formID;
      if (bSwapEndianness) { // global bool
        to_write = _byteswap_ulong(to_write);
      }
      _WriteSubrecord('TNAM', &to_write, sizeof(to_write));
  } while (++i, this->random_destinations.size() > 0); // should've been: ++i < this->random_destinations.size()
}
</pre>
Verified by reverse-engineering the LE CK. [[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 21:22, 30 June 2024 (EDT)
142

edits

Navigation menu