There are only a couple of error values worth considering, so we can just
write out own function for it. Disable error checking in C4FoWRegion.cpp as
well, since we have the --debug-opengl flag now.
This should allow us to get rid of the GLU dependency soon.
..by not using proplist access too much. I noticed the Playground would start lagging (debug build) and the profiler told me it was the mosquitos.
Before, 83% of the time in Mosquito::Activity was spent in MoveToTarget. After the change, only around 70% (multiple runs).
Is this a sensible way to measure the change?
Previous:
[14:30:22] 00186ms Mosquito.Activity
[14:30:22] 00155ms Mosquito.MoveToTarget
Afterwards:
[14:37:37] 00238ms Mosquito.Activity
[14:37:37] 00172ms Mosquito.MoveToTarget
Moving the flags from CMAKE_CXX_FLAGS to OC_CXX_FLAGS, adding flags and
removing duplicates keeps CMAKS_CXX_FLAGS from growing. Unfortunately,
-std=gnu++0x needs to be in CMAKE_CXX_FLAGS before compiler features get
tested, but CMAKE_CXX_FLAGS is filled from OC_CXX_FLAGS further down.
Fortunately, all tests for compiler flags are quite simple, so they can be
done at the beginning, and the feature tests after that. Reorder the code
accordingly.
In order to be able to remove duplicates from the list, each flags needs to
be a separate list item. Otherwise, the flags from the previous run in
CMAKE_CXX_FLAGS, which are now separate list items due to
separate_arguments(), will not be recognized as duplicates of the freshly
added flags. Fortunately, in the next round the two sets of flags in
CMAKE_CXX_FLAGS will be reduced to one set, so there were never more than
two copies of the warning flags.
Otherwise, when starting the next scenario, random spots would be initially
re-lighted. That's not necessarily a problem, but unnecessary work, and it
triggered the assertion in C4FowAmbient::UpdateFromLandscape if the relight
was scheduled for a region that's outside of the landscape boundaries of the
second scenario.
This means that ice, melted down to 10%, does not become a 9mm bullet anymore. It also means that all objects are at least visibly moved - e.g. when deflecting arrows.
The axe could always be used as a weapon. It dealt such a low amount of damage that it was basically useless, though. Hits required to kill a Clonk are now 9 (down from 17). The axe is still a lot weaker and slower than the sword.
It's just not ridiculously stupid anymore to try to use the axe as a weapon now.
We are now not trying to deceive the players anymore (who might have actually THOUGHT that the axe was usable as a weapon, because it is used just like the sword).
The alternative would be to disable the weapon-use completely.
This doesn't work for intros, though, because they use simple messages. We should unify the systems to only have one dialogue system that uses new-style-menus and implement required features in those menus..