To achieve this, mirage entities are created per player, to replace the
real entities when these ones fall into the fog-of-war. These mirage
entities are created on-the-fly, and destroyed when they get back in
sight.
This depends heavily on the VisibilityChanged message added in
2174eaaeee.
As a temporary adjustment, territories do not explore the map anymore
when their borders change. See #2709.
Fixes#599
This was SVN commit r15612.
The ScriptInterface pointer can be NULL there, so using it without
checking is not safe.
This fixes the problem by continuing with the exact stack rooting
changes, which makes the temporary solution unnecessary.
Fixes#2707
Refs #2415
This was SVN commit r15611.
I had to change a few other functions to take JS::MutableHandleValue
because JS::Stringify takes a JS::MutableHandleValue as input parameter.
That seems a bit strange because it should not change that value.
I assume it has historical reasons.
Refs #2415
Refs #2462
This was SVN commit r15605.
It might actually be needed again in the future, but I think even then
it would be easier to rewrite it than having to update the code in the
meantime.
Refs #2462
This was SVN commit r15600.
Changes CallFunction and CallFunctionVoid to use a HandleValue as object
parameter. Also changes some JS serialization/deserialization functions
to only support the JSAPI rooted types (drop support for CScriptVal and
CScriptValRooted there). Some other functions got changed too because
they were closely related.
Refs #2415
Refs #2462
This was SVN commit r15592.
* CGameLoader created a new JS::Value when assigning to m_Metadata.
This means it didn't actually update metadata in SavedGames::Load. The
new approach solves this problem and should work well if
CScriptValRooted gets replaced in the future.
* The cloning in ScriptFunctions.cpp was required. Removing it caused
compartment mismatches.
* Now CGameLoader loads the metadata unconditinally because we didn't
actually use the option to not load load it.
Ref #2415
This was SVN commit r15589.
Changes GetProperty, SetProperty and HasProperty and a few other
functions to take handles. The conversions to CScriptVal or
CScriptValRooted at some places should be removed in the future. I've
done that to avoid an even larger patch.
Refs #2415
Refs #2462
This was SVN commit r15568.
* Adds additional overloads/specializations which are required when
passing JS::Handle<T>/JS::MutableHandle<T> types to different functions.
* Replaces GetPropertyJS with a GetProperty specialization.
* Allows us to avoid the implementation of ToJSVal specializations for
JS::Value and JS::HandleValue. Such conversions should only happen if
there's no way around it and if you are aware of it.
* Adds test to make sure that all potentially required specializations
with custom implementations are instantiated. This should help prevent
introducing bugs in temporarily unused code.
Refs #2415
This was SVN commit r15567.
I still experience troubles with serialization tests but I played a few
games without OOS. At least these changes will help us to debug more
efficiently the remaining problems.
Fixes initialization of visibility data and update order for LoS-related
systems (territory borders, etc).
Also removes a C-like array and fixes a player ID shifting.
Refs #599
This was SVN commit r15563.
Rooting works different now and the CScriptVal types are going to be
removed. We will need rooting tests again, but they will have to work
completely different than this test implementation.
Refs #2415
This was SVN commit r15562.