home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / game / physics / Physics.cpp < prev    next >
C/C++ Source or Header  |  2005-11-14  |  956b  |  57 lines

  1.  
  2. #include "../../idlib/precompiled.h"
  3. #pragma hdrstop
  4.  
  5. #include "../Game_local.h"
  6.  
  7. ABSTRACT_DECLARATION( idClass, idPhysics )
  8. END_CLASS
  9.  
  10.  
  11. /*
  12. ================
  13. idPhysics::~idPhysics
  14. ================
  15. */
  16. idPhysics::~idPhysics( void ) {
  17. }
  18.  
  19. /*
  20. ================
  21. idPhysics::Save
  22. ================
  23. */
  24. void idPhysics::Save( idSaveGame *savefile ) const {
  25. }
  26.  
  27. /*
  28. ================
  29. idPhysics::Restore
  30. ================
  31. */
  32. void idPhysics::Restore( idRestoreGame *savefile ) {
  33. }
  34.  
  35. /*
  36. ================
  37. idPhysics::SetClipBox
  38. ================
  39. */
  40. void idPhysics::SetClipBox( const idBounds &bounds, float density ) {
  41.     SetClipModel( new idClipModel( idTraceModel( bounds ) ), density );
  42. }
  43.  
  44. /*
  45. ================
  46. idPhysics::SnapTimeToPhysicsFrame
  47. ================
  48. */
  49. int idPhysics::SnapTimeToPhysicsFrame( int t ) {
  50.     int s;
  51. // RAVEN BEGIN
  52. // bdube: use GetMSec access rather than USERCMD_TIME
  53.     s = t + gameLocal.GetMSec() - 1;
  54.     return ( s - s % gameLocal.GetMSec() );
  55. // RAVEN END
  56. }
  57.