The script interface has code to serialize/deserialize JS objects with a
user-defined prototype. That code is usable in the AI, but currently
unused (and there are no plans to use it in the long run).
Removing it allows removing more code down the line, which helps with
the SM45-52 migration.
Collaboration with itms.
Refs #4893
Differential Revision: https://code.wildfiregames.com/D2897
This was SVN commit r24157.
ComputeTargetPosition called Dot() with large enough vectors that it
overflowed. Avoid that by not actually doing the full dot product.
Reported by: Itms
Fixes#5852
Differential Revision: https://code.wildfiregames.com/D3061
This was SVN commit r24152.
Following d592bf9cb6, paths requested at turn N were set-up to be
computed between the end of turn N and the start of turn N+1 (which
would ultimately allow threading this computation), via calls to
'StartProcessingMoves' and 'FetchAsyncResultsAndSendMessages'.
However, the call to UpdateGrid() remained at the start of turn N+1,
between the 'start' and 'fetch' calls. Since all paths are currently
computed on the 'start' call, this means all paths are computed on a
(possibly) dirty pathfinder grid.
In particular, this leads to OOS on rejoin since the rejoiner will
recompute the grid before computing the outstanding paths.
This would also obviously be buggy in a threaded environment, since some
paths might be computed on the fresh and some on the dirty grid.
Finally, MT_TurnStart was sent before the paths were computed, which
might lead to further pathfinder grid changes (not a crashing problem
without threading, but still conceptually odd). The 'fetch' call is thus
moved before it.
This thus fixes d592bf9cb6/D1918, after 92ad6a61fa already fixed a first
issue.
Since the grid is now only updated at the end of a turn, we need to
ensure that it is correct on Turn 0, thus the pathfinder recomputes it
on InitGame.
Refs D14
Reported by: Itms
Fixes#5851
Differential Revision: https://code.wildfiregames.com/D3064
This was SVN commit r24142.
Commented By: Stan
Reported By: Freagarach
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3059
This was SVN commit r24129.
939002f0dc changed from vectors to grid which broke resetting when
terrain size changed.
Also use SAFE_ARRAY_DELETE for simplicity.
Reported by: vladislavbelov
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2961
This was SVN commit r24117.
Added in 9023f4bebb, which changed lobby GUI messages to JS::Values,
requiring a real context. The original code mistakenly inverted the
owning script interfaces.
Given the reproducibility discovered in SM52, the timeline of the bug,
and the nature of the issues encountered in MP, this is a rather safe
fix for #5655.
Reviewed By: Itms
Fixes#5655
Differential Revision: https://code.wildfiregames.com/D2922
This was SVN commit r24116.
Disable GPUSkinning when glsl is disabled, because VertexAttribPointer
is not implemented on ARB/GLES and it is called by GPUSkinning.
Differential Revision: D2423
Reviewed by: vladislavbelov
Fixes: #5635
This was SVN commit r24101.
Introduced in 5fbb224dc0
rewrite 3 ifs to 1 if
merge 2 member variables into 1 member variable
remove 2 function local variables
save one call for CComponentManager as both ifs would or execute or not
code is shorter and looks nicer
Differential Revision: D3009
Reviewed by: bb
This was SVN commit r24072.
Summary:
As reported by @bb and @Angen , 375c319639 broke formation walking in a
few situations.
The issue is that f489ab3a16/D2871 requires formation members to get no
messages until the controller is stopped, but 375c319639 didn't use the
correct function (on account of a missed rebase), so members stopped too
early.
Reported by: bb, Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D3006
This was SVN commit r24029.
Splash falloff was calculated using centre-to-point distance, where
nearest-edge to nearest-edge ought to have been used.
Use DistanceToPoint to correct for that.
Make sure the damage multiplier cannot go negative.
Remove GetUnitSize in favour of GetSize.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D2963
This was SVN commit r24010.
This will prevent users who have an old NVTT installed on their system
from experiencing crashes. Other NVTT issues at runtime should be fixed
by clearing the cache.
Differential Revision: https://code.wildfiregames.com/D2765
This was SVN commit r23974.
Before the NVTT upgrade, no DXT1a file would have been properly decoded:
they would all have been mistaken for a 8bpp greyscale due to a logic
issue in our code, which would have triggered a crash. I did not notice
the logic issue when performing the upgrade. As a result, decoding those
files now fails silently: their alpha bit will be ignored and they will
be handled as DXT1.
This patch fixes the logic and allows us to decode DXT1a properly, in
accordance with the format specifications. Currently, we do not use this
format.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2522
This was SVN commit r23973.
Removes usages of fixed pipeline functions in shader path.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2944
This was SVN commit r23954.
ShaderModelRendererInternals is defined twice, once by ModelRenderer.cpp
and once by HWLightingModelRenderer.cpp.
Having two different definitions in the global namespace is a violation
of the C++ One-Definition-Rule.
Patch by: StefanBruens
Reviewed By: wraitii, Vladislav
Differential Revision: https://code.wildfiregames.com/D2932
This was SVN commit r23941.
As reported by Freagarach following a7da40ac2f.
32e8ed51aa introduced a "MoveObstructed" message, that could be sent
when the entity ran into obstructions, to stop early.
In HandleObstructedMove, my intention, as written in the comment, was
that the caller would do its thing (call StopMoving(), move out of the
world etc.) and thus ComputeGoal would return early.
However, I mistakenly left the `cmpPosition->GetPosition2D()` in between
that and ComputeGoal, which would then fail.
This fixes that by moving it after the `ComputeGoal` call.
Also add a sanity StopMoving() call to a7da40ac2f's move-out-of-world
call.
Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2935
This was SVN commit r23940.
CLogger.h uses std::deque but doesn't include the required header file.
This fails since 5473393e30 on Arch Linux
Reported by: navigo_ps91
Reviewed By: irishninja
Differential Revision: https://code.wildfiregames.com/D2928
This was SVN commit r23933.
This fixes the transfer of key inputs from WxWidgets to SDL, making it
possible to type in the in-game GUI from Atlas.
Also fixes whitespace issues in some Atlas files.
The following improvements are OSX specific:
- fixes an SDL assertion related to unused subsystems in Atlas.
- Remove the 'osxguiapplication' override. This fixes the editor
starting up in the background and not accepting input when launched from
in-game.
- To prevent an issue with sdl/wxwidgets conflict when running from
inside the game, actually boot a new instance (see #2427)
Reported by: wik (Many thanks for your investigations)
Tested by: trompetin17, Stan
Fixes#2427Fixes#2846
Differential Revision: https://code.wildfiregames.com/D2788
This was SVN commit r23926.
Improve unitAI: don't move if the requester can reach us and we are
close enough. This avoids an issue where ships moved more than necessary
when picking up many units.
Also improve requester UnitAI -> retry pickup if the target entity is
Idle.
Improve unitMotion: periodically recompute paths in "known bad path"
mode to adapt to moving targets.
Expose UnitMotion reachability to scripts and other code.
This adds a test map for some common and some tricky pickup cases, using
triggers.
Based on a patch by: causative
Reviewed By: Freagarach
Fixes#3472
Differential Revision: https://code.wildfiregames.com/D665
This was SVN commit r23925.
This crash occured on the receiver machine, making it effectively a
remote crash attack.
Reported by: Riddler66
Based on a patch by: elexis
Fixes#5726
Differential Revision: https://code.wildfiregames.com/D2629
This was SVN commit r23918.
Implement a simple HTTP server to start games, receive the gamestate and
pass commands to the simulation.
This is mainly intended for training reinforcement learning agents in 0
AD. As such, a python client and a small example are included.
This option can be enabled using the -rl-interface flag.
Patch by: irishninja
Reviewed By: wraitii, Itms
Fixes#5548
Differential Revision: https://code.wildfiregames.com/D2199
This was SVN commit r23917.
Removing strict binding of selection to footprint by adding optional
choice similar in footprint. If present, that one will be used, else it
will fallback to footprint size.
Allowing to use any selection shape without affecting gameplay, because
foorprint is used for projectile hit detection.
Differential revision: https://code.wildfiregames.com/D2844
Reviewed by: wraitii
This was SVN commit r23900.