Skip to content

Commit

Permalink
Change preciserespawn to be based on noclip in
Browse files Browse the repository at this point in the history
ClassicalSharp
  • Loading branch information
Goodlyay committed Jan 7, 2019
1 parent 1525434 commit ffa81f8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ClassicalSharp/Entities/LocalPlayer.cs
Expand Up @@ -180,7 +180,7 @@ public class LocalPlayer : Player, IGameComponent {
AABB bb;

// Spawn player at highest valid position
if (Hacks.CanAnyHacks) {
if (Hacks.CanNoclip) {
if (game.World.IsValidPos(P)) {
bb = AABB.Make(spawn, Size);
for (int y = P.Y; y <= game.World.Height; y++) {
Expand Down Expand Up @@ -220,11 +220,10 @@ public class LocalPlayer : Player, IGameComponent {

bool HandleSetSpawn() {
if (Hacks.CanRespawn) {
if (!Hacks.CanAnyHacks && !onGround) {
game.Chat.Add("&cCannot set spawn mid-air while hacks are disabled");
if (!Hacks.CanNoclip && !onGround) {
return false;
}
if (!Hacks.CanAnyHacks) {
if (!Hacks.CanNoclip) {
Spawn.X = Position.X;
Spawn.Y = Position.Y;
Spawn.Z = Position.Z;
Expand Down

0 comments on commit ffa81f8

Please sign in to comment.