summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-21 14:52:19 +0200
committeraap <aap@papnet.eu>2020-06-21 14:52:19 +0200
commitb81bf1e1389728d42acf8de6128e57fc386d91b8 (patch)
treef6baf48d8f5a310794ab3477246033a8c2dd426c /src/core
parentsynch with re3 (diff)
parentkilling peds increase chaos level (diff)
downloadre3-b81bf1e1389728d42acf8de6128e57fc386d91b8.tar
re3-b81bf1e1389728d42acf8de6128e57fc386d91b8.tar.gz
re3-b81bf1e1389728d42acf8de6128e57fc386d91b8.tar.bz2
re3-b81bf1e1389728d42acf8de6128e57fc386d91b8.tar.lz
re3-b81bf1e1389728d42acf8de6128e57fc386d91b8.tar.xz
re3-b81bf1e1389728d42acf8de6128e57fc386d91b8.tar.zst
re3-b81bf1e1389728d42acf8de6128e57fc386d91b8.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Collision.cpp13
-rw-r--r--src/core/Collision.h2
-rw-r--r--src/core/ControllerConfig.cpp4
-rw-r--r--src/core/Pad.cpp8
-rw-r--r--src/core/Pad.h1
-rw-r--r--src/core/PlayerInfo.cpp2
6 files changed, 28 insertions, 2 deletions
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp
index 77e28a10..76019c2f 100644
--- a/src/core/Collision.cpp
+++ b/src/core/Collision.cpp
@@ -1861,6 +1861,19 @@ CColTrianglePlane::Set(const CVector *v, CColTriangle &tri)
dir = normal.z < 0.0f ? DIR_Z_NEG : DIR_Z_POS;
}
+CColPoint&
+CColPoint::operator=(const CColPoint& other)
+{
+ point = other.point;
+ normal = other.normal;
+ surfaceA = other.surfaceA;
+ pieceA = other.pieceA;
+ surfaceB = other.surfaceB;
+ pieceB = other.pieceB;
+ // doesn't copy depth
+ return *this;
+}
+
CColModel::CColModel(void)
{
numSpheres = 0;
diff --git a/src/core/Collision.h b/src/core/Collision.h
index 9f08ccd6..09abaa1c 100644
--- a/src/core/Collision.h
+++ b/src/core/Collision.h
@@ -89,6 +89,8 @@ struct CColPoint
uint8 surfaceB;
uint8 pieceB;
float depth;
+
+ CColPoint& operator=(const CColPoint& other);
};
struct CStoredCollPoly
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index 2a5d20f0..c3e4e872 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -767,7 +767,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_FirstPersonOnl
if (button == GetControllerKeyAssociatedWithAction(PED_SNIPER_ZOOM_OUT, type))
state.Cross = 255;
if (button == GetControllerKeyAssociatedWithAction(PED_DUCK, type))
- state.RightShock = 255;
+ state.LeftShock = 255;
}
void CControllerConfigManager::AffectControllerStateOn_ButtonDown_ThirdPersonOnly(int32 button, eControllerType type, CControllerState &state)
@@ -785,7 +785,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_ThirdPersonOnl
if (button == GetControllerKeyAssociatedWithAction(PED_SPRINT, type))
state.Cross = 255;
if (button == GetControllerKeyAssociatedWithAction(PED_DUCK, type))
- state.RightShock = 255;
+ state.LeftShock = 255;
if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
{
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index ab66dd9b..084fe888 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -2336,6 +2336,14 @@ bool CPad::TargetJustDown(void)
return false;
}
+bool CPad::DuckJustDown(void)
+{
+ if (ArePlayerControlsDisabled())
+ return false;
+
+ return !!(NewState.LeftShock && !OldState.LeftShock);
+}
+
bool CPad::JumpJustDown(void)
{
if ( ArePlayerControlsDisabled() )
diff --git a/src/core/Pad.h b/src/core/Pad.h
index ccfdcbc9..2f50a164 100644
--- a/src/core/Pad.h
+++ b/src/core/Pad.h
@@ -237,6 +237,7 @@ public:
bool CycleWeaponRightJustDown(void);
bool GetTarget(void);
bool TargetJustDown(void);
+ bool DuckJustDown(void);
bool JumpJustDown(void);
bool GetSprint(void);
bool ShiftTargetLeftJustDown(void);
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index 0be5f73e..ed2690eb 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -146,6 +146,8 @@ CPlayerInfo::Clear(void)
m_bDriveByAllowed = true;
m_nPreviousTimeRewardedForExplosion = 0;
m_nExplosionsSinceLastReward = 0;
+ m_nHavocLevel = 0;
+ m_fMediaAttention = 0;
m_nCurrentBustedAudio = 1;
m_nBustedAudioStatus = BUSTEDAUDIO_NONE;
}