Skip to content

Commit

Permalink
chore: remove unused qualifier org.joml.* (#4644)
Browse files Browse the repository at this point in the history
  • Loading branch information
pollend authored May 3, 2021
1 parent e0f93fe commit 0d39a3b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ public void onAttackRequest(AttackRequest event, EntityRef character, CharacterC
if (!onItemUseEvent.isConsumed()) {
EntityRef gazeEntity = GazeAuthoritySystem.getGazeEntityForCharacter(character);
LocationComponent gazeLocation = gazeEntity.getComponent(LocationComponent.class);
org.joml.Vector3f direction = gazeLocation.getWorldDirection(new org.joml.Vector3f());
org.joml.Vector3f originPos = gazeLocation.getWorldPosition(new org.joml.Vector3f());
Vector3f direction = gazeLocation.getWorldDirection(new Vector3f());
Vector3f originPos = gazeLocation.getWorldPosition(new Vector3f());
if (recordAndReplayCurrentStatus.getStatus() == RecordAndReplayStatus.RECORDING) {
directionAndOriginPosRecorderList.getAttackEventDirectionAndOriginPosRecorder().add(direction,
originPos);
} else if (recordAndReplayCurrentStatus.getStatus() == RecordAndReplayStatus.REPLAYING) {
org.joml.Vector3f[] data =
Vector3f[] data =
directionAndOriginPosRecorderList.getAttackEventDirectionAndOriginPosRecorder().poll();
direction = data[0];
originPos = data[1];
Expand Down Expand Up @@ -311,14 +311,14 @@ private boolean isPredictionOfEventCorrect(EntityRef character, ActivationReques
CharacterComponent characterComponent = character.getComponent(CharacterComponent.class);
EntityRef camera = GazeAuthoritySystem.getGazeEntityForCharacter(character);
LocationComponent location = camera.getComponent(LocationComponent.class);
org.joml.Vector3f direction = location.getWorldDirection(new org.joml.Vector3f());
Vector3f direction = location.getWorldDirection(new Vector3f());
if (!(event.getDirection().equals(direction, 0.0001f))) {
logger.error("Direction at client {} was different than direction at server {}", event.getDirection(), direction);
}
// Assume the exact same value in case there are rounding mistakes:
direction = event.getDirection();

org.joml.Vector3f originPos = location.getWorldPosition(new org.joml.Vector3f());
Vector3f originPos = location.getWorldPosition(new Vector3f());
if (!(event.getOrigin().equals(originPos, 0.0001f))) {
String msg = "Player {} seems to have cheated: It stated that it performed an action from {} but the predicted position is {}";
logger.info(msg, getPlayerNameFromCharacter(character), event.getOrigin(), originPos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.joml.Math;
import org.joml.Quaternionf;
import org.joml.RoundingMode;
import org.joml.Vector3f;
import org.joml.Vector3i;
import org.slf4j.Logger;
Expand Down Expand Up @@ -91,8 +92,8 @@ public CharacterStateEvent step(CharacterStateEvent initial, CharacterMoveInputE
// The CharacterMovementComponent also has a 'radius' which may be used here.
// Question: Is this connected with _shapes_ or bounding boxes in some way?
checkBlockEntry(entity,
new Vector3i(initial.getPosition(), org.joml.RoundingMode.HALF_UP),
new Vector3i(result.getPosition(), org.joml.RoundingMode.HALF_UP),
new Vector3i(initial.getPosition(), RoundingMode.HALF_UP),
new Vector3i(result.getPosition(), RoundingMode.HALF_UP),
characterMovementComponent.height);
}
if (result.getMode() != MovementMode.GHOSTING && result.getMode() != MovementMode.NONE) {
Expand Down
4 changes: 2 additions & 2 deletions engine/src/main/java/org/terasology/engine/math/Side.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static Side inDirection(int x, int y, int z) {

/**
* The side normal closes to dir
*
*
* @param dir direction
* @return side
*/
Expand Down Expand Up @@ -299,7 +299,7 @@ public Side rollClockwise(int turns) {
* @param dest will hold the result
* @return dest
*/
public org.joml.Vector3i getAdjacentPos(Vector3ic pos, org.joml.Vector3i dest) {
public Vector3i getAdjacentPos(Vector3ic pos, Vector3i dest) {
return dest.set(pos).add(direction());
}

Expand Down

0 comments on commit 0d39a3b

Please sign in to comment.