Move update path to movement manager so all movement will use paths

This commit is contained in:
KimLS
2018-09-18 23:06:56 -07:00
parent 2224b83ae0
commit f754cb1307
14 changed files with 66 additions and 236 deletions
+4 -4
View File
@@ -1355,7 +1355,7 @@ XS(XS_EntityList_OpenDoorsNear) {
Perl_croak(aTHX_ "Usage: EntityList::OpenDoorsNear(THIS, NPC* opener)");
{
EntityList *THIS;
NPC *opener;
Mob *opener;
if (sv_derived_from(ST(0), "EntityList")) {
IV tmp = SvIV((SV *) SvRV(ST(0)));
@@ -1365,11 +1365,11 @@ XS(XS_EntityList_OpenDoorsNear) {
if (THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
if (sv_derived_from(ST(1), "NPC")) {
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
opener = INT2PTR(NPC *, tmp);
opener = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "opener is not of type NPC");
Perl_croak(aTHX_ "opener is not of type Mob");
if (opener == nullptr)
Perl_croak(aTHX_ "opener is nullptr, avoiding crash.");