This repository was archived by the owner on Feb 19, 2024. It is now read-only.
Open
Conversation
Earu
suggested changes
Dec 31, 2023
| local tag = "prop_vehicle_crawler" | ||
|
|
||
| --FastDL | ||
| local function add_resource_dir(dir) |
Owner
There was a problem hiding this comment.
think there is a problem here, maybe invisible char?
| if IsValid(self.Trails[i]) then SafeRemoveEntity(self.Trails[i]) end | ||
|
|
||
| self.Trails[i] = util.SpriteTrail(self, i, self.EnergyColor, true, 32, 0, 0.1, 0.015625, "trails/laser.vmt") | ||
| if CPPI then |
Owner
There was a problem hiding this comment.
what does CPPI come from ?
Also SetOwner is in vanilla gmod so you want to call that regardless of CPPI
| @@ -0,0 +1,209 @@ | |||
| include("shared.lua") | |||
| local tag = "prop_vehicle_crawler" | |||
| local Ride_Height = 33 | |||
Owner
There was a problem hiding this comment.
for constants should be CAPITAL_SNAKE_CASE
| self.Wheel:SetAngles(self:LocalToWorldAngles(Angle(self.vel_increment, 0, 0))) | ||
|
|
||
| --Wheel suspension | ||
| local Terrain_Distance = util.TraceHull({ |
Owner
There was a problem hiding this comment.
are you using snake_case or PascalCase here? Please use snake_case consistently
| mask = MASK_SOLID, | ||
| collisiongroup = COLLISION_GROUP_WEAPON | ||
| }) | ||
| self.Wheel:SetPos(self:LocalToWorld(WHEEL_OFFSET + Vector(0, 0, Ride_Height_Visual- Terrain_Distance.Fraction * Ride_Height_Visual))) |
Owner
There was a problem hiding this comment.
Some spaces missing between operators, put the files through a formatter / linter of some kind
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I split the code into 3 seperate files so it wouldn't be so disgusting to look at, also changed the janky network pingpong shit to use NetworkVar() and (hopefully) made the wheel spin speed not depend on the framerate.