Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow allocating new object models using engineRequestModel #1684

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

Merged
35 commits merged into multitheftauto:master from TheNormalnij:new_objects_allocating
Nov 3, 2020

Conversation

@TheNormalnij
Copy link
Member

@TheNormalnij TheNormalnij commented Sep 28, 2020
edited
Loading

Use first argument object in engineRequestModel to allocate new model. New model will based on trashcan (1337).
Changed valid objects list and this can cause bugs for old scripts. For example, you can't create object with ID 1. New method think that it's a ped.
Valid objects are here

API:

engineRequestModel( "object" )

TEST:

  1. Start test resource
  2. Press "home" button.
  3. This part of map use new allocated ID's

Zangomangu, MrDadosz, Pirulax, tederis, AGraber, Vadya963, gubi2137, JoaoZanetti, Shuubaru, Disinterpreter, and 2 more reacted with thumbs up emoji xLive, theSarrum, jayceon123, Shuubaru, zo3n, stoneage-mta, StrixG, AlexTMjugador, Vadya963, T-MaxWiese-T, and 4 more reacted with hooray emoji Shuubaru, zo3n, stoneage-mta, AlexTMjugador, Vadya963, Pirulax, AGraber, gubi2137, JoaoZanetti, XeNikk, and 2 more reacted with heart emoji TheNormalnij, xLive, qaisjp, jayceon123, Shuubaru, zo3n, stoneage-mta, T-MaxWiese-T, AlexTMjugador, Vadya963, and 4 more reacted with rocket emoji
@TheNormalnij TheNormalnij changed the title (削除) Allow allocating new objects models using engineRequestModel. (削除ここまで) (追記) Allow allocating new objects models with using engineRequestModel. (追記ここまで) Sep 28, 2020
Copy link
Contributor

qaisjp commented Sep 28, 2020

Changed valid objects list and this can cause bugs for old scripts.

If this is a separate bugfix, please can you submit it in a separate pull request?

Copy link
Contributor

qaisjp commented Sep 28, 2020

Excellent work, by the way :)

Copy link
Member Author

I can't. Without this fix you can't create new objects and change models and textures.

qaisjp reacted with thumbs up emoji

Copy link

ghost commented Sep 28, 2020

Thanks for the PR. I skimmed through the code, and it looks good. Testing the PR is going to take some time. I suggest we merge this after 1.5.8.

PlatinMTA, StrixG, TheNormalnij, AlexTMjugador, Pirulax, Shuubaru, MrDadosz, and qaisjp reacted with thumbs up emoji

@StrixG StrixG added the enhancement New feature or request label Sep 29, 2020
@StrixG StrixG added this to the Backlog milestone Sep 29, 2020
@StrixG StrixG changed the title (削除) Allow allocating new objects models with using engineRequestModel. (削除ここまで) (追記) Allow allocating new object models using engineRequestModel (追記ここまで) Sep 30, 2020
Copy link
Member Author

TheNormalnij commented Oct 12, 2020
edited
Loading

Thanks you for help, @PlatinMTA !

  1. Crash is fixed.
  2. I can't reproduce.
  3. It's a list with all default object ID's, engineRequestModel will select another ID's.
PlatinMTA reacted with thumbs up emoji

Copy link
Member Author

Added test resource

Copy link
Contributor

@Inder00 Inder00 left a comment

Choose a reason for hiding this comment

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

It looks like good

Comment on lines +33 to +34
ATOMIC = 1,
TIME = 3,
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh interesting, does gta skip over = 2?

Copy link
Member Author

@TheNormalnij TheNormalnij Nov 1, 2020

Choose a reason for hiding this comment

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

GTA SA don't use model info with enum 2

Copy link
Member Author

@TheNormalnij TheNormalnij Nov 1, 2020

Choose a reason for hiding this comment

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

Or this is special type for parts of destroyed car

Copy link
Member Author

Fixed formatting

Copy link
Contributor

Pirulax commented Nov 1, 2020
edited
Loading

@saml1er #1684 (comment)
It is needed, otherwise his range based for loop woudn't work (with CMappedArray)

Co-authored-by: saml1er <10183157+saml1er@users.noreply.github.com>
Copy link

ghost commented Nov 1, 2020
edited by ghost
Loading

@saml1er #1684 (comment)
It is needed, otherwise his range based for loop woudn't work (with CMappedArray)

(削除) In my other review comment, I suggested him to move the code in CClientPedManager. In this way, the method will become shorter, readable, and this won't be needed. (削除ここまで)
Hmm, I think I get it now why he added it there. Okay.

@ghost ghost merged commit 3f316e4 into multitheftauto:master Nov 3, 2020
@TheNormalnij TheNormalnij deleted the new_objects_allocating branch November 10, 2020 00:42
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tederis tederis tederis left review comments

@Pirulax Pirulax Pirulax requested changes

+3 more reviewers

@qaisjp qaisjp qaisjp left review comments

@Inder00 Inder00 Inder00 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

enhancement New feature or request

Projects

None yet

Milestone

1.5.9

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /