mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-27 11:34:14 +01:00
Sanitizer fixes 2
This commit is contained in:
parent
43631ba203
commit
1c0878f65b
@ -28,7 +28,7 @@ class CCrimeBeingQd
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eCrimeType m_nType;
|
eCrimeType m_nType;
|
||||||
uint32 m_nId;
|
int32 m_nId;
|
||||||
uint32 m_nTime;
|
uint32 m_nTime;
|
||||||
CVector m_vecPosn;
|
CVector m_vecPosn;
|
||||||
bool m_bReported;
|
bool m_bReported;
|
||||||
|
@ -2887,7 +2887,7 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints)
|
|||||||
CColModel *hisCol = CModelInfo::GetModelInfo(collidingEnt->GetModelIndex())->GetColModel();
|
CColModel *hisCol = CModelInfo::GetModelInfo(collidingEnt->GetModelIndex())->GetColModel();
|
||||||
|
|
||||||
if (!bUsesCollision && !bJustCheckCollision)
|
if (!bUsesCollision && !bJustCheckCollision)
|
||||||
return false;
|
return 0;
|
||||||
|
|
||||||
if (collidingEnt->IsVehicle() && ((CVehicle*)collidingEnt)->IsBoat())
|
if (collidingEnt->IsVehicle() && ((CVehicle*)collidingEnt)->IsBoat())
|
||||||
collidedWithBoat = true;
|
collidedWithBoat = true;
|
||||||
@ -6775,7 +6775,7 @@ CPed::FollowPath(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CPed::SetEvasiveStep(CEntity *reason, uint8 animType)
|
CPed::SetEvasiveStep(CPhysical *reason, uint8 animType)
|
||||||
{
|
{
|
||||||
AnimationId stepAnim;
|
AnimationId stepAnim;
|
||||||
|
|
||||||
@ -6793,22 +6793,23 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType)
|
|||||||
if (neededTurn > PI)
|
if (neededTurn > PI)
|
||||||
neededTurn = TWOPI - neededTurn;
|
neededTurn = TWOPI - neededTurn;
|
||||||
|
|
||||||
|
if (reason->IsVehicle() && ((CVehicle*)reason)->IsCar()) {
|
||||||
CVehicle *veh = (CVehicle*)reason;
|
CVehicle *veh = (CVehicle*)reason;
|
||||||
if (reason->IsVehicle() && veh->IsCar()) {
|
|
||||||
if (veh->m_nCarHornTimer != 0) {
|
if (veh->m_nCarHornTimer != 0) {
|
||||||
vehPressedHorn = true;
|
vehPressedHorn = true;
|
||||||
if (!IsPlayer())
|
if (!IsPlayer())
|
||||||
animType = 1;
|
animType = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (neededTurn <= DEGTORAD(90.0f) || veh->GetModelIndex() == MI_RCBANDIT || vehPressedHorn || animType != 0) {
|
|
||||||
SetLookFlag(veh, true);
|
if (neededTurn <= DEGTORAD(90.0f) || reason->GetModelIndex() == MI_RCBANDIT || vehPressedHorn || animType != 0) {
|
||||||
if ((CGeneral::GetRandomNumber() & 1) && veh->GetModelIndex() != MI_RCBANDIT && animType == 0) {
|
SetLookFlag(reason, true);
|
||||||
|
if ((CGeneral::GetRandomNumber() & 1) && reason->GetModelIndex() != MI_RCBANDIT && animType == 0) {
|
||||||
stepAnim = ANIM_STD_HAILTAXI;
|
stepAnim = ANIM_STD_HAILTAXI;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
float vehDirection = CGeneral::GetRadianAngleBetweenPoints(
|
float dangerDirection = CGeneral::GetRadianAngleBetweenPoints(
|
||||||
veh->m_vecMoveSpeed.x, veh->m_vecMoveSpeed.y,
|
reason->m_vecMoveSpeed.x, reason->m_vecMoveSpeed.y,
|
||||||
0.0f, 0.0f);
|
0.0f, 0.0f);
|
||||||
|
|
||||||
// Let's turn our back to the "reason"
|
// Let's turn our back to the "reason"
|
||||||
@ -6818,14 +6819,14 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType)
|
|||||||
angleToFace -= TWOPI;
|
angleToFace -= TWOPI;
|
||||||
|
|
||||||
// We don't want to run towards car's direction
|
// We don't want to run towards car's direction
|
||||||
float dangerZone = angleToFace - vehDirection;
|
float dangerZone = angleToFace - dangerDirection;
|
||||||
dangerZone = CGeneral::LimitRadianAngle(dangerZone);
|
dangerZone = CGeneral::LimitRadianAngle(dangerZone);
|
||||||
|
|
||||||
// So, add or subtract 90deg (jump to left/right) according to that
|
// So, add or subtract 90deg (jump to left/right) according to that
|
||||||
if (dangerZone > 0.0f)
|
if (dangerZone > 0.0f)
|
||||||
angleToFace = vehDirection - HALFPI;
|
angleToFace = dangerDirection - HALFPI;
|
||||||
else
|
else
|
||||||
angleToFace = vehDirection + HALFPI;
|
angleToFace = dangerDirection + HALFPI;
|
||||||
|
|
||||||
stepAnim = ANIM_STD_NUM;
|
stepAnim = ANIM_STD_NUM;
|
||||||
if (animType == 0 || animType == 1)
|
if (animType == 0 || animType == 1)
|
||||||
|
@ -762,7 +762,7 @@ public:
|
|||||||
void SetAimFlag(CEntity* to);
|
void SetAimFlag(CEntity* to);
|
||||||
void SetAimFlag(float angle);
|
void SetAimFlag(float angle);
|
||||||
void SetAmmo(eWeaponType weaponType, uint32 ammo);
|
void SetAmmo(eWeaponType weaponType, uint32 ammo);
|
||||||
void SetEvasiveStep(CEntity*, uint8);
|
void SetEvasiveStep(CPhysical*, uint8);
|
||||||
void GrantAmmo(eWeaponType, uint32);
|
void GrantAmmo(eWeaponType, uint32);
|
||||||
void SetEvasiveDive(CPhysical*, uint8);
|
void SetEvasiveDive(CPhysical*, uint8);
|
||||||
void SetAttack(CEntity*);
|
void SetAttack(CEntity*);
|
||||||
|
Loading…
Reference in New Issue
Block a user