Spawn returning optimization
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.
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);
This pr is completed and ready to be reviewed. I think.
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.
gonna merge https://github.com/Phobos-developers/Phobos/pull/1349 first. Please check if these 2 functions are compatible with each other
gonna merge #1349 first. Please check if these 2 functions are compatible with each other-----------谷歌翻译-----------首先要合并#1349。请检查这两个功能是否彼此兼容
There should be no conflict.
Nightly build for this pull request:
- compiled-dll-03434b602c4a8ed60dfde2cb61f0fa9f8882ee1f.zip These artifacts will expire in 90 days and will not be available for download after that time.
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.
The tester confirmed that there is no conflict with the existing functions.