GetSpawnPointX(), GetSpawnPointY(), GetSpawnPointZ(), and GetSpawnPointH(), converted to GetSpawnPoint()

This commit is contained in:
Arthur Ice 2014-11-30 15:58:44 -08:00
parent 2e6711916e
commit e6d23228e5
3 changed files with 6 additions and 4 deletions

View File

@ -269,7 +269,8 @@ void Lua_NPC::PauseWandering(int pause_time) {
void Lua_NPC::MoveTo(float x, float y, float z, float h, bool save) {
Lua_Safe_Call_Void();
self->MoveTo(x, y, z, h, save);
auto position = xyz_heading(x, y, z, h);
self->MoveTo(position, save);
}
void Lua_NPC::NextGuardPosition() {

View File

@ -281,8 +281,8 @@ public:
void StopWandering();
void ResumeWandering();
void PauseWandering(int pausetime);
void MoveTo(float mtx, float mty, float mtz, float mth, bool saveguardspot);
void GetClosestWaypoint(std::list<wplist> &wp_list, int count, const xyz_location& location );
void MoveTo(const xyz_heading& position, bool saveguardspot);
void GetClosestWaypoint(std::list<wplist> &wp_list, int count, const xyz_location& location);
uint32 GetEquipment(uint8 material_slot) const; // returns item id
int32 GetEquipmentMaterial(uint8 material_slot) const;

View File

@ -1345,7 +1345,8 @@ XS(XS_NPC_MoveTo)
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->MoveTo(mtx, mty, mtz, mth, saveguard);
auto position = xyz_heading(mtx, mty, mtz, mth);
THIS->MoveTo(position, saveguard);
}
XSRETURN_EMPTY;
}