Cancel all cutscenes between levels

This commit is contained in:
James Lambert 2022-08-31 08:25:56 -06:00
parent 766857dad7
commit 0236fcc42c
4 changed files with 19 additions and 2 deletions

View file

@ -84,7 +84,8 @@ Where `/home/james/Blender/blender-2.93.1-linux-x64` is the folder where Blender
## Current TODO list
- [ ] level transition jump
- [ ] stop looping sounds betwen levels
- [ ] calculateBarycentricCoords when two points are the same
- [ ] Z buffer allocation
- [ ] Release grabbed objects when line of sight is cut
- [ ] Correct elevator timing
@ -93,6 +94,7 @@ Where `/home/james/Blender/blender-2.93.1-linux-x64` is the folder where Blender
- [ ] Cube dispenser
- [ ] Signage should not always be on
- [ ] Camera shake
- [x] level transition jump
- [x] collide player with dynamic objects
- [x] Render objects intersecting portals differently
- [x] Sliding against walls

Binary file not shown.

View file

@ -154,7 +154,7 @@ void populateKeyframes(const aiAnimation& input, BoneHierarchy& bones, float fix
aiVector3D origin = vectorKey->mValue;
if (!targetBone->GetParent()) {
aiQuaternion &constRot = const_cast <aiQuaternion&>(rotation);
aiQuaternion constRot = rotation;
origin = constRot.Rotate(origin) * modelScale;
}

View file

@ -27,6 +27,8 @@ float gCutsceneChannelPitch[CH_COUNT] = {
[CH_GLADOS] = 0.5f,
};
void cutsceneRunnerCancel(struct CutsceneRunner* runner);
void cutsceneRunnerReset() {
gRunningCutscenes = NULL;
@ -40,6 +42,19 @@ void cutsceneRunnerReset() {
gCutsceneSoundQueues[i] = NULL;
gCutsceneCurrentSound[i] = SOUND_ID_NONE;
}
struct CutsceneRunner* current = gRunningCutscenes;
while (current) {
cutsceneRunnerCancel(current);
current = current->nextRunner;
}
gRunningCutscenes = NULL;
// the heap is reset on level transition so there
// is no need to free any cutscene runners
gUnusedRunners = NULL;
}
struct CutsceneRunner* cutsceneRunnerNew() {