garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

info_node_link doesn't connect the correct nodes

Open DanilaFoxPro opened this issue 4 years ago • 4 comments

Details

info_node_link refuses to properly link nodes when in-game. Dynamic link it creates either shifts to other nodes, or doesn't get created at all. For example printing something like this: ERROR: Dynamic link source WC node 1 not found ERROR: Dynamic link dest WC node 2 not found

Tested latest main and dev branches, Linux build and Windows build via Proton. Compiling map with Windows build tools, via Wine.

Steps to reproduce

Create a map in Hammer, place info_nodes on it, connect two of them with named info_node_link. Compile the map, and toggle the link with TurnOn/TurnOff inputs. Observe incorrect nodes being linked. (Example testing command ent_fire link_door_2 TurnOn.)

Reproduction VMF as gist: https://gist.github.com/DanilaFoxPro/0d3b63daa0fa1d162ab3378f6a7800f5

DanilaFoxPro avatar Sep 30 '21 11:09 DanilaFoxPro

Not sure if that is related, but info_node_hints with 'Jump permission override' are refusing to work too. They have a 'target node' that needs to be specified (which I set correctly). So it seems that node referencing might be broken in general?

DanilaFoxPro avatar Sep 30 '21 21:09 DanilaFoxPro

From what I can tell the issue is that the start/end node keyvalues are being replaced (by compressed IDs) on map compile, but I can't find the code that does it.

As a workaround what you can do is make sure all your nodes have sequential IDs, without any holes starting from 1. (or 0?)

robotboy655 avatar Oct 05 '21 15:10 robotboy655

Thank you for looking into it.

'Packing' node IDs worked for a very simple test case, but failed on a slight complication.

Works Nodes: 1, 2, 3, 4, 5 Links: 1->2, 4->3 Breaks Nodes: 1, 2, 3, 4, 5 Links: 1->2, 5->3

Node IDs are regenerated when Hammer loads the map, so I just removed all lines containing "nodeid" from the VMF. To automate the process on Linux, I used grep -vw "\"nodeid\"" ./original.vmf > ./fixed.vmf. Then I gone over each node link I have, and linked it again using the new node IDs.

If it is of any help, the issue wasn't always present. I know for a fact that it worked perfectly in October of last year. So you could search for the breaking commit. In the meantime, I could use Source SDK compilers to compile my maps, but then I could not use -allowdynamicpropsasstatic. Is there any way for me to downgrade compilers/Garry's Mod to an earlier version?

P.S. Hammer (WC) node IDs seem to start from 1, however all info_hints seem to default to 0.

DanilaFoxPro avatar Oct 06 '21 16:10 DanilaFoxPro

I'm not sure if this just me, Tried using from Source SDK 2013's compiler and it still gives the same error.

Also, I second this because I recently noticed the error after testing my map (and just found out to this issue), I thought I did something wrong with it.

However, I used an alternative: info_node_link_controller, it kind of works but sometimes some nodes weren't fully captured by this entity if you didn't set the bounds large enough.

Edit: Tested on x86_64 Branch, Windows

Vinzuerio avatar Sep 18 '22 11:09 Vinzuerio