summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimBlendAssocGroup.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-12 10:50:23 +0200
committeraap <aap@papnet.eu>2019-06-12 10:50:23 +0200
commit6f0c57d228aec4586d4062018b877b5e51e71e3a (patch)
tree50145c722e6ca64162b411e2df67703793a49e68 /src/animation/AnimBlendAssocGroup.cpp
parentadded animation system (with skin support for now) (diff)
downloadre3-6f0c57d228aec4586d4062018b877b5e51e71e3a.tar
re3-6f0c57d228aec4586d4062018b877b5e51e71e3a.tar.gz
re3-6f0c57d228aec4586d4062018b877b5e51e71e3a.tar.bz2
re3-6f0c57d228aec4586d4062018b877b5e51e71e3a.tar.lz
re3-6f0c57d228aec4586d4062018b877b5e51e71e3a.tar.xz
re3-6f0c57d228aec4586d4062018b877b5e51e71e3a.tar.zst
re3-6f0c57d228aec4586d4062018b877b5e51e71e3a.zip
Diffstat (limited to 'src/animation/AnimBlendAssocGroup.cpp')
-rw-r--r--src/animation/AnimBlendAssocGroup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/animation/AnimBlendAssocGroup.cpp b/src/animation/AnimBlendAssocGroup.cpp
index 16749504..8b0001ac 100644
--- a/src/animation/AnimBlendAssocGroup.cpp
+++ b/src/animation/AnimBlendAssocGroup.cpp
@@ -93,7 +93,7 @@ GetModelFromName(const char *name)
for(i = 0; i < MODELINFOSIZE; i++){
mi = CModelInfo::GetModelInfo(i);
- if(mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
+ if(mi && mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
strcmpIgnoringDigits(mi->GetName(), name))
return mi;
}
@@ -152,6 +152,7 @@ CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump,
STARTPATCHES
+ InjectHook(0x4012D0, &CAnimBlendAssocGroup::DestroyAssociations, PATCH_JUMP);
InjectHook(0x4013D0, (CAnimBlendAssociation *(CAnimBlendAssocGroup::*)(uint32))&CAnimBlendAssocGroup::GetAnimation, PATCH_JUMP);
InjectHook(0x401300, (CAnimBlendAssociation *(CAnimBlendAssocGroup::*)(const char*))&CAnimBlendAssocGroup::GetAnimation, PATCH_JUMP);
InjectHook(0x401420, (CAnimBlendAssociation *(CAnimBlendAssocGroup::*)(uint32))&CAnimBlendAssocGroup::CopyAnimation, PATCH_JUMP);