summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioManager.cpp6
-rw-r--r--src/audio/AudioScriptObject.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 8e8d024a..6df5fd19 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -3515,9 +3515,9 @@ cAudioManager::ProcessCrane()
static const int intensity = 80;
if(crane) {
- if(crane->m_bCraneActive == 1) {
- if(crane->m_bCraneStatus) {
- m_sQueueSample.m_vecPos = crane->m_pObject->GetPosition();
+ if(crane->m_nCraneStatus == CCrane::ACTIVATED) {
+ if(crane->m_nCraneState != CCrane::IDLE) {
+ m_sQueueSample.m_vecPos = crane->m_pCraneEntity->GetPosition();
distSquared = GetDistanceSquared(&this->m_sQueueSample.m_vecPos);
if(distSquared < SQR(intensity)) {
CalculateDistance(distCalculated, distSquared);
diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp
index 0ae3834a..da9e1d2e 100644
--- a/src/audio/AudioScriptObject.cpp
+++ b/src/audio/AudioScriptObject.cpp
@@ -61,7 +61,7 @@ cAudioScriptObject::SaveAllAudioScriptObjects(uint8 *buf, uint32 *size)
INITSAVEBUF
int32 pool_size = CPools::GetAudioScriptObjectPool()->GetNoOfUsedSpaces();
- *size = SAVE_HEADER_SIZE + pool_size * (sizeof(cAudioScriptObject) + sizeof(int32));
+ *size = SAVE_HEADER_SIZE + sizeof(int32) + pool_size * (sizeof(cAudioScriptObject) + sizeof(int32));
WriteSaveHeader(buf, 'A', 'U', 'D', '\0', *size - SAVE_HEADER_SIZE);
WriteSaveBuf(buf, pool_size);