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

Function StartEntity

TombEngine/Objects/TR2/tr2_objects.cpp:46–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44using namespace TEN::Entities::Traps;
45
46static void StartEntity(ObjectInfo* obj)
47{
48 obj = &Objects[ID_SHARK];
49 if (obj->loaded)
50 {
51 obj->Initialize = InitializeCreature;
52 obj->control = SharkControl;
53 obj->collision = CreatureCollision;
54 obj->shadowType = ShadowMode::All;
55 obj->HitPoints = 30;
56 obj->pivotLength = 200;
57 obj->radius = 340;
58 obj->intelligent = true;
59 obj->LotType = LotType::Water;
60 obj->SetBoneRotationFlags(9, ROT_Y);
61 obj->SetHitEffect();
62 }
63
64 obj = &Objects[ID_BARRACUDA];
65 if (obj->loaded)
66 {
67 obj->Initialize = InitializeCreature;
68 obj->control = BarracudaControl;
69 obj->collision = CreatureCollision;
70 obj->shadowType = ShadowMode::All;
71 obj->HitPoints = 12;
72 obj->pivotLength = 200;
73 obj->radius = 204;
74 obj->intelligent = true;
75 obj->LotType = LotType::Water;
76 obj->SetBoneRotationFlags(6, ROT_Y);
77 obj->SetHitEffect();
78 }
79
80 obj = &Objects[ID_EAGLE];
81 if (obj->loaded)
82 {
83 obj->Initialize = InitializeEagle;
84 obj->control = EagleControl;
85 obj->collision = CreatureCollision;
86 obj->shadowType = ShadowMode::All;
87 obj->HitPoints = 20;
88 obj->radius = 204;
89 obj->intelligent = true;
90 obj->pivotLength = 0;
91 obj->LotType = LotType::Flyer;
92 obj->SetHitEffect();
93 }
94
95 obj = &Objects[ID_CROW];
96 if (obj->loaded)
97 {
98 obj->Initialize = InitializeEagle;
99 obj->control = EagleControl;
100 obj->collision = CreatureCollision;
101 obj->shadowType = ShadowMode::All;
102 obj->HitPoints = 15;
103 obj->radius = 204;

Callers 1

InitializeTR2ObjectsFunction · 0.70

Calls 4

AssignObjectAnimationsFunction · 0.85
CheckIfSlotExistsFunction · 0.85
SetBoneRotationFlagsMethod · 0.80
SetHitEffectMethod · 0.80

Tested by

no test coverage detected