Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old August 31, 2011, 05:08   #1
APWhite's Avatar
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
borg out of sync sometimes due to lag in update on p_ptr->inventory[]

I was reviewing some odd borg behavior that crept in during the change to Angband 320. One error seems to be the borg selling at item at the house, then immediately trying to sell the exact same item to a shop; as if he still had it in the inventory. Once he gets to the shop, he sells an item in the old items inventory slot. So the inventory is not being updated after he drops the item in the house.

Same thing happens with ring swapping. During one round he will remove both rings, scan the inventory and re-wear the rings in the proper order (wearing the ring which had been on the left hand first, then wearing the ring which had been on the right hand).

I have stepped through the code and found that the borg is correctly scanning the &p_ptr->inventory[], but the p_ptr->inventory is not being immediately updated after the borg's keypresses. So the borg is essentially scanning the old inventory and equipment state instead of the state following the keypresses. Vanilla 309 and previous versions immediately updated the p_ptr->inventory[] following any borg keypresses.

Does anyone know if the update is being delayed? Maybe waiting for an event handler change or something? And if so, how do I fix it?
APWhite is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
p_ptr->class vs. p_ptr->pclass APWhite Development 5 August 17, 2011 16:32
Ready for borg update? APWhite Development 8 April 21, 2009 19:22
Borg update APWhite Vanilla 75 April 11, 2009 12:14
309 Borg Update APWhite Vanilla 1 October 11, 2007 09:29
Borg 3.0.9 Progress Update APWhite Vanilla 3 August 10, 2007 02:15

All times are GMT +1. The time now is 12:41.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.