Skip to content

Commit

Permalink
Tweaked influence diameter rendering for client
Browse files Browse the repository at this point in the history
  • Loading branch information
David52920 committed Feb 11, 2021
1 parent 94e959c commit 035dff4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion build-release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ declare -a clientfiles=(
"gclogo.ico"
"gclogo.png"
"user.config"
"server.config"
"version.txt"
)
for file in "${clientfiles[@]}"; do
Expand Down Expand Up @@ -109,7 +110,7 @@ fi
# generate package for user. If using git bash, follow instructions here:
# https://ranxing.wordpress.com/2016/12/13/add-zip-into-git-bash-on-windows/
# # TODO: add MSI, deb package installers here if wanted.
if ! zip -r "$CLIENTZIPNAME" . -9 --exclude "/$(basename "$CLIENTUSERDIR")/*" --exclude "/$(basename "$CLIENTHTTPDIR")/*" --exclude "digest.txt" --exclude "digest2.txt" --exclude "version.txt">/dev/null; then
if ! zip -r "$CLIENTZIPNAME" . -9 --exclude "/$(basename "$CLIENTUSERDIR")/*" --exclude "/$(basename "$CLIENTHTTPDIR")/*" --exclude "digest.txt" --exclude "server.config" --exclude "digest2.txt" --exclude "version.txt">/dev/null; then
echo "failed to zip client files."
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,22 +641,20 @@ private void renderEntities() {

// Y position of the vessel
float yy = getIsometricY(vessel.getX(), vessel.getY(), vessel);

if (canDraw(xx + vessel.getOrientationLocation().getOffsetx(), yy + vessel.getOrientationLocation().getOffsety(), vessel.getRegionWidth(), vessel.getRegionHeight())) {
// draw vessel
stage.getBatch().begin();
stage.getBatch().draw(vessel, xx + vessel.getOrientationLocation().getOffsetx(), yy + vessel.getOrientationLocation().getOffsety());
stage.getBatch().end();
}


Vector3 v = new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0);
othercamera.unproject(v, 0, 200, Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - 200);
float xxx = (xx + vessel.getOrientationLocation().getOffsetx()) + 8;
float yyy = (yy + vessel.getOrientationLocation().getOffsety()) + 8 ;

float xxx = xx + vessel.getOrientationLocation().getOffsetx();
float yyy = yy + vessel.getOrientationLocation().getOffsety();

if (v.x>= xxx && v.x <= xxx + vessel.getRegionWidth() && v.y >= yyy && v.y <= yyy + vessel.getRegionHeight()) {
if (v.x>= xxx - 10 && v.x <= xxx + vessel.getRegionWidth() && v.y >= yyy - 170 && v.y <= yyy + vessel.getRegionHeight()) {

// get diameter, divide by sqrt(2): our diameter matches |_ (geometric), but we want \ (isometric).
float diameter = (vessel.getInfluenceRadius() * 2) / 1.4142f;
Expand Down
3 changes: 3 additions & 0 deletions server.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Fri Dec 04 09:43:16 CST 2020
server.room_locations=4973:5647;Room 1,4974:9875;Room 2,4970:1783;Room 3,4971:2777;Room 4,4999:6542;Room 5
server.last_address=growup.ddns.net

0 comments on commit 035dff4

Please sign in to comment.