1
This commit is contained in:
parent
9dc884d02d
commit
e7915dbe7d
@ -163,21 +163,14 @@ bool MovementComponent::TestCollision()
|
|||||||
for (Entity* entity : detection_objects) {
|
for (Entity* entity : detection_objects) {
|
||||||
switch (entity->entity_type) {
|
switch (entity->entity_type) {
|
||||||
case ET_Obstacle:
|
case ET_Obstacle:
|
||||||
{
|
|
||||||
if (
|
|
||||||
(hum->last_collision_door == nullptr || hum->last_collision_door != entity) &&
|
|
||||||
hum->TestCollision(entity)
|
|
||||||
){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case ET_Building:
|
case ET_Building:
|
||||||
{
|
{
|
||||||
if (hum->TestCollision(entity)) {
|
if (!entity->dead && hum->TestCollision(entity)) {
|
||||||
|
if (hum->last_collision_door != entity) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user