[Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-27 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 -- Your team Widelands Developers is subscribed to branch

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-27 Thread GunChleoc
Thanks for helping me fix this up :) -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing list: https://launchpa

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
Review: Approve I have not tested it, but it looks good -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing li

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
Yep, got it and fixed it. I don't think that we need an assert here, so unless you find something else to improve on, we're done :) -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/wideland

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
probalby, see now Diff comments: > === modified file 'src/ai/defaultai.cc' > --- src/ai/defaultai.cc 2015-10-25 12:26:20 + > +++ src/ai/defaultai.cc 2015-10-26 13:09:27 + > @@ -5075,8 +5076,9 @@ > } > // adding power of team (minus my power) divided by 2 > //

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
I think the comment wasn't saved - I don't see it. -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing list: ht

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
looks good, but still one small comment in diff... -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing list: ht

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
I think we're done now. I also found an instance where the team number was fetched twice. -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy.

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
In fact, player_ should be fine -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing list: https://launchpad.net

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
Added a question. Diff comments: > === modified file 'src/ai/defaultai.cc' > --- src/ai/defaultai.cc 2015-10-25 12:26:20 + > +++ src/ai/defaultai.cc 2015-10-26 12:01:30 + > @@ -5075,8 +5076,12 @@ > } > // adding power of team (minus my power) divided by 2 > /

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
see comment in diff Diff comments: > === modified file 'src/ai/defaultai.cc' > --- src/ai/defaultai.cc 2015-10-25 12:26:20 + > +++ src/ai/defaultai.cc 2015-10-26 12:01:30 + > @@ -5075,8 +5076,12 @@ > } > // adding power of team (minus my power) divided by 2 >

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
Done :) -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing list: https://launchpad.net/~widelands-dev Post to

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
Nice, I like it! :) -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing list: https://launchpad.net/~wideland

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
Oops, I mean Player* other... -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enemy. ___ Mailing list: https://launchpad.net/~

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
How about: Player other = game().get_player(j); TeamNumber const tm = other ? other->team_number() : 0; etc. -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_null_enem

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
we would reduce four instances of testing 'game().get_player(j)' to two :) Two loops are necessary here... I will change it -- https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
I don't know that we would gain anything by this - it would add extra continue statements where we already have continue statements that do the job. There isn't just one major loop where we can put this on top - these are all separate places in the code. Maybe you can reorder things so that we

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread TiborB
Indeed. I cannot work with bzr now, but I would suggest slightly alternative design. Like this: for (uint8_t j = 1; j <= plr_in_game; ++j) { if (!game().get_player(j)) { continue; } TeamNumber const tm = game().get_pl

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands

2015-10-26 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/ai_null_enemy into lp:widelands. Requested reviews: TiborB (tiborb95) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/ai_null_enemy/+merge/275673 Fixed a crash in AI when enemy slots are empty. To reproduce