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

Fast Train & Object Spawner #171

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

Deadlineem
Copy link
Contributor

@Deadlineem Deadlineem commented Jul 22, 2024

Fast train is self explanatory, makes the train super fast.

Object Spawner - current state
https://streamable.com/uenxzn

Set on Fire option preview
https://streamable.com/2kstn4

// TODO

  • Add Tooltips for the toggles
  • Add Slider for Transparency
  • Populate ObjModels list with more objects from object_list.lua
  • Add toggle for Enabling/Disabling collision

Sliders are there for fine tuning placement as currently, the object is set to the players forward vector, so when you move your character around it also moves with you.

@Deadlineem
Copy link
Contributor Author

@Rxann @tyackman @maybegreat48

Give me your feedback, had to make a new draft PR because I fucked up the last one by editing files on github directly.

Copy link

github-actions bot commented Jul 22, 2024

Download the artifacts for this pull request:

@tyackman
Copy link
Contributor

@Rxann @tyackman @maybegreat48

Give me your feedback, had to make a new draft PR because I fucked up the last one by editing files on github directly.

I think using the freecam like mbg said would be cool. It's a way more elegant approach than the sliders. Also the ability to attach objects together. Also should probably be able to disable collision for spawned objects

@Deadlineem
Copy link
Contributor Author

Deadlineem commented Jul 22, 2024

@Rxann @tyackman @maybegreat48
Give me your feedback, had to make a new draft PR because I fucked up the last one by editing files on github directly.

I think using the freecam like mbg said would be cool. It's a way more elegant approach than the sliders. Also the ability to attach objects together. Also should probably be able to disable collision for spawned objects

If it can be done it would be great to add in, I am unsure of the approach but i know it can be done. Very similar to something like this
https://streamable.com/1lcjxr

As of current, the object/preview will move with your forward vector so if you move around it will move with you, the sliders are more for "Fine Tuning" the objects placement.

Added Transparency to Object Spawner
Added Collision toggle (for spawned objects)
Added Transparency to Object Spawner
Added Collision toggle to spawned objects.
src/util/SpawnObject.cpp Outdated Show resolved Hide resolved
src/game/features/players/toxic/CagePlayerLarge.cpp Outdated Show resolved Hide resolved
src/game/features/players/toxic/CagePlayerSmall.cpp Outdated Show resolved Hide resolved
src/game/features/vehicle/FastTrain.cpp Outdated Show resolved Hide resolved
src/game/features/vehicle/FastTrain.cpp Outdated Show resolved Hide resolved
Formatted object list (hoopefully, 3rd times the charm._
@Deadlineem Deadlineem marked this pull request as ready for review July 24, 2024 02:29
@Deadlineem
Copy link
Contributor Author

All requested changes resolved, tested and working.

@Rxann
Copy link
Contributor

Rxann commented Jul 24, 2024

@maybegreat48 @tyackman opinions?

Copy link
Contributor

@Rxann Rxann left a comment

Choose a reason for hiding this comment

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

Add more models from the object list too.

src/util/SpawnObject.cpp Outdated Show resolved Hide resolved
src/util/SpawnObject.cpp Outdated Show resolved Hide resolved
char buffer[256];
strncpy(buffer, objectModelBuffer.c_str(), sizeof(buffer));

ImGui::InputTextWithHint("##objectmodel", "Object Model", buffer, sizeof(buffer), ImGuiInputTextFlags_CallbackCompletion, ObjectSpawnerInputCallback);
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use the frontend item InputTextWithHint. Make sure to call .Draw() if you choose to go this route, you probably should though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Severity Code Description Project File Line Suppression State Details
Error C2440 '': cannot convert from 'initializer list' to 'YimMenu::InputTextWithHint'

InputTextWithHint("##objectmodel", "Object Model", &buffer, ImGuiInputTextFlags_CallbackCompletion, nullptr, ObjectSpawnerInputCallback)
.Draw();

Copy link
Contributor

Choose a reason for hiding this comment

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

Buffer has to be a string, not a char.

@Deadlineem
Copy link
Contributor Author

Add more models from the object list too.

Object models are going to be added little by little with each PR I create since the list is so huge, or with its own PR after this one gets merged, there is no way I would be able to add them all in within a reasonable amount of time.

@ShinyWasabi
Copy link

Why not just use a JSON or something?

added all 20,000+ objects to the list
@Deadlineem
Copy link
Contributor Author

Why not just use a JSON or something?

I got the list sorted out. over 20,000 objects in the list now, could probably be converted to a .json in the appdata folder though.

src/util/SpawnObject.cpp Outdated Show resolved Hide resolved
src/util/SpawnObject.cpp Outdated Show resolved Hide resolved
@Rxann
Copy link
Contributor

Rxann commented Aug 8, 2024

As of right now, I don't know if it is good to build all of these into the binary. I think we might need a JSON file that users can download to use the object spawner. The amount of bloat to the amount of use ratio is undesirable currently.

@Deadlineem
Copy link
Contributor Author

As of right now, I don't know if it is good to build all of these into the binary. I think we might need a JSON file that users can download to use the object spawner. The amount of bloat to the amount of use ratio is undesirable currently.

If you can implement the json i can just make the list for you. Im not sure how i would go about that.

@Rxann
Copy link
Contributor

Rxann commented Aug 11, 2024

If you can implement the json i can just make the list for you. Im not sure how i would go about that.

Look at the player database for example. It should be very close to something like that.

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.

4 participants