Coder Social home page Coder Social logo

Comments (6)

KJeff01 avatar KJeff01 commented on May 2, 2024 1

@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.

from warzone2100.

Forgon2100 avatar Forgon2100 commented on May 2, 2024

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...

from warzone2100.

Cyp avatar Cyp commented on May 2, 2024

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.

from warzone2100.

Forgon2100 avatar Forgon2100 commented on May 2, 2024

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.

from warzone2100.

KJeff01 avatar KJeff01 commented on May 2, 2024

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.

from warzone2100.

maxsupermanhd avatar maxsupermanhd commented on May 2, 2024

Somebody will add this properties here(

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

from warzone2100.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.