Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Spawn returning optimization

Open TaranDahl opened this issue 1 year ago • 1 comments

Buildings with foundation bigger than 1x1 can now recycle spawned correctly. A new flag Spawner.RecycleRange allow the spawner can recycle spawns in long-range. A new flag Spawner.RecycleAnim allow playing an anim when the spawned is recycled.

TaranDahl avatar Jul 31 '24 15:07 TaranDahl

the doc is incomplete. Should add description for Spawner.RecycleOnTurret and Spawner.FLH (should be Spawner.RecycleFLH probably?)

It's not the doc, it's the code. I once planned the recycle flh to be impl recently, but it seems that it is not as simple as I thought. gamemd will act the following codes if the spawnee is not close enough to the spawner. The spawnee will target the spawner rather than the spawner's coords. I don't know how to apply flh on this. I will make the unfinished flags comment. I may impl them when I have an idea.

pSpawnee->SetDestination(pSpawnee, this->Owner, 1);
pSpawnee->SetTarget(pSpawnee, 0);
pSpawnee->QueueMission(pSpawnee, Mission_Move, 0);

TaranDahl avatar Aug 17 '24 03:08 TaranDahl

This pr is completed and ready to be reviewed. I think.

TaranDahl avatar Feb 24 '25 17:02 TaranDahl

The use of buildings may differ from real FLH, as GetRenderCoords() is used for buildings, while TechnoExt::GetFLHAbsoluteCoords called here will use GetCoords(). Of course, this will effectively avoid the problem of Z-axis being below 0. Meanwhile, since the turret of the building uses PrimaryFacing, using this function is unlikely to rotate regardless of whether there is a turret or not.

CrimRecya avatar Feb 26 '25 13:02 CrimRecya

gonna merge https://github.com/Phobos-developers/Phobos/pull/1349 first. Please check if these 2 functions are compatible with each other

Coronia avatar Mar 10 '25 02:03 Coronia

gonna merge #1349 first. Please check if these 2 functions are compatible with each other-----------谷歌翻译-----------首先要合并#1349。请检查这两个功能是否彼此兼容

There should be no conflict.

TaranDahl avatar Mar 10 '25 03:03 TaranDahl

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Mar 11 '25 09:03 github-actions[bot]

The tester confirmed that there is no conflict with the existing functions.

TaranDahl avatar Mar 11 '25 10:03 TaranDahl