summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-25 18:35:03 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-25 18:35:03 +0100
commit9647901ba07e6252ce850b72108958324d3b3230 (patch)
tree0a17b9decd677ecbf3a288705df0ed2eeaef87e4 /src/control
parentMove CRunningScript (diff)
parentUpdate OpenAL (diff)
downloadre3-9647901ba07e6252ce850b72108958324d3b3230.tar
re3-9647901ba07e6252ce850b72108958324d3b3230.tar.gz
re3-9647901ba07e6252ce850b72108958324d3b3230.tar.bz2
re3-9647901ba07e6252ce850b72108958324d3b3230.tar.lz
re3-9647901ba07e6252ce850b72108958324d3b3230.tar.xz
re3-9647901ba07e6252ce850b72108958324d3b3230.tar.zst
re3-9647901ba07e6252ce850b72108958324d3b3230.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/OnscreenTimer.cpp8
-rw-r--r--src/control/Pickups.h2
-rw-r--r--src/control/RoadBlocks.cpp4
-rw-r--r--src/control/Script5.cpp4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/control/OnscreenTimer.cpp b/src/control/OnscreenTimer.cpp
index 08e6fa3f..53ed14c7 100644
--- a/src/control/OnscreenTimer.cpp
+++ b/src/control/OnscreenTimer.cpp
@@ -14,7 +14,7 @@ void COnscreenTimer::Init() {
for(uint32 i = 0; i < NUMONSCREENCOUNTERS; i++) {
m_sCounters[i].m_nCounterOffset = 0;
- for(uint32 j = 0; j < ARRAY_SIZE(COnscreenCounterEntry::m_aCounterText); j++) {
+ for(uint32 j = 0; j < ARRAY_SIZE(m_sCounters[0].m_aCounterText); j++) {
m_sCounters[i].m_aCounterText[j] = 0;
}
@@ -24,7 +24,7 @@ void COnscreenTimer::Init() {
for(uint32 i = 0; i < NUMONSCREENCLOCKS; i++) {
m_sClocks[i].m_nClockOffset = 0;
- for(uint32 j = 0; j < ARRAY_SIZE(COnscreenTimerEntry::m_aClockText); j++) {
+ for(uint32 j = 0; j < ARRAY_SIZE(m_sClocks[0].m_aClockText); j++) {
m_sClocks[i].m_aClockText[j] = 0;
}
@@ -92,7 +92,7 @@ void COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text, uint16 p
m_sCounters[pos].m_nCounterOffset = offset;
if(text) {
- strncpy(m_sCounters[pos].m_aCounterText, text, ARRAY_SIZE(COnscreenCounterEntry::m_aCounterText));
+ strncpy(m_sCounters[pos].m_aCounterText, text, ARRAY_SIZE(m_sCounters[0].m_aCounterText));
} else {
m_sCounters[pos].m_aCounterText[0] = 0;
}
@@ -114,7 +114,7 @@ void COnscreenTimer::AddClock(uint32 offset, char* text, bool bGoingDown) {
m_sClocks[i].m_nClockOffset = offset;
m_sClocks[i].m_bClockGoingDown = bGoingDown;
if(text) {
- strncpy(m_sClocks[i].m_aClockText, text, ARRAY_SIZE(COnscreenTimerEntry::m_aClockText));
+ strncpy(m_sClocks[i].m_aClockText, text, ARRAY_SIZE(m_sClocks[0].m_aClockText));
} else {
m_sClocks[i].m_aClockText[0] = 0;
}
diff --git a/src/control/Pickups.h b/src/control/Pickups.h
index 08fb2bc8..fd8b15cd 100644
--- a/src/control/Pickups.h
+++ b/src/control/Pickups.h
@@ -147,7 +147,7 @@ public:
class CPacManPickups
{
- friend CPacManPickup;
+ friend class CPacManPickup;
static CPacManPickup aPMPickUps[NUMPACMANPICKUPS];
static CVector LastPickUpCoors;
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index f75b4f50..4f714e80 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -55,8 +55,8 @@ CRoadBlocks::Init(void)
void
CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType)
{
- static const CVector vecRoadBlockOffets[6] = { {-1.5, 1.8f, 0.0f}, {-1.5f, -1.8f, 0.0f}, {1.5f, 1.8f, 0.0f},
- {1.5f, -1.8f, 0.0f}, {-1.5f, 0.0f, 0.0f}, {1.5, 0.0, 0.0} };
+ static const CVector vecRoadBlockOffets[6] = { CVector(-1.5, 1.8f, 0.0f), CVector(-1.5f, -1.8f, 0.0f), CVector(1.5f, 1.8f, 0.0f),
+ CVector(1.5f, -1.8f, 0.0f), CVector(-1.5f, 0.0f, 0.0f), CVector(1.5, 0.0, 0.0) };
CEntity* pEntityToAttack = (CEntity*)FindPlayerVehicle();
if (!pEntityToAttack)
pEntityToAttack = (CEntity*)FindPlayerPed();
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index 74d187ca..502bc005 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -2665,7 +2665,7 @@ bool CTheScripts::IsPedStopped(CPed* pPed)
{
if (pPed->InVehicle())
return IsVehicleStopped(pPed->m_pMyVehicle);
- return (pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL) &&
+ return (pPed->m_nMoveState == PEDMOVE_NONE || pPed->m_nMoveState == PEDMOVE_STILL) &&
!pPed->bIsInTheAir && !pPed->bIsLanding && pPed->bIsStanding && pPed->m_vecAnimMoveDelta.x == 0.0f && pPed->m_vecAnimMoveDelta.y == 0.0f;
}
@@ -2679,7 +2679,7 @@ bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer)
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_LAUNCH) ||
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_GLIDE))
return false;
- return (pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL) &&
+ return (pPed->m_nMoveState == PEDMOVE_NONE || pPed->m_nMoveState == PEDMOVE_STILL) &&
!pPed->bIsInTheAir && !pPed->bIsLanding && pPed->bIsStanding && pPed->m_vecAnimMoveDelta.x == 0.0f && pPed->m_vecAnimMoveDelta.y == 0.0f;
}