summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-18 13:06:40 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:42:10 +0200
commitc7821635fde41f2302d7f755ae80d8f1a3c815b7 (patch)
treefb529923f5e878c5393897360c5d0a21f2a4b420 /src
parentFix C3dMarkers::PlaceMarker calls in Radar (diff)
downloadre3-c7821635fde41f2302d7f755ae80d8f1a3c815b7.tar
re3-c7821635fde41f2302d7f755ae80d8f1a3c815b7.tar.gz
re3-c7821635fde41f2302d7f755ae80d8f1a3c815b7.tar.bz2
re3-c7821635fde41f2302d7f755ae80d8f1a3c815b7.tar.lz
re3-c7821635fde41f2302d7f755ae80d8f1a3c815b7.tar.xz
re3-c7821635fde41f2302d7f755ae80d8f1a3c815b7.tar.zst
re3-c7821635fde41f2302d7f755ae80d8f1a3c815b7.zip
Diffstat (limited to 'src')
-rw-r--r--src/animation/AnimBlendAssociation.cpp6
-rw-r--r--src/animation/AnimBlendAssociation.h1
-rw-r--r--src/control/Script10.cpp2
-rw-r--r--src/control/Script9.cpp4
-rw-r--r--src/peds/Ped.cpp486
-rw-r--r--src/peds/Ped.h55
6 files changed, 546 insertions, 8 deletions
diff --git a/src/animation/AnimBlendAssociation.cpp b/src/animation/AnimBlendAssociation.cpp
index bb4e7bf4..a65f0fc5 100644
--- a/src/animation/AnimBlendAssociation.cpp
+++ b/src/animation/AnimBlendAssociation.cpp
@@ -230,3 +230,9 @@ CAnimBlendAssociation::UpdateBlend(float timeDelta)
return true;
}
+
+void
+CAnimBlendAssociation::Remove()
+{
+ delete this;
+}
diff --git a/src/animation/AnimBlendAssociation.h b/src/animation/AnimBlendAssociation.h
index dbfcb722..da026e01 100644
--- a/src/animation/AnimBlendAssociation.h
+++ b/src/animation/AnimBlendAssociation.h
@@ -81,6 +81,7 @@ public:
void UpdateTimeStep(float timeDelta, float relSpeed);
bool UpdateTime(float timeDelta, float relSpeed);
bool UpdateBlend(float timeDelta);
+ void Remove();
void SetRun(void) { flags |= ASSOC_RUNNING; }
diff --git a/src/control/Script10.cpp b/src/control/Script10.cpp
index ac3961a7..c619a9dd 100644
--- a/src/control/Script10.cpp
+++ b/src/control/Script10.cpp
@@ -278,7 +278,7 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
CollectParameters(&m_nIp, 3);
CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0));
if (pPed)
- pPed->SetWaitState((eWaitState)GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1) >= 0 ? (void*)GET_INTEGER_PARAM(0) : nil); // + true
+ pPed->SetWaitState((eWaitState)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2) >= 0 ? (void*)GET_INTEGER_PARAM(2) : nil, true);
return 0;
}
case COMMAND_REGISTER_BEST_TIME_GOGO_FAGGIO:
diff --git a/src/control/Script9.cpp b/src/control/Script9.cpp
index 42851bbc..f6ebc299 100644
--- a/src/control/Script9.cpp
+++ b/src/control/Script9.cpp
@@ -568,11 +568,11 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
}
case COMMAND_LOAD_NON_STANDARD_PED_ANIM:
CollectParameters(&m_nIp, 1);
- // CPed::LoadNonStandardPedAnim(GET_INTEGER_PARAM(0));
+ CPed::LoadNonStandardPedAnim((eWaitState)GET_INTEGER_PARAM(0));
return 0;
case COMMAND_UNLOAD_NON_STANDARD_PED_ANIM:
CollectParameters(&m_nIp, 1);
- // CPed::UnloadNonStandardPedAnim(SET_INTEGER_PARAM(0));
+ CPed::UnloadNonStandardPedAnim((eWaitState)GET_INTEGER_PARAM(0));
return 0;
case COMMAND_1566:
CollectParameters(&m_nIp, 1);
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 84153667..26668796 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -8106,6 +8106,62 @@ CPed::ClearWaitState(void)
if (assoc)
assoc->blendDelta = -8.0f;
break;
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ case WAITSTATE_DONH2_CAMERA:
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ case WAITSTATE_JDT2_SHRUG:
+ case WAITSTATE_JDT4_DILDO_TALK:
+ case WAITSTATE_JDT5_CALM_DOWN:
+ case WAITSTATE_JDT5_POINT:
+ case WAITSTATE_JDT6_PICKUP:
+ case WAITSTATE_MAR1_SKIRT:
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ case WAITSTATE_MAR2_CELL_END:
+ case WAITSTATE_MAR2_CELL_TALK:
+ case WAITSTATE_MAR2_FOOT_TAP:
+ case WAITSTATE_MAR3_HOOCHY:
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ case WAITSTATE_SAL3_SEATED_TALK:
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ case WAITSTATE_SAL4_DUST_DOWN:
+ case WAITSTATE_SAL4_GIRL_RUN:
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ case WAITSTATE_SAL7_LOOKOUT:
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ case WAITSTATE_VIC3_WAFT:
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ case WAITSTATE_VIC4_CARRY_BOX:
+ case WAITSTATE_VIC4_CELL_LOOK:
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ case WAITSTATE_TOURIST3:
+ case WAITSTATE_TOURIST2:
+ case WAITSTATE_TOURIST1:
+ case WAITSTATE_MAC2_PLEAD:
+ case WAITSTATE_JDT6_KNOCK:
+ case WAITSTATE_SAL3_SIT_DOWN:
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ assoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_IDLE);
+ if (assoc)
+ assoc->Remove();
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DONH3_HAPPY);
+ if (assoc)
+ assoc->blendDelta = -1.0f;
+ break;
default:
break;
}
@@ -8113,10 +8169,10 @@ CPed::ClearWaitState(void)
}
void
-CPed::SetWaitState(eWaitState state, void *time)
+CPed::SetWaitState(eWaitState state, void *time, bool repeat)
{
AnimationId waitAnim = ANIM_STD_NUM;
- CAnimBlendAssociation *animAssoc;
+ CAnimBlendAssociation *animAssoc = nil;
if (!IsPedInControl())
return;
@@ -8295,7 +8351,7 @@ CPed::SetWaitState(eWaitState state, void *time)
SetFall(-1, ANIM_STD_HIGHIMPACT_FRONT, true);
break;
case WAITSTATE_BOMBER:
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DETONATE, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DETONATE, 4.0f);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
break;
case WAITSTATE_GROUND_ATTACK:
@@ -8314,7 +8370,7 @@ CPed::SetWaitState(eWaitState state, void *time)
break;
}
case WAITSTATE_LANCESITTING:
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_LANCE, ANIM_SUNBATHE_IDLE, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_LANCE, ANIM_SUNBATHE_IDLE, 4.0f);
break;
case WAITSTATE_PLAYANIM_HANDSUP_SIMPLE:
animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSUP, 4.0f);
@@ -8323,12 +8379,193 @@ CPed::SetWaitState(eWaitState state, void *time)
animAssoc->SetDeleteCallback(FinishedWaitCB, this);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
break;
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MPNOTE, ANIM_MULTIPLAYER_CUTSCENE_MPNOTE, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MPNOTE, ANIM_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_CSMISC,
+ (AnimationId)(ANIM_CS_MISC_IDLE_LOOK + (int)(state - WAITSTATE_CS_MISC_IDLE_LOOK)), 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_DONH2_CAMERA:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_DONH2, ANIM_DONH2_CAMERA, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_DONH3, ANIM_DONH3_HAPPY, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT2, ANIM_JDT2_ANXIOUS_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT2_SHRUG:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT2, ANIM_JDT2_SHRUG);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT4_DILDO_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT4, ANIM_JDT4_DILDO_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT5_CALM_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT5, ANIM_JDT5_CALM_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT5_POINT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT5, ANIM_JDT5_POINT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT6_PICKUP:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT6, ANIM_JDT6_PICKUP);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR1_SKIRT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR1, ANIM_MAR1_SKIRT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_ANSWER);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_CELL_END:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_END);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_CELL_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_FOOT_TAP:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_FOOT_TAP);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR3_HOOCHY:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_HOOCHY);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_NOTE_IDLE);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_NOTE_PICKUP);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL1, ANIM_SAL1_BIREFCASE_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL2, ANIM_SAL2_IDLE_SEATED);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL2, ANIM_SAL2_SEAT_TO_STAND);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL3_SEATED_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SEATED_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SEATED_IDLE);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL4_DUST_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL4, ANIM_SAL4_DUST_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL4_GIRL_RUN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL4, ANIM_SAL4_GIRL_RUN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL6, ANIM_SAL6_ANGRY_SEATED);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL6, ANIM_SAL6_IDLE_SEATED);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL7_LOOKOUT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL7, ANIM_SAL7_LOOKOUT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC2, ANIM_VIC2_POINT_ANGRY);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC3_WAFT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC3, ANIM_VIC3_WAFT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC3, ANIM_VIC3_PICKUP_ROLL);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC4_CARRY_BOX:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CARRY_BOX);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC4_CELL_LOOK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CELL_LOOK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CRATE_IDLE);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC6, ANIM_VIC6_CELL_ANGRY);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_TOURIST3:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST3);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_TOURIST2:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST2);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_TOURIST1:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST1);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAC2_PLEAD:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAC2, ANIM_MAC2_PLEAD);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT6_KNOCK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT6, ANIM_JDT6_KNOCK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL3_SIT_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SIT_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC7, ANIM_VIC7_PROD_WITH_FOOT);
+ animAssoc->speed = 1.0f;
+ break;
default:
ClearWaitState();
RestoreHeadingRate();
return;
}
+ bool rep = animAssoc ? repeat : false;
m_nWaitState = state;
+ if (rep)
+ animAssoc->flags |= ASSOC_REPEAT;
}
void
@@ -9624,6 +9861,247 @@ CPed::Say(uint16 audio, int32 time)
}
}
+void
+CPed::LoadNonStandardPedAnim(eWaitState waitState)
+{
+ switch(waitState) {
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("MPNote"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_CS_MISC_IDLE_LOOK:
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ case WAITSTATE_CS_MISC_IDLE_CELL_TALK:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("cs_misc"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_DONH2_CAMERA:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("donh2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("donh3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ case WAITSTATE_JDT2_SHRUG:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT4_DILDO_TALK:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT5_CALM_DOWN:
+ case WAITSTATE_JDT5_POINT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt5"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT6_PICKUP:
+ case WAITSTATE_JDT6_KNOCK:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAR1_SKIRT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar1"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ case WAITSTATE_MAR2_CELL_END:
+ case WAITSTATE_MAR2_CELL_TALK:
+ case WAITSTATE_MAR2_FOOT_TAP:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAR3_HOOCHY:
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal1"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL3_SEATED_TALK:
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ case WAITSTATE_SAL3_SIT_DOWN:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL4_DUST_DOWN:
+ case WAITSTATE_SAL4_GIRL_RUN:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL7_LOOKOUT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal7"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC3_WAFT:
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC4_CARRY_BOX:
+ case WAITSTATE_VIC4_CELL_LOOK:
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_TOURIST3:
+ case WAITSTATE_TOURIST2:
+ case WAITSTATE_TOURIST1:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("tourist"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAC2_PLEAD:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mac2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic7"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ default:
+ CStreaming::RequestAnim(0, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ }
+ CStreaming::LoadAllRequestedModels(false);
+}
+
+void
+CPed::UnloadNonStandardPedAnim(eWaitState waitState)
+{
+ switch(waitState) {
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ if(CAnimManager::GetAnimationBlock("MPNote"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("MPNote"));
+ break;
+ case WAITSTATE_CS_MISC_IDLE_LOOK:
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ case WAITSTATE_CS_MISC_IDLE_CELL_TALK:
+ if(CAnimManager::GetAnimationBlock("cs_misc"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("cs_misc"));
+ break;
+ case WAITSTATE_DONH2_CAMERA:
+ if(CAnimManager::GetAnimationBlock("donh2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("donh2"));
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ if(CAnimManager::GetAnimationBlock("donh3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("donh3"));
+ break;
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ case WAITSTATE_JDT2_SHRUG:
+ if(CAnimManager::GetAnimationBlock("cs_misc"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("cs_misc"));
+ break;
+ case WAITSTATE_JDT4_DILDO_TALK:
+ if(CAnimManager::GetAnimationBlock("jdt4"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt4"));
+ break;
+ case WAITSTATE_JDT5_CALM_DOWN:
+ case WAITSTATE_JDT5_POINT:
+ if(CAnimManager::GetAnimationBlock("jdt5"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt5"));
+ break;
+ case WAITSTATE_JDT6_PICKUP:
+ case WAITSTATE_JDT6_KNOCK:
+ if(CAnimManager::GetAnimationBlock("jdt6"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt6"));
+ break;
+ case WAITSTATE_MAR1_SKIRT:
+ if(CAnimManager::GetAnimationBlock("mar1"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar1"));
+ break;
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ case WAITSTATE_MAR2_CELL_END:
+ case WAITSTATE_MAR2_CELL_TALK:
+ case WAITSTATE_MAR2_FOOT_TAP:
+ if(CAnimManager::GetAnimationBlock("mar2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar2"));
+ break;
+ case WAITSTATE_MAR3_HOOCHY:
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ if(CAnimManager::GetAnimationBlock("mar3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar3"));
+ break;
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ if(CAnimManager::GetAnimationBlock("sal1"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal1"));
+ break;
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ if(CAnimManager::GetAnimationBlock("sal2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal2"));
+ break;
+ case WAITSTATE_SAL3_SEATED_TALK:
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ case WAITSTATE_SAL3_SIT_DOWN:
+ if(CAnimManager::GetAnimationBlock("sal3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal3"));
+ break;
+ case WAITSTATE_SAL4_DUST_DOWN:
+ case WAITSTATE_SAL4_GIRL_RUN:
+ if(CAnimManager::GetAnimationBlock("sal4"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal4"));
+ break;
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ if(CAnimManager::GetAnimationBlock("sal6"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal6"));
+ break;
+ case WAITSTATE_SAL7_LOOKOUT:
+ if(CAnimManager::GetAnimationBlock("sal7"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal7"));
+ break;
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ if(CAnimManager::GetAnimationBlock("vic2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic2"));
+ break;
+ case WAITSTATE_VIC3_WAFT:
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ if(CAnimManager::GetAnimationBlock("vic3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic3"));
+ break;
+ case WAITSTATE_VIC4_CARRY_BOX:
+ case WAITSTATE_VIC4_CELL_LOOK:
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ if(CAnimManager::GetAnimationBlock("vic4"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic4"));
+ break;
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ if(CAnimManager::GetAnimationBlock("vic6"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic6"));
+ break;
+ case WAITSTATE_TOURIST3:
+ case WAITSTATE_TOURIST2:
+ case WAITSTATE_TOURIST1:
+ if(CAnimManager::GetAnimationBlock("tourist"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("tourist"));
+ break;
+ case WAITSTATE_MAC2_PLEAD:
+ if(CAnimManager::GetAnimationBlock("mac2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mac2"));
+ break;
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ if(CAnimManager::GetAnimationBlock("vic7"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic7"));
+ break;
+ default:
+ break;
+ }
+}
+
+
#ifdef COMPATIBLE_SAVES
#define CopyFromBuf(buf, data) memcpy(&data, buf, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
#define CopyToBuf(buf, data) memcpy(buf, &data, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 7637a907..107ad1a2 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -216,6 +216,56 @@ enum eWaitState {
WAITSTATE_GROUND_ATTACK,
WAITSTATE_LANCESITTING,
WAITSTATE_PLAYANIM_HANDSUP_SIMPLE,
+ WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE,
+ WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP,
+ WAITSTATE_CS_MISC_IDLE_LOOK,
+ WAITSTATE_CS_MISC_IDLE_NO,
+ WAITSTATE_CS_MISC_IDLE_YES,
+ WAITSTATE_CS_MISC_IDLE_CHAT2,
+ WAITSTATE_CS_MISC_IDLE_COUGH,
+ WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE,
+ WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT,
+ WAITSTATE_CS_MISC_IDLE_CELL_TALK,
+ WAITSTATE_DONH2_CAMERA,
+ WAITSTATE_DONH3_HAPPY,
+ WAITSTATE_JDT2_ANXIOUS_TALK,
+ WAITSTATE_JDT2_SHRUG,
+ WAITSTATE_JDT4_DILDO_TALK,
+ WAITSTATE_JDT5_CALM_DOWN,
+ WAITSTATE_JDT5_POINT,
+ WAITSTATE_JDT6_PICKUP,
+ WAITSTATE_MAR1_SKIRT,
+ WAITSTATE_MAR2_CELL_ANSWER,
+ WAITSTATE_MAR2_CELL_END,
+ WAITSTATE_MAR2_CELL_TALK,
+ WAITSTATE_MAR2_FOOT_TAP,
+ WAITSTATE_MAR3_HOOCHY,
+ WAITSTATE_MAR3_NOTE_IDLE,
+ WAITSTATE_MAR3_NOTE_PICKUP,
+ WAITSTATE_SAL1_BIREFCASE_DOWN,
+ WAITSTATE_SAL2_IDLE_SEATED,
+ WAITSTATE_SAL2_SEAT_TO_STAND,
+ WAITSTATE_SAL3_SEATED_TALK,
+ WAITSTATE_SAL3_SEATED_IDLE,
+ WAITSTATE_SAL4_DUST_DOWN,
+ WAITSTATE_SAL4_GIRL_RUN,
+ WAITSTATE_SAL6_ANGRY_SEATED,
+ WAITSTATE_SAL6_IDLE_SEATED,
+ WAITSTATE_SAL7_LOOKOUT,
+ WAITSTATE_VIC2_POINT_ANGRY,
+ WAITSTATE_VIC3_WAFT,
+ WAITSTATE_VIC3_PICKUP_ROLL,
+ WAITSTATE_VIC4_CARRY_BOX,
+ WAITSTATE_VIC4_CELL_LOOK,
+ WAITSTATE_VIC4_CRATE_IDLE,
+ WAITSTATE_VIC6_CELL_ANGRY,
+ WAITSTATE_TOURIST3,
+ WAITSTATE_TOURIST2,
+ WAITSTATE_TOURIST1,
+ WAITSTATE_MAC2_PLEAD,
+ WAITSTATE_JDT6_KNOCK,
+ WAITSTATE_SAL3_SIT_DOWN,
+ WAITSTATE_VIC7_PROD_WITH_FOOT
};
enum eObjective {
@@ -826,7 +876,7 @@ public:
void SetEvasiveDive(CPhysical*, uint8);
void SetAttack(CEntity*);
void StartFightAttack(uint8);
- void SetWaitState(eWaitState, void*);
+ void SetWaitState(eWaitState, void*, bool repeat = false);
bool FightStrike(CVector&, bool);
void FightHitPed(CPed*, CVector&, CVector&, int16);
int32 ChooseAttackPlayer(uint8, bool);
@@ -1225,6 +1275,9 @@ public:
static bool bPedCheat3;
static CVector2D ms_vec2DFleePosition;
+ static void LoadNonStandardPedAnim(eWaitState waitState);
+ static void UnloadNonStandardPedAnim(eWaitState waitState);
+
#ifndef MASTER
// Mobile things
void DebugDrawPedDestination(CPed *, int, int);