Page MenuHomeWildfire Games

Remove a useless min value when building a structure
ClosedPublic

Authored by fatherbushido on May 25 2017, 5:47 PM.

Details

Summary

rP13267
rP13268 need to give a positive min value in case due to floor
rP19625 remove the floor

So I guess we can remove the min value.

Test Plan

-

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

fatherbushido created this revision.May 25 2017, 5:47 PM
Vulcan added a subscriber: Vulcan.May 25 2017, 6:34 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/1352/ for more details.

Executing section Default...
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/Foundation.js
| 197| »   »   »   »   »   »   &&·(cmpOwnership.GetOwner()·==·0·||·cmpFoundationOwnership·&&·cmpOwnership.GetOwner()·==·cmpFoundationOwnership.GetOwner()))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/Foundation.js
| 197| »   »   »   »   »   »   &&·(cmpOwnership.GetOwner()·==·0·||·cmpFoundationOwnership·&&·cmpOwnership.GetOwner()·==·cmpFoundationOwnership.GetOwner()))
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/simulation/components/Foundation.js
| 238| »   »   »   var·cmpFoundationOwnership·=·Engine.QueryInterface(this.entity,·IID_Ownership);
|    | [NORMAL] JSHintBear:
|    | 'cmpFoundationOwnership' is already defined.

binaries/data/mods/public/simulation/components/Foundation.js
| 309| »   »   var·pos·=·cmpPosition.GetPosition2D();
|    | [NORMAL] JSHintBear:
|    | 'pos' is already defined.

binaries/data/mods/public/simulation/components/Foundation.js
| 311| »   »   var·rot·=·cmpPosition.GetRotation();
|    | [NORMAL] JSHintBear:
|    | 'rot' is already defined.
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/41/ for more details.

wraitii edited edge metadata.May 26 2017, 8:15 AM

Feels like we can remove the Math.max in fact.

fatherbushido added a comment.EditedMay 26 2017, 8:37 AM
In D550#22639, @wraitii wrote:

Feels like we can remove the Math.max in fact.

EDIT: ah yes, we don't expect to have a negative value :p

It seems we can remove the Math.Min too
Yes it's handled in that Health function. (I noticed that in other place too, Promotion and Transform perhaps).

wraitii requested changes to this revision.May 26 2017, 9:49 AM

Just for administrative purposes.

This revision now requires changes to proceed.May 26 2017, 9:49 AM
fatherbushido planned changes to this revision.May 26 2017, 10:29 AM
fatherbushido edited edge metadata.

max is handle in health, min is useless as the thing is not negative

Vulcan added a comment.Jun 4 2017, 4:14 PM
Executing section Default...
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/Foundation.js
| 339| »   »   »   let·cmpOwnership·=·Engine.QueryInterface(this.entity,·IID_Ownership);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'cmpOwnership' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/Foundation.js
| 197| »   »   »   »   »   »   &&·(cmpOwnership.GetOwner()·==·0·||·cmpFoundationOwnership·&&·cmpOwnership.GetOwner()·==·cmpFoundationOwnership.GetOwner()))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/Foundation.js
| 197| »   »   »   »   »   »   &&·(cmpOwnership.GetOwner()·==·0·||·cmpFoundationOwnership·&&·cmpOwnership.GetOwner()·==·cmpFoundationOwnership.GetOwner()))
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/simulation/components/Foundation.js
| 238| »   »   »   var·cmpFoundationOwnership·=·Engine.QueryInterface(this.entity,·IID_Ownership);
|    | [NORMAL] JSHintBear:
|    | 'cmpFoundationOwnership' is already defined.

binaries/data/mods/public/simulation/components/Foundation.js
| 308| »   »   var·pos·=·cmpPosition.GetPosition2D();
|    | [NORMAL] JSHintBear:
|    | 'pos' is already defined.

binaries/data/mods/public/simulation/components/Foundation.js
| 310| »   »   var·rot·=·cmpPosition.GetRotation();
|    | [NORMAL] JSHintBear:
|    | 'rot' is already defined.
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/125/ for more details.

Vulcan added a comment.Jun 4 2017, 5:59 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1469/ for more details.

wraitii accepted this revision.Jun 24 2017, 11:41 AM
This revision is now accepted and ready to land.Jun 24 2017, 11:41 AM
This revision was automatically updated to reflect the committed changes.