strategyonly
C2C Supreme Commander
Update
- Lowered Ranger STR to 6.
Who and whom offered an idea on lowering this to str 6, i didn't see any suggestions on this? Besides isn't that DH's unit?
Update
- Lowered Ranger STR to 6.
Who and whom offered an idea on lowering this to str 6, i didn't see any suggestions on this? Besides isn't that DH's unit?
The herd and other buildings were originally giving a FREE_BONUS. In the horse_herd's case it was the BONUS_HORSE. However this was causing three distinct problems.
1) Infinite loop or CTD
2) Not able to spread a Guild or Corporation that consumes the FREE_BONUS to the city that had the FREE_BONUS building
3) Not able to build the building in a city that had a Guild or Corporation that consumed the FREE_BONUS
The work around suggested was to use the onBuildingBuilt event in Python to assign the bonus to the city.
Not all herd buildings provide a resource because we have reached the limit in resources so have used gods or other mechanisms.
Two of the buildings, seal and walrus hunter's camp, provide resources fur and ivory respecitvely. The Aluminium Co building that should provide aluminium from RoM days wasn't. This method lets it do so.
Update
Usage of multiple threads added to spawn system. This is mainly an experimental usage as gain in this part of the code will probably not be that large (other parts though might gain quite some speedup from using multiple cores). The way the boost thread library is included is a bit dirty to avoid having to add a DLL to the BtS main directory, so Makefile has to be changed similar to the one I commited (some .obj files added to project libraries).
GC.getGameINLINE().logMsg("Spawn thread finished for %s, found %d valid plots.", spawnInfo.getType(), plots->size());
You are right. It is not safe (I have even seen the effect that it eats up part of the output in the one I have already commented out). Just forgot to move it to the non threaded part.I think the line:
Inside the threaded section might not be safe. What leads you to believe the logMsg() system is thread-safe? You probably need to move this into the serialized section after the rendevous (or mutex it)Code:GC.getGameINLINE().logMsg("Spawn thread finished for %s, found %d valid plots.", spawnInfo.getType(), plots->size());
You are right. It is not safe (I have even seen the effect that it eats up part of the output in the one I have already commented out). Just forgot to move it to the non threaded part.
EDIT: Fixed now.
Yes, the profiling system is definitely not suited to be used inside threads. It loses any ability to get good traces and likely several computations will be wrong.BTW, please be aware that the profiling system is not thread safe, and it runs off macros on nearly every method in all but the final_release build (which should be fine). It **probably** won't crash but likely you'll start to see assertion failures and such, and certainly profiling will break. Please feel free to see if you can find a way to make it thread safe - the code's all in CvGameCoreDLL.* controlled by preprocessor flag USE_INTERNAL_PROFILER
Yes, the profiling system is definitely not suited to be used inside threads. It loses any ability to get good traces and likely several computations will be wrong.
For now I think it is best just not to use the macro in multiple threads at once. It will still be fine if it is only used in one thread at a time or only used when all threads are joined again.
Done, increase gi_ProfilerDisabled before entering and decrease it afterwards.Yeh, but the profiling macro is uised nearly everywhere. Even the simple section you have in the spawn section invokes it MANY times in functions it calls. I suggest you add a mechanism to tell the profiling system to ignore calls/stop ignoring calls and call that around each multi-threaded section for now. It just needs an ON/OFF static the profile-netry fuicntions can switch on.
Just pushed to SVN:
1) A few miscellaneous bug fixes
2) Changed the subdued animal buildings to use <FreeBonus> to provide their free bonuses where appropriate (also the aluminum smelter) and removed the Python event that was doing this on the onBuildingBuilt - this has been tested against the cases DH raised as the original reason for doing it in Python and seems to work fine now. This also means that ctrl-shift-R rebuilds will now correctly preserve herd bonuses
3) Changed the Cobra to only have animal intelligence ;-) (the UNITAIs it had were causing the AI to get stuck in loops)
I ***STRONGLY*** recommend you ctrl-shift-R rebuild your game once you switch to these assets.
Event-provided (via Pythion not via XML) bonuses will still currently be lost, but I'll get that fixed before V18 release.
Removed the extra cassaway.
rev 812 throws this on load:
![]()
I have extras enabled in mlf.