Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2335,7 +2335,7 @@ Sinkable.SquidGrab=true ; boolean

### Stationary vehicles

- Setting VehicleType `Speed` to 0 now makes game treat them as stationary, behaving in very similar manner to deployed vehicles with `IsSimpleDeployer` set to true. Should not be used on buildable vehicles, as they won't be able to exit factories.
- Setting `JumpjetAccel` to 0 for VehicleTypes with `Locomotor=Jumpjet` or setting `Speed` to 0 for other now makes game treat them as stationary, behaving in very similar manner to deployed vehicles with `IsSimpleDeployer` set to true. Should not be used on buildable vehicles, as they won't be able to exit factories.

### Turret recoil

Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ Phobos fixes:
- Fixed a bug causing transfering AttachEffects (e.g on `DeploysInto`/`UndeploysInto`) not to immediately recalculate stats or tint (by Starkku)
- Fixed a bug where updating the `OpenTopped` attribute during convert did not update the coordinates of passengers (by NetsuNegi)
- Fixed `Shrapnel.AffectsBuildings=true` shrapnel weapons being able to hit the building itself, potentially multiple times, if it had foundation larger than 1x1 (by Starkku)
- Fixed a bug where stationary vehicles would also block movement caused by external factors (by Noble_Fish)

Fixes / interactions with other extensions:
<!-- - Allowed `AuxBuilding` and Ares' `SW.Aux/NegBuildings` to count building upgrades (by Ollerus) -->
Expand Down
12 changes: 10 additions & 2 deletions src/Ext/Techno/Body.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Body.h"
#include "Body.h"

#include <JumpjetLocomotionClass.h>

Expand Down Expand Up @@ -750,9 +750,17 @@ bool TechnoExt::IsHealthInThreshold(TechnoClass* pObject, double min, double max

bool TechnoExt::CannotMove(UnitClass* pThis)
{
if (pThis->LocomotorSource)
return false;

const auto pType = pThis->Type;

if (pType->Speed == 0)
if ((pType->Speed == 0
&& (pType->Locomotor != LocomotionClass::CLSIDs::Jumpjet
|| pType->Teleporter))
|| (pType->Locomotor == LocomotionClass::CLSIDs::Jumpjet
&& !pType->Teleporter
&& pType->JumpjetAccel == 0.0))
return true;

const auto movementRestrictedTo = pType->MovementRestrictedTo;
Expand Down
Loading