[patch] Everybody shoots
Moderator: Committer
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Everybody shoots
Committed the v4 version of the patch.
Re: [patch] Everybody shoots
Pretty much speaks for itself, moved my mark 1 into the AIs first colony, no damage taken at all, no reduction in AI planet defences, no combat logged. They've got a ship inbound (that'll kill me anyway), will note if it triggers the planet to shoot.
- Attachments
-
- combat-enemy-planet.png (152.16 KiB) Viewed 1654 times
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Everybody shoots
Do you have a save from the turn before?
Re: [patch] Everybody shoots
Unfortunately not, I kept playing, the next turn the planet did shoot and took the ship out as it should have done the previous turn, I could see nothing in the logs and really should have loaded the autosave and turned verbose on. If it happens again I will do so.
It's obviously a very strange glitch, if it had been, say, an organic hull, with the new patch they're invisible until you've got at least one detection tech, but a basic mark 1 is spotable from the outset.
It's obviously a very strange glitch, if it had been, say, an organic hull, with the new patch they're invisible until you've got at least one detection tech, but a basic mark 1 is spotable from the outset.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Everybody shoots
There are reportedly compile errors with this patch.
I suggest considering using standard style serialization code as elsewhere in FO code...
I suggest considering using standard style serialization code as elsewhere in FO code...
Re: [patch] Everybody shoots
I won't argue against having the serialization code be consistent throughout, but did want to note (as I did in that other thread) that I had gotten those same compile errors at first, but forcing a full clean compile got me past them. This was about the only time that the make system couldn't figure out well enough on its own what need to be recompiled / relinked.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: [patch] Everybody shoots
Hmm, well and also, apparently the full clean build approach did NOT solve the problem for that other guy
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: [patch] Everybody shoots
Well, he's using boost 1.49, what version do you link against?Dilvish wrote:Hmm, well and also, apparently the full clean build approach did NOT solve the problem for that other guy
Re: [patch] Everybody shoots
Ah, I had overlooked that somehow. I link with 1.53; boost very well might be his problem.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: [patch] Everybody shoots
another update -- I had misremembered what actually was responsible for solving this problem for me -- What does fix it for me is reverting my build type to the default blank, rather than Release.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: [patch] Everybody shoots
What, specifically, do you refer to by implying that the serialization code I used was nonstandard?I suggest considering using standard style serialization code as elsewhere in FO code...
All deviation I can recall were solutions to various issues I or you had compiling the thing.
Is there any other place in the codebase where any truly object-oriented serialization is being done?
What I mean is serializing derived objects trough pointers to their base.
As far as I remember the boost serialization documentation, especially the fact that
the derived classes are not guaranteed to ever be serialized by their
own pointers requires the extra effort in the serialization code.
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Everybody shoots
Compared with the other FreeOrion serialization code:Mitten.O wrote:What, specifically, do you refer to by implying that the serialization code I used was nonstandard?
-You use BOOST_CLASS_EXPORT_IMPLEMENT, while other code uses BOOST_CLASS_EXPORT
-You do something with boost::serialization::make_nvp instead of the FO-standard BOOST_SERIALIZATION_BASE_OBJECT_NVP
-You also mix template <class Archive> and template <typename Archive>, while other code seems to mostly use just <class Archive> (probably a non-issue)
The UnvierseObject hierarchy, the Order hierarchy, the ModeratorAction hierarchy... All in util/Serialize*.cpp files.Is there any other place in the codebase where any truly object-oriented serialization is being done?
What I mean is serializing derived objects trough pointers to their base.
Re: [patch] Everybody shoots
Yes, inspecting those details closer, and comparing to the other similar places,
most of the differences were in fact artefacts of the search for a solution,
not part of the final solution itself.
Whether aligning the code with the others fixes any compilations issues,
I cannot know, but it is a good idea nonetheless and seems to cause no issues for me.
Do any of the issues you had with this patch recur with these changes?
most of the differences were in fact artefacts of the search for a solution,
not part of the final solution itself.
Whether aligning the code with the others fixes any compilations issues,
I cannot know, but it is a good idea nonetheless and seems to cause no issues for me.
Do any of the issues you had with this patch recur with these changes?
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Everybody shoots
Applies, builds, and runs OK for me.
Re: [patch] Everybody shoots
makes no difference on my machine, but here is some more specific info: it compiles and links fine with CXX flag -O1, but with -O2 I get the linker errorsMitten.O wrote:Do any of the issues you had with this patch recur with these changes?
Code: Select all
../../libfreeorioncommon.so: undefined reference to `void BoutBeginEvent::serialize<boost::archive::binary_iarchive>(boost::archive::binary_iarchive&, unsigned int)'
../../libfreeorioncommon.so: undefined reference to `void IncapacitationEvent::serialize<boost::archive::binary_iarchive>(boost::archive::binary_iarchive&, unsigned int)'
../../libfreeorioncommon.so: undefined reference to `void BoutBeginEvent::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive&, unsigned int)'
../../libfreeorioncommon.so: undefined reference to `void IncapacitationEvent::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive&, unsigned int)'
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0