Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. #include "AutoWall.h"
  2. //#include "R.h"
  3.  
  4. struct surfacephysicsparams_t
  5. {
  6. float friction;
  7. float elasticity;
  8. float density;
  9. float thickness;
  10. float dampening;
  11. };
  12.  
  13. struct surfaceaudioparams_t
  14. {
  15. float reflectivity; // like elasticity, but how much sound should be reflected by this surface
  16. float hardnessFactor; // like elasticity, but only affects impact sound choices
  17. float roughnessFactor; // like friction, but only affects scrape sound choices
  18. float roughThreshold; // surface roughness > this causes "rough" scrapes, < this causes "smooth" scrapes
  19. float hardThreshold; // surface hardness > this causes "hard" impacts, < this causes "soft" impacts
  20. float hardVelocityThreshold; // collision velocity > this causes "hard" impacts, < this causes "soft" impacts
  21. float highPitchOcclusion; //a value betweeen 0 and 100 where 0 is not occluded at all and 100 is silent (except for any additional reflected sound)
  22. float midPitchOcclusion;
  23. float lowPitchOcclusion;
  24. };
  25.  
  26. struct surfacesoundnames_t
  27. {
  28. unsigned short walkStepLeft;
  29. unsigned short walkStepRight;
  30. unsigned short runStepLeft;
  31. unsigned short runStepRight;
  32. unsigned short impactSoft;
  33. unsigned short impactHard;
  34. unsigned short scrapeSmooth;
  35. unsigned short scrapeRough;
  36. unsigned short bulletImpact;
  37. unsigned short rolling;
  38. unsigned short breakSound;
  39. unsigned short strainSound;
  40. };
  41.  
  42. struct surfacegameprops_t
  43. {
  44. public:
  45. float maxSpeedFactor;
  46. float jumpFactor;
  47. float flPenetrationModifier;
  48. float flDamageModifier;
  49. unsigned short material;
  50. byte climbable;
  51. char pad00[0x4];
  52.  
  53. };
  54.  
  55. struct surfacedata_t
  56. {
  57. surfacephysicsparams_t physics;
  58. surfaceaudioparams_t audio;
  59. surfacesoundnames_t sounds;
  60. surfacegameprops_t game;
  61. };
  62.  
  63.  
  64. class IPhysicsSurfaceProps
  65. {
  66. public:
  67.  
  68. surfacedata_t *GetSurfaceData(int surfaceDataIndex)
  69. {
  70. typedef surfacedata_t*(__thiscall* fnGetSurfaceData)(void*, int);
  71. return call_vfunc<fnGetSurfaceData>(this, 5)(this, surfaceDataIndex);
  72. }
  73. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement