Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when transfering units on the move #272

Closed
Berg53 opened this issue Mar 25, 2019 · 6 comments · Fixed by #1242
Closed

when transfering units on the move #272

Berg53 opened this issue Mar 25, 2019 · 6 comments · Fixed by #1242

Comments

@Berg53
Copy link

Berg53 commented Mar 25, 2019

When you transfere trucks or tanks to a ally if they moving to s pre selected spot they stop as soon as you transfere them

@Forgon2100
Copy link
Contributor

Forgon2100 commented Mar 25, 2019

The problem is caused by commit 9830d8d.
Instead of transferring a unit, it is destroyed and a new one is created in its place.

The problem can be fixed by simply copying all necessary droid data (actions,
orders, movement data etc.) from the old droid to the new one.
I have tested this so far by simulating a multiplayer game by connecting to
localhost. When handing over a circling VTOL, it no longer falls out of the sky.

I did also discover an old bug: All transferred units are fully loaded!
This means that you can for instance simply swap a large number of VTOLs with
your ally to rearm them instantly and attack the enemy again, without any pads.
Again, I have been able to test and fix this.

However, there remain a few edge cases in which my solution does not work,
for example when a unit is sent to attack an enemy target out of its reach.
In this case, the unit will stop when being transferred and refuse to move.

So there is some more work for me to be done...

@Cyp
Copy link
Member

Cyp commented Mar 29, 2019

I think it should do the destroying/recreating (which both clears its orders and clears orders to kill it) if transferring to an enemy via the nexus link turret, but should just change owner if transferring to an ally voluntarily.

Maybe there could also be an option to give structures to allies, not sure.

@Forgon2100
Copy link
Contributor

I think it should do the destroying/recreating (which both clears its orders and clears orders to kill it) if transferring to an enemy via the nexus link turret, but should just change owner if transferring to an ally voluntarily.

Good point.

Maybe there could also be an option to give structures to allies, not sure.

Nexus Link Turrets cannot capture structures in skirmish and multiplayer games.
Structure transfer to allies is supposed to be possible, but (in my opinion)
not worth implementing.

@KJeff01
Copy link
Member

KJeff01 commented Apr 25, 2019

I did also discover an old bug: All transferred units are fully loaded!
This means that you can for instance simply swap a large number of VTOLs with
your ally to rearm them instantly and attack the enemy again, without any pads.
Again, I have been able to test and fix this.

That can go into a separate PR.

@maxsupermanhd
Copy link
Member

Somebody will add this properties here(

psNewDroid->experience = psD->experience;
)?

@KJeff01 KJeff01 added this to the 3.3.1 milestone Sep 19, 2019
@KJeff01
Copy link
Member

KJeff01 commented Nov 23, 2019

@Forgon2100 Are you working on this still? I could take on the rest of your work if you wish.

EDIT: I have a solution here.

@KJeff01 KJeff01 removed this from the 3.3.1 milestone Jan 19, 2020
@KJeff01 KJeff01 added this to the 3.5.0 milestone Jun 25, 2020
@KJeff01 KJeff01 self-assigned this Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants