Skip to content

util.lua fails to understand certain comments in VMTs, then dumps entire VMT to console #1389

@TiberiumFusion

Description

@TiberiumFusion

PAC3 fails to understand some comment lines in VMT files, despite the VMT being potentially valid and having no errors whatsoever. When this happens, it dumps the entire VMT to the console.

If this dump also occurs for non-local players, then this needlessly leaks part of your outfit to the other players. Given the officially unofficial stance of "don't expose my outfit's sources to the other players", this seems like something that should be fixed.

Demo

  1. New outfit.
  2. Add a model2 part.
  3. Set url to this minimal test model:
    demo_teapot.zip
  4. Wait for download to finish.
  5. Observe console:
[PAC3] vmt mat_teapot.vmt wants to find texture materials/directive relative to other lines in the vmt file actually can change things.vtf for $lightwarptexture but it doesn't exist
vertexlitgeneric
{
	$basetexture "vgui/white"
		//$color "{255 255 255}" // customize color
		// ^ pac properly handles this comment line
	
	$lightwarptexture "models/player/pyro/pyro_lightwarp"
		// the location of the $lightwarptexture directive relative to other lines in the vmt file actually can change things
		// ^ pac fucks up on this comment line and dumps this entire vmt to the console
}

Refer to the VMT inside the provided .zip, as shown dumped in full to the console.

Version: 67ba3954d04bc7c992f2054505a7e8d178578cb4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions