diff options
Diffstat (limited to '')
-rw-r--r-- | src/peds/CopPed.cpp | 2 | ||||
-rw-r--r-- | src/peds/EmergencyPed.cpp | 16 | ||||
-rw-r--r-- | src/peds/Ped.h | 2 | ||||
-rw-r--r-- | src/peds/PedFight.cpp | 2 | ||||
-rw-r--r-- | src/peds/PedIK.h | 1 | ||||
-rw-r--r-- | src/peds/PlayerPed.cpp | 2 |
6 files changed, 12 insertions, 13 deletions
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp index 9684794a..762c7f1a 100644 --- a/src/peds/CopPed.cpp +++ b/src/peds/CopPed.cpp @@ -264,7 +264,7 @@ CCopPed::ArrestPlayer(void) CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ARREST_GUN, 4.0f); CVector suspMidPos; - suspect->m_pedIK.GetComponentPosition(*(RwV3d *)&suspMidPos, PED_MID); + suspect->m_pedIK.GetComponentPosition(suspMidPos, PED_MID); m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(suspMidPos.x, suspMidPos.y, GetPosition().x, GetPosition().y); diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp index 24d9a6a1..2eabfe04 100644 --- a/src/peds/EmergencyPed.cpp +++ b/src/peds/EmergencyPed.cpp @@ -230,8 +230,8 @@ CEmergencyPed::MedicAI(void) if (nearestAccident) { m_pRevivedPed = nearestAccident->m_pVictim; m_pRevivedPed->RegisterReference((CEntity**)&m_pRevivedPed); - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&midPos, PED_MID); - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&headPos, PED_HEAD); + m_pRevivedPed->m_pedIK.GetComponentPosition(midPos, PED_MID); + m_pRevivedPed->m_pedIK.GetComponentPosition(headPos, PED_HEAD); SetObjective(OBJECTIVE_GOTO_AREA_ON_FOOT, CVector((headPos + midPos) * 0.5f)); bIsRunning = true; m_nEmergencyPedState = EMERGENCY_PED_DETERMINE_NEXT_STATE; @@ -270,8 +270,8 @@ CEmergencyPed::MedicAI(void) m_nEmergencyPedState = EMERGENCY_PED_STOP; break; } - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&midPos, PED_MID); - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&headPos, PED_HEAD); + m_pRevivedPed->m_pedIK.GetComponentPosition(midPos, PED_MID); + m_pRevivedPed->m_pedIK.GetComponentPosition(headPos, PED_HEAD); SetObjective(OBJECTIVE_GOTO_AREA_ON_FOOT, CVector((headPos + midPos) * 0.5f)); bIsRunning = true; --m_pAttendedAccident->m_nMedicsAttending; @@ -324,8 +324,8 @@ CEmergencyPed::MedicAI(void) if (!m_pRevivedPed || m_pRevivedPed->m_fHealth > 0.0f) m_nEmergencyPedState = EMERGENCY_PED_DETERMINE_NEXT_STATE; else { - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&midPos, PED_MID); - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&headPos, PED_HEAD); + m_pRevivedPed->m_pedIK.GetComponentPosition(midPos, PED_MID); + m_pRevivedPed->m_pedIK.GetComponentPosition(headPos, PED_HEAD); midPos = (headPos + midPos) * 0.5f; m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints( midPos.x, midPos.y, @@ -346,8 +346,8 @@ CEmergencyPed::MedicAI(void) m_nEmergencyPedState = EMERGENCY_PED_DETERMINE_NEXT_STATE; break; } - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&midPos, PED_MID); - m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&headPos, PED_HEAD); + m_pRevivedPed->m_pedIK.GetComponentPosition(midPos, PED_MID); + m_pRevivedPed->m_pedIK.GetComponentPosition(headPos, PED_HEAD); midPos = (headPos + midPos) * 0.5f; m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints( midPos.x, midPos.y, diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 92cb8eff..fb44f59c 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -1119,7 +1119,7 @@ public: RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump()); int32 idx = RpHAnimIDGetIndex(hier, m_pFrames[node]->nodeID); RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier); - RwV3dTransformPoints((RwV3d*)&pos, (RwV3d*)&pos, 1, &mats[idx]); + RwV3dTransformPoints(&pos, &pos, 1, &mats[idx]); } // set by 0482:set_threat_reaction_range_multiplier opcode diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp index 3a4e785a..3e0dfb6d 100644 --- a/src/peds/PedFight.cpp +++ b/src/peds/PedFight.cpp @@ -2151,7 +2151,7 @@ CPed::FightStrike(CVector &touchedNodePos, bool fightWithWeapon) if (m_fightState == FIGHTSTATE_NO_MOVE) m_fightState = FIGHTSTATE_1; - m_vecHitLastPos = *touchedNodePos; + m_vecHitLastPos = touchedNodePos; return false; } diff --git a/src/peds/PedIK.h b/src/peds/PedIK.h index 7dcf0ef3..ee719fea 100644 --- a/src/peds/PedIK.h +++ b/src/peds/PedIK.h @@ -52,7 +52,6 @@ public: bool PointGunInDirectionUsingArm(float targetYaw, float targetPitch); bool PointGunAtPosition(CVector const& position); void GetComponentPosition(RwV3d &pos, uint32 node); - void GetComponentPosition(CVector &pos, uint32 node) { GetComponentPosition(*(RwV3d*)pos, node); } void RotateTorso(AnimBlendFrameData* animBlend, LimbOrientation* limb, bool changeRoll); void ExtractYawAndPitchLocal(RwMatrix *mat, float *yaw, float *pitch); void ExtractYawAndPitchLocalSkinned(AnimBlendFrameData *node, float *yaw, float *pitch); diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 04f98366..62559443 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -1436,7 +1436,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) if (m_pPointGunAt) { CVector markPos; if (m_pPointGunAt->IsPed()) { - ((CPed*)m_pPointGunAt)->m_pedIK.GetComponentPosition(*(RwV3d *)&markPos, PED_MID); + ((CPed*)m_pPointGunAt)->m_pedIK.GetComponentPosition(markPos, PED_MID); } else { markPos = m_pPointGunAt->GetPosition(); } |