Fixes @Stan `s notes.
Sun, Oct 6
Adds if ( space and moves destructor to header.
Sat, Oct 5
Removes unused variables.
Fixes @elexis `s notes.
Fri, Oct 4
Reverts vector changes.
Fixes @elexis `s note.
I was trying to load a saved game with this patch enabled, but all I get when the game has loaded is a white screen where I can select units (whilst not seeing them). When I move an entity I get the following error: CCmpObstructionManager.cpp(877): Assertion failed: "it != m_UnitShapes.end()".
If you need more information, please let me know :)
Thu, Oct 3
Fixes @elexis`s notes.
Not particularly a fan of ENSURE, usually it reads like TODO and it has the issue that the user can click on "continue" (thats what the average player does if he triggers one).
Yeah, I can call it TODO, because I want to remove it after new projection type will be added.
Wrong commit message, the right one is "Fixed assert fails in Actor Editor".
@shh thank you for the patch! Sorry for long reviewing.
My result on macOS (clang-11.0.0) for https://code.wildfiregames.com/P184:
Wed, Oct 2
The patch seems ok to me. I'm going to commit that if nobody has objections.
I tested it on VS2015, it works for me. The movement looks ok, the old code has some issues, but it'd be better to fix them in a separate diff.
When you spoke about object_bases I have immediately corrected you that it should be ObjectBases.
I didn't talk about underscores, only about name semantic.
I claim this to be a lie unless you cite a rule from the CC that I broke https://trac.wildfiregames.com/wiki/Coding_Conventions
If you refer to the consistency argument, the consistency goes from bottom to top, first there is consistency in this folder, as I quoted above.
I refer to this line: "Then, try to match the style of the other code in the subdirectory you're editing.".
Before your change there were 100 folders with lower case name underscore and 2 with upper case. After your change there are 99 folders with lower case name underscore and 6 with upper case
If you do a find in source/gui/ you will see that its more consistent if that folder uses the same style as the filenames.
See my comment above.
Citation of the CC or you cant claim its in the CC. It actually says:
Well, before the change we didn't have such name in the folders, but we have tests and scripting. So you broke the rules from CC.
Well its not like I didnt mentioned the folder names or the reasoning several times in the discussion we had http://irclogs.wildfiregames.com/2019-10/2019-10-01-QuakeNet-%230ad-dev.log20:02 < Vladislav> I agree with most, I just can't call it object_base.
It was in context of your patch https://code.wildfiregames.com/P183, and it contains only underscores.
I think Scripting has a wrong case, it's out of repo CC. Object* and SettingTypes are not so "out of rules", but I'd prefer underscore to fit into all other folder names.
When moving code around, one should check that one splits into helper functions or classes where benefiital (taking the opportunity to chose the cleaner alternative if already moving those lines).
I agree that the code should be refactored, but at the same time I want to keep the diff as small as possible (only movement).
Tue, Oct 1
No objections. Sounded like they were unused following rP22404, but doesn't seem so. Happen to know which commit introduced that? (perhaps there is even more unused stuff?)
Thu, Sep 26
Also the code doesn't support square maps.
Mon, Sep 23
Fri, Sep 20
Thu, Sep 19
The patch looks good to me. Though I didn't test it.
Wed, Sep 18
Updates after last commits.
Sep 18 2019
If you are looking for more things regarding obstructions that could be moved to cpp Have a look at (ping @wraitii):
- https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/ai/petra/baseManager.js$252 findBestDropsiteLocation
- https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js$1044 checkTargetObstruction
- https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/ai/petra/headquarters.js$934 findEconomicCCLocation
- https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js$137 obstructionRadius
Adds template function.
I will commit it in separate commits, grouped by folders.
Sep 16 2019
Sep 3 2019
Ah then the ticket is not fixed...
No, it's fixed. As I created the ticket only for logs.