repair speed = build speed?

repair speed = build speed?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

repair speed = build speed?

Post by Caydr »

This is primarily for clarification, with a little bit of feature request if necessary...

Is a unit's repairing speed the same as its construction speed, ore is the construction speed controlled solely by workertime?

If they're not different entities, please make them so if possible.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Do you mean something like this?
0.75b1 changelog wrote:- Added float FBI tag RepairSpeed (default: WorkerTime)
- Added float FBI tag ReclaimSpeed (default: WorkerTime)
- Added float FBI tag ResurrectSpeed (default: WorkerTime)
- Added float FBI tag CaptureSpeed (default: WorkerTime)
- Added float FBI tag TerraformSpeed (default: WorkerTime)
If so, it's already in.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

No, I was already aware of that.. that's what the question was about. Does repairspeed mean the speed a "working, completed" unit is repaired ONLY, or does it also apply to the speed at which a unit builds/assists?
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

Caydr wrote:No, I was already aware of that.. that's what the question was about. Does repairspeed mean the speed a "working, completed" unit is repaired ONLY, or does it also apply to the speed at which a unit builds/assists?
Sounds like something that takes 5 minutes to test. :-)
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

AFAIK (and I know a bit about this, I wrote first version of this patch, then trepan updated and committed it) the engine makes a difference between building and repairing. So yes, the speeds will be different. This includes build-assisting too (build progress of target unit is checked, if it's complete, repair speed is used, otherwise build speed).
builder.cpp:

Code: Select all

  			if (curBuild->buildProgress < 1.0f) {
  				adjBuildSpeed = buildSpeed;  // new build
  			} else {
  				adjBuildSpeed = repairSpeed; // repair
				}
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

You're right, would've taken a minute at the most to test... lazy.. no excuse, I won't even try. I just like to get clarification so things are clear and I don't accidentally placebo myself and do 3 hours of work, only to realize too late that it doesn't actually work... it's happened once or twice... :oops:

Thanks Yuritch. So "build speed" (of an incomplete unit) as defined in spring is "workertime", but all other things can be custom set? That's excellent. I see a lot of potential for this set of tweaks in particular. If you were the one who made the patch, thanks very much.
Post Reply

Return to “Engine”