Advertisement
idontusemyphone

Untitled

Nov 5th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. PyObject * chrSetAddRenderMode(PyObject * poSelf, PyObject * poArgs)
  2. {
  3. int iVirtualID;
  4. if (!(PyTuple_GetInteger(poArgs, 0, &iVirtualID)))
  5. return Py_BuildException();
  6.  
  7. float fr;
  8. if (!(PyTuple_GetFloat(poArgs, 1, &fr)))
  9. return Py_BuildException();
  10.  
  11. float fg;
  12. if (!(PyTuple_GetFloat(poArgs, 2, &fg)))
  13. return Py_BuildException();
  14.  
  15. float fb;
  16. if (!(PyTuple_GetFloat(poArgs, 3, &fb)))
  17. return Py_BuildException();
  18.  
  19. float fa;
  20. if (!(PyTuple_GetFloat(poArgs, 4, &fa)))
  21. fa = 1.0f;
  22.  
  23. auto pkInst = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID);
  24.  
  25. if (pkInst)
  26. {
  27. pkInst->SetAddRenderMode();
  28. pkInst->SetAddColor(D3DXCOLOR(fr, fg, fb, fa));
  29. }
  30.  
  31. return Py_BuildNone();
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement