mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-25 14:14:46 -04:00
Fix block model entities pushing you (Thanks CyberToon)
This commit is contained in:
parent
8f44f43ef2
commit
97636267e2
@ -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) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user