[Quest API] Add GMMove Overloads to Perl/Lua (#3719)

# Perl
- Add `$mob->GMMove(x, y, z, heading, save_guard_spot)`.

# Lua
- Add `mob:GMMove(x, y, z, heading, save_guard_spot)`.

# Notes
- Operators weren't able to disable saving guard spots, so moving with `GMMove` meant NPCs stayed where they were moved.
This commit is contained in:
Alex King
2023-11-25 18:15:37 -05:00
committed by GitHub
parent 56be69ddb1
commit fdc5c27061
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -326,6 +326,11 @@ void Perl_Mob_GMMove(Mob* self, float x, float y, float z, float heading) // @ca
self->GMMove(x, y, z, heading);
}
void Perl_Mob_GMMove(Mob* self, float x, float y, float z, float heading, bool save_guard_spot) // @categories Script Utility
{
self->GMMove(x, y, z, heading, save_guard_spot);
}
bool Perl_Mob_HasProcs(Mob* self) // @categories Stats and Attributes
{
return self->HasProcs();
@@ -3469,6 +3474,7 @@ void perl_register_mob()
package.add("FindType", (bool(*)(Mob*, uint16_t, bool, uint16_t))&Perl_Mob_FindType);
package.add("GMMove", (void(*)(Mob*, float, float, float))&Perl_Mob_GMMove);
package.add("GMMove", (void(*)(Mob*, float, float, float, float))&Perl_Mob_GMMove);
package.add("GMMove", (void(*)(Mob*, float, float, float, float, bool))&Perl_Mob_GMMove);
package.add("Gate", &Perl_Mob_Gate);
package.add("GetAA", &Perl_Mob_GetAA);
package.add("GetAABonuses", &Perl_Mob_GetAABonuses);