mrazza / gonav

A Source Engine navigation mesh file parser written in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Properly parse game-specific custom area data.

WhyIsEvery4thYearAlwaysBad opened this issue · comments

The parser does not actually parse custom data. These lines in parser.go:

// Skip passed some unknown data
var garbageCount byte
p.read(&garbageCount)
p.advanceBytes(int(garbageCount) * 14)

Actually skips over game-specific custom area data.

  • Team Fortress 2 NAVs stores 1 integer at the end of the area data to store TF2-specific area attributes.

Is this reserved space of equal size that can be encoded with arbitrary game-specific information? Or is this TF2 behavior you described very TF2-specific? I reversed this with CSGO nav meshes so I'm not surprised to find there's some value here.

Is this reserved space of equal size that can be encoded with arbitrary game-specific information? Or is this TF2 behavior you described very TF2-specific? I reversed this with CSGO nav meshes so I'm not surprised to find there's some value here.

This is reserved space of equal size that can be encoded with arbitrary game-specific information. Left 4 Dead and Left 4 Dead 2 stores zombie spawn flags and attributes in this custom data. TF2 stores a flag for custom attributes, and CS:S and CS:GO stores approach spot data here.

commented

TF2 stores a flag for custom attributes, and CS:S and CS:GO stores approach spot data here.

But aren't approach areas are handled before that? How did you find out what is stored there in CS:GO? I couldn't figure it out looking at the source leak and the community wiki