Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. r3dMesh* WeaponConfig::getMesh( bool allow_async_loading, bool first_person ) const
  2. {
  3. extern bool g_bEditMode;
  4. if(!g_bEditMode) // do not check this in editor to allow artists to test models without changing DB
  5. if(!IsFPS)
  6. first_person = false;
  7.  
  8. if( first_person )
  9. {
  10. if(m_Model_FPS == 0)
  11. {
  12.  
  13. #ifndef FINAL_BUILD
  14. if(g_bEditMode && !r3dFileExists(m_ModelPath_1st))
  15. {
  16. char buf[128];
  17. sprintf(buf, "FPS model isn't available for %s", FNAME);
  18. MessageBox(NULL, buf, "Warning", MB_OK);
  19. m_Model_FPS = m_Model;
  20. }
  21. else
  22. #endif
  23. {
  24. m_Model_FPS = r3dGOBAddMesh(m_ModelPath_1st, true, false, allow_async_loading, true );
  25. if(m_Model_FPS==0)
  26. {
  27. r3dError("ART: failed to load mesh '%s'\n", m_ModelPath_1st);
  28. }
  29. r3d_assert(m_Model_FPS);
  30. }
  31. }
  32.  
  33. return m_Model_FPS;
  34. }
  35.  
  36. r3d_assert( m_Model ) ;
  37.  
  38. return m_Model;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement