File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
source/Scripts/Script_AniName Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ Dieses Skript überschreibt dieses Zuordnungsmuster für bestimmte Spezies:
77 - gESpecies_Skeleton: Skelett_....xmot
88 - gESpecies_Zombie: Zombie_....xmot
99
10+ Das gleiche Zuordnungsmuster wird auf die Effekte `eff_creature_<actor name>_stumble_01` und
11+ `eff_creature_<actor name>_die_01` angewendet:
12+ - gESpecies_Skeleton: eff_creature_skeleton_stumble_01, eff_creature_skeleton_die_01
13+ - gESpecies_Zombie: eff_creature_zombie_stumble_01, eff_creature_zombie_die_01
14+
10151. Installation
1116Der Ordner 'scripts' muss ins Gothic 3 Installationverzeichnis kopiert werden.
1217Es ist nicht notwendig ein neues Spiel zu beginnen.
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ This Script overrides that mapping for certain species:
77 - gESpecies_Skeleton: Skeleton_....xmot
88 - gESpecies_Zombie: Zombie_....xmot
99
10+ The same mapping override is applied to the `eff_creature_<actor name>_stumble_01` and
11+ `eff_creature_<actor name>_die_01` effects.
12+ - gESpecies_Skeleton: eff_creature_skeleton_stumble_01, eff_creature_skeleton_die_01
13+ - gESpecies_Zombie: eff_creature_zombie_stumble_01, eff_creature_zombie_die_01
14+
10151. Installation
1116The 'scripts' folder has to be copied into the Gothic 3 install folder.
1217There is no need to start a new game.
Original file line number Diff line number Diff line change @@ -21,6 +21,26 @@ namespace
2121 }
2222 }
2323 }
24+
25+ static mCFunctionHook Hook_PSAnimation_GetSkeletonName;
26+ GEBool GE_STDCALL PSAnimation_GetSkeletonName (PSAnimation const &This, bCString & o_SkeletonName)
27+ {
28+ gCNPC_PS const * NPC = This.IsValid () ? GetPropertySet<gCNPC_PS >(This->GetEntity (), eEPropertySetType_NPC) : nullptr ;
29+ if (NPC)
30+ {
31+ switch (NPC->GetSpecies ().GetValue ())
32+ {
33+ case gESpecies_Skeleton :
34+ o_SkeletonName = " Skeleton" ;
35+ return GETrue;
36+ case gESpecies_Zombie :
37+ o_SkeletonName = " Zombie" ;
38+ return GETrue;
39+ }
40+ }
41+
42+ return Hook_PSAnimation_GetSkeletonName.GetOriginalFunction (PSAnimation_GetSkeletonName)(This, o_SkeletonName);
43+ }
2444}
2545
2646void ApplyHooks ()
@@ -32,6 +52,10 @@ void ApplyHooks()
3252 .AddRegArg (mCRegisterBase ::mERegisterType_Ebx ) // eCEntity const * Actor
3353 .AddRegArg (mCRegisterBase ::mERegisterType_Esi ) // bCString & ActorName
3454 .InsertCall ().Hook ();
55+
56+ Hook_PSAnimation_GetSkeletonName
57+ .Prepare (PROC_Script (" ?GetSkeletonName@PSAnimation@@QBE_NAAVbCString@@@Z" ), &PSAnimation_GetSkeletonName)
58+ .ThisCall ().Hook ();
3559}
3660
3761
You can’t perform that action at this time.
0 commit comments