Fix block model entities pushing you (Thanks CyberToon)

This commit is contained in:
UnknownShadow200 2017-03-02 16:17:20 +11:00
parent 8f44f43ef2
commit 97636267e2

View File

@ -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) &&