Skip to content

Commit

Permalink
Add some more other shit (#2)
Browse files Browse the repository at this point in the history
adds some properties
  • Loading branch information
gurrrrrrett3 authored Apr 6, 2024
1 parent e4c0c4e commit c091f07
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json
RosaServer/git_version.cpp
RosaServer/git_version.cpp
6 changes: 6 additions & 0 deletions RosaServer/rosaserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ void luaInit(bool redo) {
auto meta = lua->new_usertype<Connection>("new", sol::no_constructor);
meta["port"] = &Connection::port;
meta["timeoutTime"] = &Connection::timeoutTime;
meta["numReceivedEvents"] = &Connection::numReceivedEvents;

meta["class"] = sol::property(&Connection::getClass);
meta["address"] = sol::property(&Connection::getAddress);
Expand Down Expand Up @@ -556,6 +557,9 @@ void luaInit(bool redo) {
meta["viewYaw"] = &Human::viewYaw;
meta["viewPitch"] = &Human::viewPitch;
meta["viewYaw2"] = &Human::viewYaw2;
meta["viewYawVel"] = &Human::viewYawVel;
meta["gearX"] = &Human::gearX;
meta["gearY"] = &Human::gearY;
meta["strafeInput"] = &Human::strafeInput;
meta["walkInput"] = &Human::walkInput;
meta["viewPitch2"] = &Human::viewPitch2;
Expand Down Expand Up @@ -589,6 +593,7 @@ void luaInit(bool redo) {
meta["tieColor"] = &Human::tieColor;
meta["necklace"] = &Human::necklace;
meta["lastUpdatedWantedGroup"] = &Human::lastUpdatedWantedGroup;
meta["burgerEatCooldown"] = &Human::burgerEatCooldown;

meta["class"] = sol::property(&Human::getClass);
meta["__tostring"] = &Human::__tostring;
Expand Down Expand Up @@ -722,6 +727,7 @@ void luaInit(bool redo) {
meta["price"] = &VehicleType::price;
meta["mass"] = &VehicleType::mass;
meta["numWheels"] = &VehicleType::numWheels;
meta["carBodyOffset"] = &VehicleType::carBodyOffset;

meta["class"] = sol::property(&VehicleType::getClass);
meta["__tostring"] = &VehicleType::__tostring;
Expand Down
10 changes: 6 additions & 4 deletions RosaServer/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,12 @@ struct Human {
float viewPitch; // 9c
PAD(0xd8 - 0x9c - 4);
float viewYaw2; // d8
PAD(0x12c - 0xd8 - 4);
PAD(0x12c - 0xd8 - 8);
float gearX; // 128
float strafeInput; // 12c
float unk21; // 130
float gearY; // 130
float walkInput; // 134
int unk22; // 138
int viewYawVel; // 138
float viewPitch2; // 13c
PAD(0x214 - 0x13c - 4);
/*
Expand Down Expand Up @@ -717,7 +718,8 @@ struct VehicleType {
float mass; // 38
PAD(0x17878 - 0x38 - 4);
int numWheels; // 17878
PAD(0x185C0 - 0x17878 - 4);
PAD(0x18534 - 0x45d6 - 4);
Vector carBodyOffset; // 99636

const char* getClass() const { return "VehicleType"; }
std::string __tostring() const;
Expand Down

0 comments on commit c091f07

Please sign in to comment.