surfaceinfo.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. typedef int[] SurfaceInfo;
  2. /*!
  3. Unmanaged surface info handle. Provides API to surfaces that are defined as part of 'CfgSurfaces' or exist in an objects .bisurf file.
  4. Lifetime is managed in code so don't store handles of this type yourself.
  5. */
  6. class SurfaceInfo
  7. {
  8. private void SurfaceInfo() {};
  9. private void ~SurfaceInfo() {};
  10. //! Warning: O(n) time complexity where n is the total number of loaded surfaces
  11. //! Note: Will load the surface if not loaded
  12. //! Warning: If the surface name is invalid, it will still create a SurfaceInfo
  13. proto static SurfaceInfo GetByName(string name);
  14. //! Warning: O(n) time complexity where n is the total number of loaded surfaces
  15. //! Note: Will load the surface if not loaded
  16. //! Warning: If the surface name is invalid, it will still create a SurfaceInfo
  17. //! 'CfgSurfaces' can be pathed by having the name prefixed with '#', so 'GetByFile("#cp_grass")' will return same as 'GetByName("cp_grass")'
  18. proto static SurfaceInfo GetByFile(string name);
  19. proto string GetName();
  20. proto string GetEntryName();
  21. proto string GetSurfaceType();
  22. proto float GetRoughness();
  23. proto float GetDustness();
  24. proto float GetBulletPenetrability();
  25. proto float GetThickness();
  26. proto float GetDeflection();
  27. proto float GetTransparency();
  28. proto float GetAudability();
  29. proto bool IsLiquid();
  30. proto bool IsStairs();
  31. proto bool IsPassthrough();
  32. proto bool IsSolid();
  33. proto string GetSoundEnv();
  34. proto string GetImpact();
  35. //! See 'LiquidTypes' in 'constants.c'
  36. proto int GetLiquidType();
  37. //! See 'ParticleList', if config entry not set, value is 'ParticleList.NONE',
  38. //! if config entry is set but doesn't exist, value is 'ParticleList.INVALID'
  39. proto int GetStepParticleId();
  40. proto int GetWheelParticleId();
  41. };