Reset collision tag on visualiser boat after displaying collision

- Modified View3D to index subjects rather than shapes by source ID
- Enforced one collision per boat on server to reduce rendering load
- Changed collision radius to less than bounce radius
- Fixed game-breaking null command bug

#story[1195]
This commit is contained in:
Connor Taylor-Brown
2017-09-14 22:36:18 +12:00
parent 0888a743a7
commit 90c258e9e9
9 changed files with 44 additions and 60 deletions
@@ -98,6 +98,11 @@ public class Boat extends Collider {
*/
private boolean sailsOut = true;
/**
* Indicates whether boat is currently involved in a collision
*/
private boolean isColliding = false;
/**
* Constructs a boat object with a given sourceID, name, country/team abbreviation, and polars table.
*
@@ -407,7 +412,7 @@ public class Boat extends Collider {
@Override
public boolean rayCast(Boat boat) {
if(boat != this) {
return rayCast(boat, 100);
return rayCast(boat, 15);
} else return false;
}
@@ -419,4 +424,12 @@ public class Boat extends Collider {
notifyObservers(e);
}
}
public boolean isColliding() {
return isColliding;
}
public void setColliding(boolean colliding) {
isColliding = colliding;
}
}
@@ -29,11 +29,6 @@ public class Mark extends Collider{
*/
private GPSCoordinate position;
/**
* Repulsion radius of the mark
*/
private double repulsionRadius = 50;
/**
* Constructs a mark with a given source ID, name, and position.
* @param sourceID The source ID of the mark.
@@ -97,7 +92,7 @@ public class Mark extends Collider{
@Override
public boolean rayCast(Boat boat) {
return rayCast(boat, repulsionRadius);
return rayCast(boat, 15);
}
@Override