GmodNET/GmodDotNet

[BUG] Tier0 vs Tier0_client

Closed this issue · 1 comments

Describe the bug
GmodDotNet uses tier0's Msg function to log messages, but tier0 is on windows, and tier0, tier0_client on non-windows

To Reproduce
use not windows gmod client/server

Expected behavior
uses tier0_client's Msg on CLIENT, and tier0's Msg on SERVER

Platforms where you've faced the bug

  • SRCDS Linux
  • SRCDS Windows
  • Garry's Mod Windows
  • Garry's Mod Linux
  • Garry's Mod macOS

Additional context
strange

TO DO:

  1. On Linux, GmodDotNet runtime must detect whether it is running under game or dedicated process and resolve proper version of tier0.
  2. On macOS, there is only libtier0.dylib but such shared lib has special location: [garrysmod root folder]/GarrysMod_Signed/Contents/MacOS/libtier0.dylib, where GarrysMod_Signed is a signed macOS Package Bundle of the game (for more info on Apple Package Bundles see https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1). GmodDotNet runtime must resolved the library from this path.