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

GetNode/Segment -> ToNode/Segment #1202

Merged
merged 3 commits into from
Nov 25, 2021
Merged

GetNode/Segment -> ToNode/Segment #1202

merged 3 commits into from
Nov 25, 2021

Conversation

kianzarrin
Copy link
Collaborator

GetNode(nodeID) with ToNode()
GetSeg(segmentID) with ToSegment()
renamed:
GetNode(segment, startNode) to GetNodeID(segment, startNode) because the return value is ushort not ref NetNode

GetNode(nodeID) with ToNode()
GetSeg(segmentID) with ToSegment()
renamed:
GetNode(segment, startNode) to GetNodeID(segment, startNode)
TLM/TLM/Manager/Impl/LaneArrowManager.cs Outdated Show resolved Hide resolved
@@ -71,7 +71,7 @@ public class LaneConnectionManager
private bool IsHeadingTowardsStartNode(uint sourceLaneId) {
NetLane[] laneBuffer = NetManager.instance.m_lanes.m_buffer;
ushort segmentId = laneBuffer[sourceLaneId].m_segment;
NetSegment segment = GetSeg(segmentId);
NetSegment segment = segmentId.ToSegment();
Copy link
Contributor

Choose a reason for hiding this comment

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

ref ref :D

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you should take a look at macsurgeys code! he refuses to use ref as a matter of principle!

Copy link
Contributor

Choose a reason for hiding this comment

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

haha lol, it does not mean we should not do better though :) what was the sizeof(NetSegment) again? can't check atm.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was just kidding!
@DaEgi01 In any case if you didn't notice I already fixed it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor

Choose a reason for hiding this comment

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

lol :D

@kianzarrin kianzarrin marked this pull request as ready for review November 24, 2021 08:41
Copy link
Collaborator

@kvakvs kvakvs left a comment

Choose a reason for hiding this comment

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

Alright

@kianzarrin kianzarrin merged commit e4a6c54 into master Nov 25, 2021
@kianzarrin kianzarrin deleted the getnodesegement branch November 25, 2021 22:56
@originalfoo originalfoo added this to the 11.6.0 milestone Dec 23, 2021
@originalfoo originalfoo added the code cleanup Refactor code, remove old code, improve maintainability label Dec 23, 2021
@krzychu124 krzychu124 mentioned this pull request Jan 8, 2022
@originalfoo originalfoo modified the milestones: 11.6.0, 11.6.2 Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Refactor code, remove old code, improve maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants