MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / StartEntity

Function StartEntity

TombEngine/Objects/TR1/tr1_objects.cpp:37–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35using namespace TEN::Entities::Traps;
36
37static void StartEntity(ObjectInfo* obj)
38{
39 obj = &Objects[ID_WOLF];
40 if (obj->loaded)
41 {
42 obj->Initialize = InitializeWolf;
43 obj->control = WolfControl;
44 obj->collision = CreatureCollision;
45 obj->shadowType = ShadowMode::All;
46 obj->HitPoints = 6;
47 obj->pivotLength = 375;
48 obj->radius = 340;
49 obj->intelligent = true;
50 obj->SetBoneRotationFlags(2, ROT_Y);
51 obj->SetHitEffect();
52 }
53
54 obj = &Objects[ID_BEAR];
55 if (obj->loaded)
56 {
57 obj->Initialize = InitializeCreature;
58 obj->control = BearControl;
59 obj->collision = CreatureCollision;
60 obj->shadowType = ShadowMode::All;
61 obj->HitPoints = 20;
62 obj->pivotLength = 500;
63 obj->radius = 340;
64 obj->intelligent = true;
65 obj->SetBoneRotationFlags(13, ROT_Y);
66 obj->SetHitEffect();
67 }
68
69 obj = &Objects[ID_APE];
70 if (obj->loaded)
71 {
72 obj->Initialize = InitializeCreature;
73 obj->control = ApeControl;
74 obj->collision = CreatureCollision;
75 obj->shadowType = ShadowMode::All;
76 obj->HitPoints = 22;
77 obj->pivotLength = 250;
78 obj->radius = 340;
79 obj->intelligent = true;
80 obj->LotType = LotType::Ape;
81 obj->SetHitEffect();
82 }
83
84 obj = &Objects[ID_BIG_RAT];
85 if (obj->loaded)
86 {
87 obj->Initialize = InitializeBigRat;
88 obj->control = BigRatControl;
89 obj->collision = CreatureCollision;
90 obj->shadowType = ShadowMode::All;
91 obj->HitPoints = 5;
92 obj->pivotLength = 200;
93 obj->radius = 204;
94 obj->intelligent = true;

Callers 1

InitializeTR1ObjectsFunction · 0.70

Calls 2

SetBoneRotationFlagsMethod · 0.80
SetHitEffectMethod · 0.80

Tested by

no test coverage detected