diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index e05ac90..6c291cc 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -35,8 +35,8 @@ CPlayerPed::CPlayerPed() field_2AC = 1; m_dwArrow = 0; field_2B9 = 0; - field_2F2 = 0; - field_2D2 = 0; + m_iPissingState = 0; + m_iDanceState = 0; field_2DE = 0; field_2E2 = 0; field_48 = 0; @@ -1173,6 +1173,23 @@ VEHICLE_TYPE* CPlayerPed::GetGtaContactVehicle() //----------------------------------------------------------- +char DanceStyleLibs[4][16] = {"WOP","GFUNK","RUNNINGMAN","STRIP"}; +char DanceIdleLoops[4][16] = {"DANCE_LOOP","DANCE_LOOP","DANCE_LOOP","STR_Loop_B"}; + +void CPlayerPed::StartDancing(int iStyle) +{ + if(iStyle < 0 || iStyle > 3) return; + + m_iDanceState = 1; + m_iDanceStyle = iStyle; + + if(m_bytePlayerNumber == 0) { + ApplyAnimation(DanceIdleLoops[m_iDanceStyle],DanceStyleLibs[m_iDanceStyle],16.0,1,0,0,0,-1); + } +} + +//----------------------------------------------------------- + void CPlayerPed::ProcessVehicleHorn() { if(!m_pPed) return; diff --git a/saco/game/playerped.h b/saco/game/playerped.h index b2129c8..8bcb00f 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -101,6 +101,7 @@ public: void ProcessVehicleHorn(); + void StartDancing(int iStyle); void HandsUp(); BOOL HasHandsUp(); void HoldItem(int iObject); @@ -135,9 +136,10 @@ public: int field_2C5; int field_2C9; DWORD m_dwArrow; - char _gap2D1[1]; - int field_2D2; - char _gap2D6[8]; + char _gap2D1; + int m_iDanceState; + int m_iDanceStyle; + char _gap2DA[4]; int field_2DE; int field_2E2; BOOL m_bGoggleState;