You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes & improvements to electric bolt handling (#1587)
- Reverts the previous, partial or non-functional fixes for crash at
`0x4C2C19`.
- Replaces the code for handling tracking of electric bolts and their
owner technos to support multiple electric bolt instances per techno
(vanilla tracks this with single pointer in UnitClass only). This
tracking code also correctly works for units in limbo which should
prevent the aforementioned crash from occuring at all.
- This tracking is used to determine whether or not the electric bolt
updates its source coordinate based on FLH on every frame, allowing it
to follow techno's rotation, movement etc. By default this is only
enabled for vehicles just as before but can be overridden per weapon by
explicitly setting value for `Bolt.FollowFLH`. It now correctly takes
burst into accord thanks to changes mentioned in previous point.
Fixes#1585
Copy file name to clipboardExpand all lines: docs/Fixed-or-Improved-Logics.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
194
194
- Fixed issues caused by incorrect reference removal (f.ex. If the unit cloaks/enters transport, it cannot gain experience from previously launched spawners/C4/projectiles).
195
195
- Fixed an issue that caused `IsSonic=true` wave drawing to crash the game if the wave traveled over a certain distance.
196
196
- Buildings with foundation bigger than 1x1 can now recycle spawner correctly.
197
+
- Electric bolts that are supposed to update their position based on units current firing coords (by default, those fired by vehicles) now do so correctly for more than one concurrent electric bolt.
- You can now specify individual bolts you want to disable for `IsElectricBolt=true` weapons. Note that this is only a visual change.
1671
1672
- By default `IsElectricBolt=true` effect draws a bolt with 8 arcs. This can now be customized per WeaponType with `Bolt.Arcs`. Value of 0 results in a straight line being drawn.
1672
1673
-`Bolt.Duration` can be specified to explicitly set the overall duration of the visual electric bolt effect. Only values in range of 1 to 31 are accepted, values outside this range are clamped into it.
1674
+
-`Bolt.FollowFLH` can be used to override the default behaviour where the electric bolt source coordinates change to match the unit's firing coord on every frame (making it follow unit's movement, rotation etc). Defaults to true on vehicles, false for everything else.
Due to technical constraints, these features do not work with electric bolts created from support weapon of [Ares' Prism Forwarding](https://ares-developers.github.io/Ares-docs/new/buildings/prismforwarding.html).
1688
+
Due to technical constraints, these features do not work with electric bolts created from support weapon of [Ares' Prism Forwarding](https://ares-developers.github.io/Ares-docs/new/buildings/prismforwarding.html) or those from AirburstWeapon.
Copy file name to clipboardExpand all lines: docs/Whats-New.md
+2
Original file line number
Diff line number
Diff line change
@@ -328,6 +328,7 @@ New:
328
328
- No turret unit turn to the target (by CrimRecya & TaranDahl)
329
329
- Damage multiplier for different houses (by CrimRecya)
330
330
- Customizable duration for electric bolts (by Starkku)
331
+
- Customizable FLH tracking for electric bolts (by Starkku)
331
332
- Extended gattling rate down logic (by CrimRecya)
332
333
- Sell or undeploy building on impact (by CrimRecya)
333
334
- No rearm and reload in EMP or temporal (by CrimRecya)
@@ -350,6 +351,7 @@ Vanilla fixes:
350
351
- Prevent the units with locomotors that cause problems from entering the tank bunker (by TaranDahl)
351
352
- Fixed an issue that harvesters with amphibious movement zone can not automatically return to refineries with `WaterBound` on water surface (by NetsuNegi)
352
353
- Buildings with foundation bigger than 1x1 can now recycle spawned correctly (by TaranDahl)
354
+
- Electric bolts that are supposed to update their position based on units current firing coords (by default, those fired by vehicles) now do so correctly for more than one concurrent electric bolt (by Starkku)
353
355
354
356
Fixes / interactions with other extensions:
355
357
- Allowed `AuxBuilding` and Ares' `SW.Aux/NegBuildings` to count building upgrades (by Ollerus)
TechnoTypeClass* PreviousType; // Type change registered in TechnoClass::AI on current frame and used in FootClass::AI on same frame and reset after.
32
+
std::vector<EBolt*> ElectricBolts;
32
33
int AnimRefCount; // Used to keep track of how many times this techno is referenced in anims f.ex Invoker, ParentBuilding etc., for pointer invalidation.
33
34
bool ReceiveDamage;
34
35
bool LastKillWasTeamTarget;
@@ -75,6 +76,7 @@ class TechnoExt
75
76
, AttachedEffects {}
76
77
, AE {}
77
78
, PreviousType { nullptr }
79
+
, ElectricBolts {}
78
80
, AnimRefCount { 0 }
79
81
, ReceiveDamage { false }
80
82
, LastKillWasTeamTarget { false }
@@ -153,6 +155,7 @@ class TechnoExt
153
155
private:
154
156
template <typename T>
155
157
voidSerialize(T& Stm);
158
+
voidClearElectricBolts();
156
159
};
157
160
158
161
classExtContainerfinal : public Container<TechnoExt>
0 commit comments