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

Introduce Player Debug UI + fixes for debug stuffs #47

Merged
merged 10 commits into from
Jan 19, 2024
Merged

Conversation

Deewarz
Copy link
Contributor

@Deewarz Deewarz commented Jan 12, 2024

Main

  • Introduce Player Debug UI

Also

  • Cleanup dev features
  • EntityBrowser UI, Vehicle Debug UI, Debug window can now be closed
  • Improve UX for pos, dir, rot debug sliders
  • Import sdk/entities/human/c_human_script.h in sdk/entities/c_human_2.h (cleanup files which import both)
  • Remove sdk/entities/c_human_2.h import when sdk/entities/c_player_2.h is already imported
  • Remove automatic weapon giving when human is created or setup
  • Fix C_HumanScript::GetInvulnerabilityByScript
  • Documentation for C_PlayerTeleportModule::TeleportPlayer known parameters
  • Documentation for C_Human2::IsInCoverFull
  • Documentation for C_HumanWeaponController::DoWeaponSelectByItemId

Known issues

I will create specific tickets for these issues.

@Deewarz Deewarz self-assigned this Jan 12, 2024
@Deewarz Deewarz marked this pull request as ready for review January 12, 2024 18:49
@zpl-zak
Copy link
Member

zpl-zak commented Jan 12, 2024

  • SetScale needs a single float but GetScale returns a Vector3

SetScale needs to remain Vector3 as it's defined by the Framework itself, MafiaMP specifically can just rely on either X,Y,Z value to uniformly scale an object or use its own field in netcode for that.

  • SDK Player.setPosition doesn't works in the event playerConnected

See #45

  • SDK sdk.World.createVehicle returns an object even when the vehicle doesn't exist

server is not aware of supported vehicles. Back in LH-MP we would have a whitelist of supported model names, but I do not think it's appropriate these days, let's consider it a user error if modder tries to spawn a non-existent vehicle, because from server's POV nothing forbids it to do so.

gamemode/index.js Outdated Show resolved Hide resolved
gamemode/index.js Outdated Show resolved Hide resolved
gamemode/index.js Outdated Show resolved Hide resolved
gamemode/index.js Outdated Show resolved Hide resolved
code/client/src/core/dev_features.cpp Outdated Show resolved Hide resolved
code/client/src/core/dev_features.cpp Outdated Show resolved Hide resolved
code/client/src/core/ui/player_debug.cpp Outdated Show resolved Hide resolved
code/client/src/core/ui/player_debug.cpp Outdated Show resolved Hide resolved
code/client/src/core/ui/player_debug.cpp Outdated Show resolved Hide resolved
code/client/src/core/ui/player_debug.cpp Outdated Show resolved Hide resolved
@Segfaultd
Copy link
Member

Segfaultd commented Jan 12, 2024

I've requested a few changes, otherwise the whole idea looks good.

We should avoid introducing new ways-of-doing in term of codestyle, and also avoid breaking code consistency.

@Deewarz
Copy link
Contributor Author

Deewarz commented Jan 12, 2024

@zpl-zak

  • SDK sdk.World.createVehicle returns an object even when the vehicle doesn't exist

server is not aware of supported vehicles. Back in LH-MP we would have a whitelist of supported model names, but I do not think it's appropriate these days, let's consider it a user error if modder tries to spawn a non-existent vehicle, because from server's POV nothing forbids it to do so.

Couldn't we just detect if the server created the vehicle or not? not necessarily a validation of the model in itself.

@zpl-zak
Copy link
Member

zpl-zak commented Jan 12, 2024

@zpl-zak

  • SDK sdk.World.createVehicle returns an object even when the vehicle doesn't exist

server is not aware of supported vehicles. Back in LH-MP we would have a whitelist of supported model names, but I do not think it's appropriate these days, let's consider it a user error if modder tries to spawn a non-existent vehicle, because from server's POV nothing forbids it to do so.

Couldn't we just detect if the server created the vehicle or not? not necessarily a validation of the model in itself.

but server always creates the vehicle, it will always succeed to do so.

@zpl-zak zpl-zak mentioned this pull request Jan 13, 2024
3 tasks
@Deewarz Deewarz force-pushed the player-debug branch 4 times, most recently from ff7ef1d to 7c90094 Compare January 14, 2024 22:09
@Deewarz Deewarz requested review from Segfaultd and zpl-zak January 15, 2024 16:17
@Deewarz Deewarz merged commit 649ccc4 into master Jan 19, 2024
@Deewarz Deewarz deleted the player-debug branch January 19, 2024 21:26
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.

3 participants