Skip to content

Commit

Permalink
chore: missing vehicleRotation is a LogicException
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasGrether committed Aug 13, 2024
1 parent 82e97ff commit 45f036c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CorrectPlayerMovePredictionPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function encodePayload(PacketSerializer $out) : void{
$out->putVector3($this->delta);
if($this->predictionType === self::PREDICTION_TYPE_VEHICLE) {
if($this->vehicleRotation == null) { // this should never be the case
throw new \InvalidArgumentException("CorrectPlayerMovePredictionPackets with type VEHICLE require a vehicleRotation to be provided");
throw new \LogicException("CorrectPlayerMovePredictionPackets with type VEHICLE require a vehicleRotation to be provided");
}

$out->putFloat($this->vehicleRotation->getX());
Expand Down

0 comments on commit 45f036c

Please sign in to comment.