1
0
forked from 0ad/0ad

Also do transform

This was SVN commit r24441.
This commit is contained in:
bb 2020-12-23 17:48:24 +00:00
parent 6205f687e4
commit 19762acf03

View File

@ -40,8 +40,8 @@ function ChangeEntityTemplate(oldEnt, newTemplate)
if (cmpCapturable && cmpNewCapturable)
{
let scale = cmpCapturable.GetMaxCapturePoints() / cmpNewCapturable.GetMaxCapturePoints();
let newCp = cmpCapturable.GetCapturePoints().map(v => v / scale);
cmpNewCapturable.SetCapturePoints(newCp);
let newCapturePoints = cmpCapturable.GetCapturePoints().map(v => v / scale);
cmpNewCapturable.SetCapturePoints(newCapturePoints);
}
// Maintain current health level