Skip to content

AI removes from existence the offensive structure with UndeploysInto when AI player is forced to undeploy #1851

@FS-21

Description

@FS-21

Description

I found the culprit of why deployed offensive units into structures, controlled by AI dissappears after finishing the undeploy animation:
Image

Started with this commit from the build-34: e359a87

the AI undeployment "from structure into vehicle" was ruined when an enemy forced the deployed vehicle/structure to undeploy (for example when the deployer's weapon has a minimum range and the enemy is inside the minimum range).
The deployer after finishing the undeploy animation is simply "banished" from existence.

Phobos Version

Any version since build-34 (to be exact since commit e359a87 )

Conditions to reproduce

Wait for the AI to deploy any affected unit and attack the deployed unit forcing the AI to undeploy into vehicle again.

INI code

Any offensive vehicle-To-Building that uses the Tiberian Sun logic and with "UndeploysInto" tag for the transformation from structure:

[ARTYDEP]
UIName=name:ARTYDEP
Name=Deployed Avd. Artillery
TechLevel=11
Strength=250
Points=28
BattlePoints=14
FireAngle=25
Cost=1400
Soylent=700
Bounty.Value=140
Power=0
Armor=deployed_light_armor
Sight=9
Explosion=TSTWLT070,TSS_BANG48,TSS_BRNL58,TSS_CLSN58,TSS_TUMU60
MaxDebris=4
DebrisAnims=TSDBRIS1LG,TSDBRIS2LG,TSDBRIS3LG,TSDBRIS4LG,TSDBRIS5LG,TSDBRIS6LG,TSDBRIS7LG,TSDBRIS8LG,TSDBRIS9LG,TSDBRS10LG,TSDBRIS1SM,TSDBRIS2SM,TSDBRIS3SM,TSDBRIS4SM,TSDBRIS5SM,TSDBRIS6SM,TSDBRIS7SM,TSDBRIS8SM,TSDBRIS9SM,TSDBRS10SM
Prerequisite=NODWEAP,TSNARADR
UndeploysInto=ART2
Owner=NodCountry,NodCountry2
BaseNormal=no
VoiceSelect=TSHVRSelect
VoiceMove=TSHVRMove
VoiceAttack=TSHVRAttack
VoiceSpecialAttack=TSHVRAttack
Primary=TS155mm
ElitePrimary=TS155mmE
Turret=yes
ROT=5
Artillary=yes
TurretAnim=ART2TUR
TurretAnimIsVoxel=true
TurretAnimX=-8
TurretAnimY=12 ;15
TurretAnimZAdjust=-20
ThreatPosed=75	; This value MUST be 0 for all building addons
DamageParticleSystems=TSSparkSys,TSSmallGreySSys,TSBigGreySmokeSys
DamageSmokeOffset=500, 500, 400
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,SENSORS;,CLOAK
Trainable=yes
TogglePower=no
HasStupidGuardMode=false
Size=3
TooBigToFitUnderBridge=true
Bunkerable=no; Units default to yes, others default to no
IsSelectableCombatant=yes ; TR
AllowedToStartInMultiplayer=no
DeployFacing=0
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
ImmuneToRadiation=no
DamageSound=Dummy
ToProtect=yes
Cursor.NoDeploy=NoGenericTSDeploy
Chronoshift.IsVehicle=yes
MassSelectable=yes
GroupAs=ADVARTY2
SelfHealing.CombatDelay=450 ; Ares tag. How long after the last hit for starting heals
SelfHealing.Amount=1 ; Ares tag. How much HPs
SelfHealing.Rate=0.032 ; Ares tag. Minutes between applying repair steps
SelfHealing.RookieMax=50% ; Ares tag. % When will stop healing?
SelfHealing.VeteranMax=75% ; Ares tag. % When will stop healing?
SelfHealing.EliteMax=100% ; Ares tag. % When will stop healing?
ConsideredVehicle=true

; artillery cannon
[TS155mm]
Damage=176 ;w150
ROF=160 ;110
Range=18
MinimumRange=5
Projectile=TSBallistic
Speed=30
Warhead=ARTYHE3
Report=ts120mmx1
Anim=GUNFIRE
Lobber=yes

Steps to reproduce

  • Code an offensive deployed vehicle (like Nod artillery from Tiberian Sun) with a minimum weapons range.
  • Let AI to deploy that unit
  • Move a unit inside the minimum attack range of the deployed vehicle and attack the unit to force the decision of undeploy.
  • When the deploy animation ended the unit dissappears with no reason, magic.

Expected behaviour

What you expect for the building2vehicle undeploy logic from TS game (since Phobos build-33 worked without problems)

Actual behaviour

The affected AI's vehicle dissappears when the undeploy animation ends.

Additional context

No response

Checklist

  • The issue happens on the latest official version of Phobos and wasn't fixed yet.
  • I agree to elaborate the details if requested and provide thorough testing if the bugfix is implemented.
  • I added a very descriptive title to this issue.
  • I used the GitHub search and read the issue list to find a similar issue and didn't find it.
  • I have attached as much information as possible (screenshots, gifs, videos, debug and exception logs, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions