- Timestamp:
- 06/03/18 13:49:55 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/binaries/data/mods/public/maps/random/danubius_triggers.js
r21767 r21834 487 487 Trigger.prototype.IsLeftRiverside = function(ent) 488 488 { 489 return this.riverDirection.cross(Vector2D.sub(TriggerHelper.GetEntityPosition2D(ent), this.mapCenter)) >0;489 return Vector2D.sub(TriggerHelper.GetEntityPosition2D(ent), this.mapCenter).cross(this.riverDirection) < 0; 490 490 }; 491 491 … … 616 616 617 617 // Be able to distinguish between the left and right riverside 618 // TODO: The Vector2D types don't survive deserialization, so use an object with x and y properties only! 618 619 let mapSize = TriggerHelper.GetMapSizeTerrain(); 619 this.mapCenter = new Vector2D(mapSize / 2, mapSize / 2); 620 this.riverDirection = Vector2D.sub( 620 this.mapCenter = clone(new Vector2D(mapSize / 2, mapSize / 2)); 621 622 this.riverDirection = clone(Vector2D.sub( 621 623 TriggerHelper.GetEntityPosition2D(this.GetTriggerPoints(triggerPointRiverDirection)[0]), 622 this.mapCenter) ;624 this.mapCenter)); 623 625 624 626 this.StartCelticRitual();
Note:
See TracChangeset
for help on using the changeset viewer.
