diff --git a/changelog.txt b/changelog.txt index 556069f21..b63e8a5dc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 08/18/2014 == +Uleat: Fix for https://github.com/EQEmu/Server/issues/127 -- also activated a remarked action in doors.cpp to eliminate a memory leak. + == 08/16/2014 == KLS: (addmoreice) Trying out some unstable DB changes. Do backup your database before trying them as master will be considered unstable for a few days at least. Uleat (Noudness): Fixed a floating-point comparison error that led to the notorious 'client bounce' (this is not related to the diff --git a/zone/doors.cpp b/zone/doors.cpp index ab0b54c8f..a453191a1 100644 --- a/zone/doors.cpp +++ b/zone/doors.cpp @@ -253,8 +253,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) strcpy(tmpmsg, "Door is locked by an unknown guild"); } sender->Message(4, tmpmsg); - // safe_delete(outapp); - // /\ possible missing line..all other 'fail' returns seem to have it + safe_delete(outapp); return; } // a key is required or the door is locked but can be picked or both diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 816956d86..ecb2c4d18 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -1259,7 +1259,22 @@ XS(XS_Client_MovePC) if(THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->MovePC(zoneID, x, y, z, heading); + if (THIS->IsClient()) { + THIS->MovePC(zoneID, x, y, z, heading); + } + else { + if (THIS->IsBot()) + _log(CLIENT__ERROR, "Perl(XS_Client_MovePC) attempted to process a type Bot reference"); + else if (THIS->IsMerc()) + _log(CLIENT__ERROR, "Perl(XS_Client_MovePC) attempted to process a type Merc reference"); + else if (THIS->IsNPC()) + _log(CLIENT__ERROR, "Perl(XS_Client_MovePC) attempted to process a type NPC reference"); + else + _log(CLIENT__ERROR, "Perl(XS_Client_MovePC) attempted to process an Unknown type reference"); + + Perl_croak(aTHX_ "THIS is not of type Client"); + } + } XSRETURN_EMPTY; } @@ -1288,7 +1303,21 @@ XS(XS_Client_MovePCInstance) if(THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->MovePC(zoneID, instanceID, x, y, z, heading); + if (THIS->IsClient()) { + THIS->MovePC(zoneID, instanceID, x, y, z, heading); + } + else { + if (THIS->IsBot()) + _log(CLIENT__ERROR, "Perl(XS_Client_MovePCInstance) attempted to process a type Bot reference"); + else if (THIS->IsMerc()) + _log(CLIENT__ERROR, "Perl(XS_Client_MovePCInstance) attempted to process a type Merc reference"); + else if (THIS->IsNPC()) + _log(CLIENT__ERROR, "Perl(XS_Client_MovePCInstance) attempted to process a type NPC reference"); + else + _log(CLIENT__ERROR, "Perl(XS_Client_MovePCInstance) attempted to process an Unknown type reference"); + + Perl_croak(aTHX_ "THIS is not of type Client"); + } } XSRETURN_EMPTY; }