Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some more other shit #2

Merged
merged 7 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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