From 97636267e2637112a12510d131737d8b453abc53 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 2 Mar 2017 16:17:20 +1100 Subject: [PATCH] Fix block model entities pushing you (Thanks CyberToon) --- ClassicalSharp/Entities/Components/PhysicsComponent.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ClassicalSharp/Entities/Components/PhysicsComponent.cs b/ClassicalSharp/Entities/Components/PhysicsComponent.cs index 309512cb2..f3bb873f5 100644 --- a/ClassicalSharp/Entities/Components/PhysicsComponent.cs +++ b/ClassicalSharp/Entities/Components/PhysicsComponent.cs @@ -1,5 +1,6 @@ // Copyright 2014-2017 ClassicalSharp | Licensed under BSD-3 using System; +using ClassicalSharp.Model; using ClassicalSharp.Physics; using OpenTK; @@ -275,6 +276,7 @@ namespace ClassicalSharp.Entities { for (int id = 0; id < EntityList.MaxCount; id++) { Entity other = game.Entities[id]; if (other == null || other == entity) continue; + if (other.Model is BlockModel) continue; // block models shouldn't push you bool yIntersects = entity.Position.Y <= (other.Position.Y + other.Size.Y) &&