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

[Suggestion] "Kill switch" to remove (mostly) all functionally from a vehicle. #1622

Open
Tim3Game opened this issue May 3, 2023 · 4 comments
Labels
backburner This is gonna take a while.... enhancement It's not a bug, it's a feature!

Comments

@Tim3Game
Copy link

Tim3Game commented May 3, 2023

Hey,
So the idea of this "kill switch" would be, that it would remove all the functionality from the vehicle affected, so it would make the vehicle act like a prop, stuck in one place. This could be useful for people that want to have for instance parking lots full of cars but can't because they cause too much lag and is heavy on server performance. I know that some packs offer "vehicle props", but this would allow players to use whatever vehicle they want with whatever parts they add to them, in any position they place it.

Use:
Place the vehicle of your choice, customize it, activate lights/blinkers, position it how you want and then click on it with the proposed "kill switch". The vehicle wouldn't change from the outside, but would change to a "static vehicle", which would allow players to interact with it but would be free of all the unnecessary code behind it (mostly talking about the movement,"gravitational" and hitbox calculations) - basically like the NoAI property in vanilla Minecraft for mobs.
There could be an option to make it a normal vehicle again, so "bring it back to life".

@boot2big
Copy link
Contributor

boot2big commented May 3, 2023

I could've sworn this was poised as a feature before, and +1 on this ticket

Perhaps vehicles that are parked/locked automatically enter this state until they're towed? (Which would obviously require the connection point code to continue running, but would probably still be a lot less to run through than connections + physics + etc)

@DonBruce64
Copy link
Owner

This poses a few comments and questions:

  1. I would perfer to have vehicles do this automatically, since most folks keep their cars in a garage, where they rightfully should be props until they are used. My thoughts are if the vehicle isn't moving, and the wheels are on the ground, and the engine is off, it stops doing physics with the sole exception being checking for blocks below it?
  2. When you say "disable hitboxes", does that mean the player doesn't collide with the vehicle? Or rather the vehicle doesn't collide with the world?

@Tim3Game
Copy link
Author

  1. Yes, definitely a better idea, combined with the idea from @boot2big about it being able to be towed (without needing to access the vehicles (if easily possible)). Basically "turn off/disable" as much of the stuff that's not needed when it's off/"a prop" (saying it like that because I don't know what all kind of stuff it's doing behind the scenes).
    But then there is the problem of "gliding vehicles" where they slightly move even if stopped (at least for the ones inexperienced in fully stopping the vehicles in place), so not sure how it would deal with that.
  2. It was mostly meant for when the vehicle would be "static" it wouldn't check if it was pushed or not by blocks and stuff. But yeah, it should still check for player to vehicle collision, and probably vehicle to vehicle, but, at least not so often, maybe every second or more, for world collision, so it still would response but just not instantly like it would in the normal operating state.

@DonBruce64
Copy link
Owner

Gliding vehicles are just syncing. They'll stop on their own eventually and they don't really do too much all considered. But I'll see what I can do to make vehicles go into an "idle" state when they're not moving. For sure there are TPS improvements to be made.

@DonBruce64 DonBruce64 added enhancement It's not a bug, it's a feature! backburner This is gonna take a while.... labels May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backburner This is gonna take a while.... enhancement It's not a bug, it's a feature!
Projects
None yet
Development

No branches or pull requests

3 participants