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

Function StartEntity

TombEngine/Objects/TR5/tr5_objects.cpp:86–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84using namespace TEN::Effects::Fireflies;
85
86static void StartEntity(ObjectInfo *obj)
87{
88 obj = &Objects[ID_LARA];
89 if (obj->loaded)
90 {
91 obj->Initialize = InitializeLaraLoad;
92 obj->shadowType = ShadowMode::Player;
93 obj->HitPoints = 1000;
94 }
95
96 // TODO: Will be moved to TR4 in ObjectCleaning branch.
97 obj = &Objects[ID_SAS];
98 if (obj->loaded)
99 {
100 obj->Initialize = InitializeGuard;
101 obj->control = GuardControl;
102 obj->collision = CreatureCollision;
103 obj->shadowType = ShadowMode::All;
104 obj->HitPoints = 40;
105 obj->radius = 102;
106 obj->pivotLength = 50;
107 obj->intelligent = true;
108 obj->SetBoneRotationFlags(6, ROT_X | ROT_Y);
109 obj->SetBoneRotationFlags(13, ROT_X | ROT_Y);
110 obj->SetHitEffect();
111 }
112
113 obj = &Objects[ID_SWAT];
114 if (obj->loaded)
115 {
116 obj->Initialize = InitializeGuard;
117 obj->collision = CreatureCollision;
118 obj->control = GuardControl;
119 obj->shadowType = ShadowMode::All;
120 obj->HitPoints = 24;
121 obj->pivotLength = 50;
122 obj->radius = 102;
123 obj->intelligent = true;
124 obj->HitRoutine = GuardHit;
125 obj->LotType = LotType::HumanPlusJump;
126 obj->SetBoneRotationFlags(6, ROT_X | ROT_Y);
127 obj->SetBoneRotationFlags(13, ROT_X | ROT_Y);
128 obj->SetHitEffect();
129 }
130
131 obj = &Objects[ID_GUARD1];
132 if (obj->loaded)
133 {
134 AssignObjectAnimations(*obj, ID_SWAT, "ID_GUARD1", "ID_SWAT");
135 obj->Initialize = InitializeGuard;
136 obj->collision = CreatureCollision;
137 obj->control = GuardControl;
138 obj->shadowType = ShadowMode::All;
139 obj->HitPoints = 24;
140 obj->radius = 102;
141 obj->pivotLength = 50;
142 obj->HitRoutine = GuardHit;
143 obj->intelligent = true;

Callers 1

InitializeTR5ObjectsFunction · 0.70

Calls 4

AssignObjectAnimationsFunction · 0.85
InitAnimatingFunction · 0.85
SetBoneRotationFlagsMethod · 0.80
SetHitEffectMethod · 0.80

Tested by

no test coverage detected