Skip to content

Commit f071afa

Browse files
committed
Player class: Forgot to bind setCamera
1 parent cd368b2 commit f071afa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

VCMP-LUA/vcmpWrap/Classes/Player.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ void Player::setCam(sol::table position, sol::table lookAt) const
263263
g_Funcs->SetCameraPosition(m_ID, position[1], position[2], position[3], lookAt.get_or<float>(1, position[1]), lookAt.get_or<float>(2, position[2]), lookAt.get_or<float>(3, position[3]));
264264
}
265265

266+
void Player::setCamEx(float camX, float camY, float camZ, float lookX, float lookY, float lookZ) const
267+
{
268+
g_Funcs->SetCameraPosition(m_ID, camX, camY, camZ, lookX, lookY, lookZ);
269+
}
270+
266271
void Player::kick() const
267272
{
268273
g_Funcs->KickPlayer(m_ID);
@@ -488,6 +493,7 @@ void Player::Init(sol::state* L) {
488493
userdata["giveWeapon"] = &Player::giveWeapon;
489494
userdata["setVehicle"] = sol::overload(&Player::setVehicle, &Player::setVehicleWithSlot);
490495
userdata["redirect"] = &Player::redirect;
496+
userdata["setCamera"] = sol::overload(&Player::setCam, &Player::setCamEx);
491497
userdata["restoreCamera"] = &Player::restoreCamera;
492498
userdata["selectClass"] = &Player::selectClass;
493499
userdata["setAnimation"] = sol::overload(&Player::setAnimationCompact, &Player::setAnimation);

VCMP-LUA/vcmpWrap/Classes/Player.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class Player {
7171
void selectClass() const;
7272
void eject() const;
7373
void setCam(sol::table, sol::table) const;
74+
void setCamEx(float, float, float, float, float, float) const;
7475

7576
void kick() const;
7677
void ban() const;

0 commit comments

Comments
 (0)