Skip to content

Commit 2526a7d

Browse files
authored
CPedSA class cleanup & optimization (#3656)
1 parent d77f6f8 commit 2526a7d

File tree

8 files changed

+845
-1098
lines changed

8 files changed

+845
-1098
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*****************************************************************************
2+
*
3+
* PROJECT: Multi Theft Auto
4+
* LICENSE: See LICENSE in the top level directory
5+
* FILE: game_sa/CAEWeaponAudioEntitySA.h
6+
* PURPOSE: Weapon audio entity header
7+
*
8+
* Multi Theft Auto is available from https://www.multitheftauto.com/
9+
*
10+
*****************************************************************************/
11+
12+
#pragma once
13+
#include "CAudioEngineSA.h"
14+
15+
enum class eMiniGunState : std::uint8_t
16+
{
17+
SPINNING,
18+
FIRING,
19+
STOPPING,
20+
STOPPED,
21+
};
22+
23+
enum class eChainsawState : std::uint8_t
24+
{
25+
IDLE,
26+
ACTIVE,
27+
CUTTING,
28+
STOPPING,
29+
STOPPED,
30+
};
31+
32+
class CAEWeaponAudioEntitySAInterface : public CAEAudioEntity
33+
{
34+
public:
35+
bool m_isMiniGunSpinActive;
36+
bool m_isMiniGunFireActive;
37+
38+
std::uint8_t m_lastWeaponPlaneFrequencyIndex;
39+
40+
eMiniGunState m_miniGunState;
41+
eChainsawState m_chainsawState;
42+
43+
std::uint32_t m_lastFlamethrowerFireTimeInMS;
44+
std::uint32_t m_lastSpraycanFireTimeInMS;
45+
std::uint32_t m_lastFireExtinguisherFireTimeInMS;
46+
std::uint32_t m_lastMinigunFireTimeInMS;
47+
std::uint32_t m_lastChainsawFireTimeInMS;
48+
std::uint32_t m_lastGunFireTimeInMS;
49+
50+
CAESound* m_flameThrowerIdleGasLoopSound{};
51+
};
52+
static_assert(sizeof(CAEWeaponAudioEntitySAInterface) == 0xA0, "Invalid size for CAEWeaponAudioEntitySAInterface");

0 commit comments

Comments
 (0)