View Single Post
Old 02/07/2019, 11:31 PM   #1
Little Clucker
FR0DG3R's Avatar
Join Date: Nov 2018
Location: Belo Horizonte, MG, Brazil
Posts: 4
Reputation: 0
Question NODES*.dat's path width and flags

So, my work involves making cars follow paths made by NODES*.dat nodes. The community nodes documentation on the grandtheftwiki says that every node has a property called "Path Width" that is 0 by default (?) and can be changed, is it made for us to change manually change each node? Has someone ever done that?
I need a way of obtaining the width value for the nodes because I really want to adapt the code for working with many car models and street widths.

I also have a problem with some navi node flags I'd like to use (e. g. traffic light behavior, left/right lanes), they are always 0, but the wiki says it should really give a value. I don't think I'm reading it wrong because most data comes just as expected, I have proper coords and target nodes from the navi nodes, and the binary reading works on path nodes' flags.

This is the way I read a NaviNode (C++)

I declare the struct, according to the wiki:
struct NaviNode {
    short pos[2];
    unsigned short areaId, nodeId;
    char direction[2];
    unsigned flags;
And read it on the file:
NaviNode naviNode;

for(unsigned i = 0; i < header.naviNodes; i++) {
    fread(&naviNode, 14, 1, inputFile);// following the wiki it uses 14 bytes
   //store it
note: wiki page I mention is
FR0DG3R is offline   Reply With Quote