These variables together held the state for the target of UnitMotion, as
set by the MoveTo[X] family of functions.
Wrapping them in a struct reduces the chances that one will accidentally
forget to reset part of the state and makes it explicit in-code that
these are grouped together.
Calling StopMoving() resets this target, which wasn't before and left
the component in an incoherent state.
Differential Revision: https://code.wildfiregames.com/D1887
This was SVN commit r22352.
UnitAI is now solely in charge of moving and stopping, making UnitMotion
behaviour easier to predict, which will ultimately help with unitAI
development. It might temporarily make units more resilient than before
however.
UnitMotion also tells UnitAI that it's arrived with "MoveCompleted"
messages, but these actually could be wrong - unitAI could decide that
we didn't want to stop after all - so change the name for something less
misleading.
Differential Revision: https://code.wildfiregames.com/D1886
This was SVN commit r22351.
"MoveStarted" messages were sent by UnitMotion when the unit started
moving (sort of) or failed to do so. This was used by formations and
guarding but was not really necessary as this can be done in "enter" or
in a timer.
Differential Revision: https://code.wildfiregames.com/D1885
This was SVN commit r22350.
These functions were placed in UnitMotion, which had nothing to do with
range checks and made them available only to moving entities for no
particular reason.
This patch also adds support for square-square range checks and
shape-shape distance checks.
Modified from a patch by bb on top of work from wraitii.
Differential Revision: https://code.wildfiregames.com/D981
This was SVN commit r22345.
ThreadUtil shipped a scope lock and a mutex implementation, which can be
removed since we now have these in the standard library.
This lets us clean up this header which get included everywhere (through
profiler includes).
Tested By: Angen and Stan
Differential Revision: https://code.wildfiregames.com/D1915
This was SVN commit r22344.
Reuse the timer code in the gathering sub-state to avoid broken
duplication.
Reported By: minohaka
Test By: Angen
Differential Revision: https://code.wildfiregames.com/D1956
This was SVN commit r22342.
0c20afdfda had two issues:
- some of the unitAI code did not return true when switching states in
the "enter" phase
- missed a return false in unitMotion.cpp
This fixes the issue noticed by @bb.
Differential Revision: https://code.wildfiregames.com/D1947
This was SVN commit r22339.
Patch by Angen, based on the previous bat script for the autobuilder
job.
Comments by Stan.
Differential Revision: https://code.wildfiregames.com/D1909
This was SVN commit r22338.
Add the tech to ranges, and make them also pop upin captured barracks
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1941
This was SVN commit r22329.
- Rename civil_centre to civic_center
- Rename the shield prop object to a more explicit name.
- The template and the rubble template should be renamed in another
commit to make sure that do not affect the AI.
This was SVN commit r22327.
Including:
Remove LongWall from gates
Change the ("unused") gate cost component in more reasonable number and
adapt the repairTimeRatio with it to keep the health/second the same
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1794
This was SVN commit r22325.
- Move the * and & to the correct side,
- Add .0 and 0.f to clearly mark the types
- Pass pointers instead of arrays
- Add a newline after forward declaration
- Add spaces between operators
- Use c++ cast
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1934
This was SVN commit r22323.
Including:
moves template_structure_military_barracks_stables.xml to
template_structure_military_stable.xml
updates all its children accordingly
merges values from pers_stable.xml into the new generic template
changes generic name Stable (singular, without s)
standardizes rubble sizes to 5x5 (pers had 4x4)
corrects specific name for Greek factions
adds foundation actor to kush_stable.xml
Patch By: Nescio
Comments By: Angen
Differential Revision: https://code.wildfiregames.com/D1790
This was SVN commit r22322.
There was a setback when I used tinypng to compress the images as it
eliminated necessary image component.
Reviewed by: Stan
This was SVN commit r22318.
Move checks for rendering a frame in Render() to avoid missing calls to
this functions, which can crash on certain systems.
Move the sound manager's idle task out of Render().
Move the buffer swapping in Render() since we do not need to swap
buffers unless we are rendering.
Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1495
This was SVN commit r22314.
This also moves the actual "moving" code to states instead of orders,
making states more self-contained and removing the change of errors when
cleaning up a state.
Differential Revision: https://code.wildfiregames.com/D1865
This was SVN commit r22313.
To use:
```
./update-workspaces.sh --prefer-local-libs
```
Then run `make` as usual.
Accepted by: Itms
Differential Revision: https://code.wildfiregames.com/D1747
This was SVN commit r22308.
Fix some decals,
Remove AO suffix,
Rename struct_b to roof
Use stable_elephant as per the art convention
<general>_<civ>_<type>_<extra>_<variation>
This was SVN commit r22306.
Having Async in the name was not really informative and made it awkward
to reuse for non-async code.
Reviewed By: Kuba386
Differential Revision: https://code.wildfiregames.com/D1854
This was SVN commit r22305.
This implements a status effects receiver component (in a similar
fashion to the damage receiver component). The plan is to further extend
this component notably to handle graphical indication of status effects,
and a variety of other effects.
Currently implemented: ranged attacks can inflict status effects that
reduce HP over time.
This can be resisted by armour.
No units currently utilise this in-game but with proper graphics support
that could be changed.
Patch By: Mate-86
Reviewed By: wraitii
References #1912
Differential Revision: https://code.wildfiregames.com/D1252
This was SVN commit r22304.
Expect a 10-25% build time improvement.
Original Patch By: Angen
Reviewed By: Angen
References #5038
Differential Revision: https://code.wildfiregames.com/D1333
This was SVN commit r22303.
Destroying INVALID_ENTITY is valid and should do nothing.
The current code will send MT_Destroy messages when doing this, which is
un-necessary work and feels kind of broken to me.
Early-exit instead.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1736
This was SVN commit r22300.
It improves readability of the code when a function that seems like it
does a simple check actually only does a simple check and the caller is
the one changing state.
Differential Revision: https://code.wildfiregames.com/D1884
This was SVN commit r22299.
This improves refractions around entities close to the surface, such as
fishes, by handling depth better and by clipping the water plane a
little lower.
This uses the skybox for reflections when refractions are enabled but
reflections are disabled, making it possible to play with reflections
disabled without having super-ugly water (arguably a performance
improvement).
Differential Revision: https://code.wildfiregames.com/D359
This was SVN commit r22297.
This uses trigger to create some scientific test cases for unit motion
(the whole unitAI->Motion->Pathfinders stack)
Differential Revision: https://code.wildfiregames.com/D1892
This was SVN commit r22296.