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

Basic online compatibility and a lot of other stuff #24

Closed
wants to merge 32 commits into from

Conversation

maybegreat48
Copy link
Contributor

@maybegreat48 maybegreat48 commented Sep 23, 2023

  • Added an anticheat bypass
  • Fixed noclip
  • Added settings serialization
  • Refactored the GUI
  • Added some protections (does not currently block every crash)
  • Notification Service
  • Players list

TODO:

  • Readd column components

@github-actions
Copy link

github-actions bot commented Sep 23, 2023

Download the artifacts for this pull request:

@DayibBaba
Copy link
Contributor

Were the hotkeys broken on the main branch?

@DayibBaba DayibBaba linked an issue Sep 23, 2023 that may be closed by this pull request
@DayibBaba
Copy link
Contributor

Is the migrationdatanode bs the same here as in gta?

@maybegreat48
Copy link
Contributor Author

maybegreat48 commented Sep 29, 2023

Is the migrationdatanode bs the same here as in gta?

Yes. The P2Cs apparently ported that from YimMenu

@DayibBaba
Copy link
Contributor

Is the migrationdatanode bs the same here as in gta?

Yes. The P2Cs apparently ported that from YimMenu

Figures

@DayibBaba DayibBaba linked an issue Oct 1, 2023 that may be closed by this pull request
@MarkEcza
Copy link
Contributor

MarkEcza commented Oct 3, 2023

Please split the PR next time, title is "Basic online compatibility" but i see you refactored the GUI and did other stuff that has nothing to do with online. It would be better if you do them one pr at a time so we can also review them easily and rapidly. That way we can avoid unnecessary code bugs and issues.

@maybegreat48 maybegreat48 changed the title Basic online compatibility Basic online compatibility and a lot of other stuff Oct 8, 2023
@maybegreat48 maybegreat48 marked this pull request as ready for review October 9, 2023 15:00
src/game/pointers/Pointers.cpp Outdated Show resolved Hide resolved
if (!m_Handle || !m_Handle->m_PlayerInfo)
return nullptr;

return m_Handle->m_PlayerInfo->m_Ped;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really return an Entity?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't, but we don't have a ped helper class yet

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't, but we don't have a ped helper class yet

PTR to handle? You already have it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait does this even compile with no warnings/errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually does

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually does

We were just confused about Entity being a class instead of a typedef here. Odd name for that class.

src/game/features/Features.cpp Show resolved Hide resolved
src/core/frontend/manager/Submenu.cpp Outdated Show resolved Hide resolved
src/core/frontend/manager/UIManager.cpp Outdated Show resolved Hide resolved
src/core/frontend/manager/UIManager.cpp Outdated Show resolved Hide resolved

if (ImGui::BeginChild("##options", ImVec2(0, 0), true))
{
if (m_OptionsFont)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to isolate core and reuse it for other projects like YimMenuV2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to isolate core and reuse it for other projects like YimMenuV2

I mean the m_OptionsFont nullptr check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can choose not to have an options font

src/game/features/self/Suicide.cpp Outdated Show resolved Hide resolved
src/game/hooks/Info/AssignPhysicalIndex.cpp Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/game/backend/Players.cpp Show resolved Hide resolved
src/game/hooks/Info/AssignPhysicalIndex.cpp Outdated Show resolved Hide resolved
src/game/hooks/Info/AssignPhysicalIndex.cpp Show resolved Hide resolved
@MarkEcza
Copy link
Contributor

Also is hotkeys fixed?

@MarkEcza
Copy link
Contributor

"TODO:

Readd column components

"?

class next_column : public option {
    public:
		next_column() {};

		void draw() override {
			ImGui::NextColumn();
		}
	};

	class set_column_offset : public option {
	public:
		set_column_offset(int column, int offset) : m_column(column), m_offset(offset) {};

		void draw() override {
			ImGui::SetColumnOffset(m_column, m_offset);
		}
	private:
		int m_column;
		int m_offset;
	};

	class column : public option {
	public:
		column(int columns) : m_columns(columns) {};

		void add_option(std::shared_ptr<option> box) {
			m_options.push_back(std::move(box));
		}

		void add_next_column() {
			m_options.push_back(std::make_shared<next_column>());
		}

		void add_offset(int column, int offset) {
			m_options.push_back(std::make_shared<set_column_offset>(column, offset));
		
		}

		void draw() override {

			ImGui::Columns(m_columns);

			for (const auto& box : m_options) {
				if (box) {
					box->draw();
				}			
			}
		}

	private:
		int m_columns;
		std::vector<std::shared_ptr<option>> m_options;
	};
	``` This?

This was linked to issues Oct 12, 2023
@DayibBaba
Copy link
Contributor

Migrated to #36

@DayibBaba DayibBaba closed this Oct 13, 2023
@maybegreat48 maybegreat48 deleted the settings branch October 14, 2023 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification Service Online Players list Crash handler Settings system to save variables
3 participants