bool CIVPed::IsDucking() { if (GetPed()) return ((bool(__thiscall *) (IVPed *))(COffsets::FUNC_CPed__IsDucking))(GetPed()); return false; }
/* * CRchTxtPtr::InitRunPtrs(cp) * * @mfunc * Initialize Run Ptrs of this rich-text ptr to correspond to * document given by ped and to cp given by cp. */ void CRchTxtPtr::InitRunPtrs( LONG cp) // @parm character position to move RunPtrs to { TRACEBEGIN(TRCSUBSYSBACK, TRCSCOPEINTERN, "CRchTxtPtr::InitRunPtrs"); CTxtStory *pStory; AssertSz(GetPed(), "RTP::InitRunPtrs: illegal GetPed()"); if( IsRich() || IsIMERich() ) { pStory = GetPed()->GetTxtStory(); if(pStory->_pCFRuns) // and there's RichData, { // initialize format-run ptrs _rpCF.SetRunArray((CRunArray *)pStory->_pCFRuns); _rpCF.BindToCp(cp); } if (pStory->_pPFRuns) { _rpPF.SetRunArray((CRunArray *)pStory->_pPFRuns); _rpPF.BindToCp(cp); } } }
float CIVPed::GetCurrentHeading() { if (GetPed()) return GetPed()->m_fCurrentHeading; return 0.0f; }
IVPlayerInfo * CIVPed::GetPlayerInfo() { if (GetPed()) return GetPed()->m_pPlayerInfo; return nullptr; }
IVVehicle * CIVPed::GetCurrentVehicle() { if (GetPed()) return GetPed()->m_pCurrentVehicle; return nullptr; }
bool CIVPed::IsInVehicle() { if (GetPed()) return ((GetPed()->m_byteUnknown & 4) != 0); return false; }
void CIVPed::SetType(ePedType type) { IVPed * pPed = GetPed(); if(pPed) pPed->m_pPedBase->m_type = type; }
void CIVPed::SetRagdoll(bool bRagdoll) { IVPed * pPed = GetPed(); if(pPed) { if(bRagdoll) { if(!pPed->m_dwRagdollStatus) pPed->m_dwRagdollStatus = 2; } else { if(pPed->m_dwRagdollStatus > 2) { _asm { push 1 push 1 push 1 mov ecx, pPed call COffsets::FUNC_CPed__DisableRagdoll } } pPed->m_dwRagdollStatus = 0; } pPed->m_dwRagdollTime = CGame::GetTime(); } }
void CIVPed::SetCurrentVehicle(IVVehicle * pVehicle) { IVPed * pPed = GetPed(); if(pPed) pPed->m_pCurrentVehicle = pVehicle; }
void CIVPed::SetDesiredHeading(float fDesiredHeading) { IVPed * pPed = GetPed(); if(pPed) pPed->m_fDesiredHeading = fDesiredHeading; }
void CIVPed::SetPlayerInfo(IVPlayerInfo * pPlayerInfo) { IVPed * pPed = GetPed(); if(pPed) pPed->m_pPlayerInfo = pPlayerInfo; }
void CIVPed::SetCurrentHeading(float fCurrentHeading) { IVPed * pPed = GetPed(); if(pPed) pPed->m_fCurrentHeading = fCurrentHeading; }
unsigned int CIVPed::GetNumberOfCharDrawableVariations(unsigned int ucBodyLocation) { // Get the ped pointer IVPed * pPed = GetPed(); // Is the ped pointer valid? if(pPed) { unsigned int uiDrawableVariations; unsigned int uiPedHandle = g_pCore->GetGame()->GetPools()->GetPedPool()->HandleOf(pPed); DWORD GetNumberOfCharDrawableVariations = (g_pCore->GetBase() + 0xC0B9D0); _asm mov esi, esp _asm mov eax, dword ptr [ucBodyLocation] _asm push eax _asm mov ecx, dword ptr [uiPedHandle] _asm push ecx _asm call dword ptr [GetNumberOfCharDrawableVariations] _asm add esp,8 _asm mov dword ptr [uiDrawableVariations], eax return uiDrawableVariations; } else return 0;
void CIVPed::SetRagdoll(bool bRagdoll) { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) { if(bRagdoll) { if(!pPed->m_dwRagdollStatus) pPed->m_dwRagdollStatus = 2; } else { if(pPed->m_dwRagdollStatus > 2) { _asm { push 1 push 1 push 1 mov ecx, pPed call COffsets::FUNC_CPed__DisableRagdoll } } pPed->m_dwRagdollStatus = 0; } pPed->m_dwRagdollTime = CGame::GetTime(); } }
float CIVPed::GetDesiredHeading() { IVPed * pPed = GetPed(); if(pPed) return pPed->m_fDesiredHeading; return false; }
IVVehicle * CIVPed::GetCurrentVehicle() { IVPed * pPed = GetPed(); if(pPed) return pPed->m_pCurrentVehicle; return NULL; }
float CIVPed::GetCurrentHeading() { IVPed * pPed = GetPed(); if(pPed) return pPed->m_fCurrentHeading; return false; }
bool CIVPed::IsRagdoll() { IVPed * pPed = GetPed(); if(pPed) return (pPed->m_dwRagdollStatus == 0); return true; }
bool CIVPed::IsInVehicle() { IVPed * pPed = GetPed(); if(pPed) return ((pPed->m_byteUnknown & 4) != 0); return false; }
IVPlayerInfo * CIVPed::GetPlayerInfo() { IVPed * pPed = GetPed(); if(pPed) return pPed->m_pPlayerInfo; return NULL; }
ePedType CIVPed::GetType() { IVPed * pPed = GetPed(); if(pPed) return pPed->m_pPedBase->m_type; return (ePedType)0/*PED_TYPE_PLAYER*/; }
void CIVPed::SetPlayerInfo(IVPlayerInfo * pPlayerInfo) { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) pPed->m_pPlayerInfo = pPlayerInfo; }
void CIVPed::SetType(ePedType type) { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) pPed->m_pPedBase->m_type = type; }
void CIVPed::SetDesiredHeading(float fDesiredHeading) { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) pPed->m_fDesiredHeading = fDesiredHeading; }
void CIVPed::SetCurrentVehicle(IVVehicle * pVehicle) { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) pPed->m_pCurrentVehicle = pVehicle; }
/* * CRchTxtPtr::IsIMERich() const * * @mfunc * This allow CF runs during plain text IME composition. * * @rdesc * TRUE if not IsRich() and IME composition is occuring. */ BOOL CRchTxtPtr::IsIMERich() const { TRACEBEGIN(TRCSUBSYSBACK, TRCSCOPEINTERN, "CRchTxtPtr::IsIMERich"); CTxtEdit *ped; ped = GetPed(); Assert(ped); return !ped->_fRich && ped->IsIMEComposition(); }
IVVehicle * CIVPed::GetCurrentVehicle() { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) return pPed->m_pCurrentVehicle; return NULL; }
bool CIVPed::IsRagdoll() { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) return (pPed->m_dwRagdollStatus == 0); return true; }
ePedType CIVPed::GetType() { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) return pPed->m_pPedBase->m_type; return PED_TYPE_PLAYER; }
IVPlayerInfo * CIVPed::GetPlayerInfo() { #ifdef EXT_LOG CLogFile::Printf(__FUNCSIG__); #endif IVPed * pPed = GetPed(); if(pPed) return pPed->m_pPlayerInfo; return NULL; }