Advertisement
CUgopEntity

MercuryBall.cpp

Jan 23rd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdafx.h"
  2. #include "mercuryball.h"
  3.  
  4. CMercuryBall::CMercuryBall(void) {}
  5.  
  6. CMercuryBall::~CMercuryBall(void) {}
  7.  
  8. BOOL CMercuryBall::net_Spawn(LPVOID DC) {
  9.     inherited::net_Spawn(DC);
  10.     setVisible                  (true);
  11.     setEnabled                  (true);
  12.     xrSE_MercuryBall* E = (xrSE_MercuryBall*)DC;
  13.     cNameVisual_set(E->s_Model);
  14.     return TRUE;
  15. }
  16.  
  17. void CMercuryBall::OnH_A_Chield() {
  18.     inherited::OnH_A_Chield     ();
  19.     setVisible                  (false);
  20.     setEnabled                  (false);
  21. }
  22.  
  23. void CMercuryBall::OnH_B_Independent() {
  24.     inherited::OnH_B_Independent();
  25.     setVisible                  (true);
  26.     setEnabled                  (true);
  27.     CObject*    E       = dynamic_cast<CObject*>(H_Parent());
  28.     R_ASSERT        (E);
  29.     svTransform.set(E->clXFORM());
  30.     vPosition.set(svTransform.c);
  31. }
  32.  
  33. void CMercuryBall::OnDeviceCreate() {
  34.     inherited::OnDeviceCreate();
  35.     CKinematics* V = PKinematics(Visual());
  36.     if(V) V->PlayCycle("idle");
  37. }
  38.  
  39. void CMercuryBall::OnDeviceDestroy() {
  40.     inherited::OnDeviceDestroy  ();
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement