{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/954","repository_url":"https://api.github.com/repos/OpenMW/openmw","labels_url":"https://api.github.com/repos/OpenMW/openmw/issues/954/labels{/name}","comments_url":"https://api.github.com/repos/OpenMW/openmw/issues/954/comments","events_url":"https://api.github.com/repos/OpenMW/openmw/issues/954/events","html_url":"https://github.com/OpenMW/openmw/pull/954","id":158941566,"number":954,"title":"Improve duration calculations in Wander AI","user":{"login":"Allofich","id":19624336,"avatar_url":"https://avatars.githubusercontent.com/u/19624336?v=3","gravatar_id":"","url":"https://api.github.com/users/Allofich","html_url":"https://github.com/Allofich","followers_url":"https://api.github.com/users/Allofich/followers","following_url":"https://api.github.com/users/Allofich/following{/other_user}","gists_url":"https://api.github.com/users/Allofich/gists{/gist_id}","starred_url":"https://api.github.com/users/Allofich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Allofich/subscriptions","organizations_url":"https://api.github.com/users/Allofich/orgs","repos_url":"https://api.github.com/users/Allofich/repos","events_url":"https://api.github.com/users/Allofich/events{/privacy}","received_events_url":"https://api.github.com/users/Allofich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2016-06-07T14:44:40Z","updated_at":"2016-06-09T17:43:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenMW/openmw/pulls/954","html_url":"https://github.com/OpenMW/openmw/pull/954","diff_url":"https://github.com/OpenMW/openmw/pull/954.diff","patch_url":"https://github.com/OpenMW/openmw/pull/954.patch"},"body":"Fixes: https://bugs.openmw.org/issues/3412\r\n\r\nSummary of the changes made:\r\nWander AI now runs on a counter, matching observed behavior in the original game more closely. The checks for the end of duration are now unrelated to the current timestamp.\r\n\r\nThe remaining duration on the counter is saved and retrieved on loading, which fixes bug#3412. This is an enhancement over the original game.\r\n\r\nThis implementation introduces a new float mRemainingDuration and repurposes mStartTime as a way to store the remaining duration.\r\n\r\nExisting save games will have a wrong duration for one run through all the Wander packages in the save file (since mStartTime did not mean what it does now) but the duration should be corrected when the packages finish or for any that were not yet in the save game.\r\n\r\nTested with NPCs, both editor-placed packages and console-issued AIWander commands."},"comment":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/comments/224971773","html_url":"https://github.com/OpenMW/openmw/pull/954#issuecomment-224971773","issue_url":"https://api.github.com/repos/OpenMW/openmw/issues/954","id":224971773,"user":{"login":"Allofich","id":19624336,"avatar_url":"https://avatars.githubusercontent.com/u/19624336?v=3","gravatar_id":"","url":"https://api.github.com/users/Allofich","html_url":"https://github.com/Allofich","followers_url":"https://api.github.com/users/Allofich/followers","following_url":"https://api.github.com/users/Allofich/following{/other_user}","gists_url":"https://api.github.com/users/Allofich/gists{/gist_id}","starred_url":"https://api.github.com/users/Allofich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Allofich/subscriptions","organizations_url":"https://api.github.com/users/Allofich/orgs","repos_url":"https://api.github.com/users/Allofich/repos","events_url":"https://api.github.com/users/Allofich/events{/privacy}","received_events_url":"https://api.github.com/users/Allofich/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T17:43:44Z","updated_at":"2016-06-09T17:43:44Z","body":"Finally seem to have gotten it working. ;) Let me just give it one last test and clean up and I'll upload it."}}
{"actor":{"display_login":"Allofich"}}