Make teleporter a little less eager.
This commit is contained in:
parent
57aaafa789
commit
a67740f6ce
|
@ -83,9 +83,12 @@ static void action(void)
|
||||||
|
|
||||||
static void touch(Entity *other)
|
static void touch(Entity *other)
|
||||||
{
|
{
|
||||||
|
int mostlyInside;
|
||||||
float tx, ty;
|
float tx, ty;
|
||||||
|
|
||||||
if (self->active && other != self && (other->flags & (EF_TELEPORTING | EF_NO_TELEPORT)) == 0)
|
mostlyInside = abs((self->x + (self->w / 2)) - other->x) < 8;
|
||||||
|
|
||||||
|
if (self->active && mostlyInside && other != self && (other->flags & (EF_TELEPORTING | EF_NO_TELEPORT)) == 0)
|
||||||
{
|
{
|
||||||
tx = self->tx;
|
tx = self->tx;
|
||||||
other->tx += self->w / 2;
|
other->tx += self->w / 2;
|
||||||
|
|
Loading…
Reference in New Issue