Use at() over find() as it makes the code neater and the performance
impact is negligible.
This forces an algorithm change in FindReachableRegions as the key
accessed is not guaranteed to exist.
Differential Revision: https://code.wildfiregames.com/D1830
This was SVN commit r22210.
These variously test some simple MakeGoalReachable and
FindNearestNavcell calls, as well as checking edges and regions when
updating the map.
Differential Revision: https://code.wildfiregames.com/D1833
This was SVN commit r22205.
f0d9806b3f added a problem: Engine.GetGuiObjectByName is unaware of the
caller GUI page.
So GUI pages in the background that still run the onTick and other event
code tried to look on the topmost GUI page, rather than their own GUI
page.
9674c3c0fe added a workaround that has to be copied to any place that
can call JS code.
If developers don't know about the reason for this workaround and add a
new place that can call JS code (#5369), they won't be able to implement
anything.
This removes this workaround by passing the pointer to the correct GUI
page as callback data.
Patch By: elexis
Reviewed By: wraitii
Refs #5369
Trac Tickets: #5369
Differential Revision: https://code.wildfiregames.com/D1701
This was SVN commit r22200.
This changes running speed into a running multiplier (of walk speed).
The advantage is that it simplifies code since you can setup a default
run multiplier at the template level and it'll work for all subsequent
templates, and technologies cannot forget to change it. It makes
specialised unit templates easier to maintain, too.
Formations have a 100 run multiplier which effectively sets their
maximal walking speed at 100
Reviewed By: bb, O2 JS Simulation
Differential Revision: https://code.wildfiregames.com/D438
This was SVN commit r22197.
The variable was introduced in 492e49da38 without being used, neither
did it become used in a later commit. To me it seems that it is a
left-over from a copy paste, as the ".left" functions do use the
variable.
Notice 74c420f658 did cleanup around these lines, but did not remove
this variable
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1813
This was SVN commit r22166.
C4458 in AtlasObjectImpl.cpp line 292 and in AtlasUI/Object.cpp:547
C4456 in MapDialog.cpp:173 and in ScenarioEditor.cpp:742
Reviewed by: @Angen
Accepted by: @Itms
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1741
This was SVN commit r22161.
the variable was removed in 12e2428495. A usage was removed in
9376609ee8.
And since then the usage is useless because we use infinity sky model.
This was SVN commit r22154.
Usage:
let size = Engine.GetGUIObjectByName({gui_object_name}).GetTextSize()
Returns a JS object containing the height and width of the primary text
field within
the object, taking into account new lines, text wrapping, and font
changes.
Unless the object doesn't contain text, in which case the method will
return undefined.
Commented on by: vladislavbelov
Additional code by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D844
This was SVN commit r22134.
the skybox at the current camera location, so that the skybox appears
indefinitely far away. Refs #3458.
Reviewed By: wraitii
Tested By: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D1683
This was SVN commit r22039.
This generally makes this code cleaner and easier to maintain, while
also being more modern and fully tested.
Looked at by: leper
Differential Revision: https://code.wildfiregames.com/D8
This was SVN commit r22029.
By rendering sides even when they are back-facing, the water shader is
on top of a mesh instead of emptiness and this solves an old
"edge-of-map" graphical issue.
Taken out from D359 with vlad's agreement. See screenshots there for
more information on the exact issue.
This was SVN commit r22007.
The water manager computations for "fancy water effects" have always
been quite slow. I've updated one of the functions to be much faster,
and the other doesn't need to be called (apparently, since I removed
coastal foam, which tbh I don't remember doing).
This should all be redone entirely to be honest, as it's generally
terrible, but in the short-termâ„¢ this makes this function almost usable
in real-time.
Differential Revision: https://code.wildfiregames.com/D78
This was SVN commit r22006.
This allows using arbitrary 'mul' values with Integer types, instead of
having to switch them to Decimal types.
The ParamNode is not aware of validation (thus types) so a better
solution is incredibly non-trivial.
Differential Revision: https://code.wildfiregames.com/D268
This was SVN commit r22003.
Revelead by the A23 crash when hosting a game in the lobby. We have a
debug_break() call that calls "kill" with SIGTRAP, which generally
doesn't get handled correctly in release versions, particularly on OSX.
Differential Revision: https://code.wildfiregames.com/D1499
This was SVN commit r21998.