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

Function StartEntity

TombEngine/Objects/TR3/tr3_objects.cpp:63–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61using namespace TEN::Entities::TR3;
62
63static void StartEntity(ObjectInfo* obj)
64{
65 obj = &Objects[ID_TONY_BOSS];
66 if (obj->loaded)
67 {
68 obj->Initialize = InitializeTony;
69 obj->collision = CreatureCollision;
70 obj->control = TonyControl;
71 obj->shadowType = ShadowMode::All;
72 obj->HitPoints = 100;
73 obj->pivotLength = 50;
74 obj->radius = 102;
75 obj->intelligent = true;
76 obj->nonLot = true; // NOTE: Doesn't move to reach the player, only throws projectiles.
77 obj->SetBoneRotationFlags(6, ROT_X | ROT_Y);
78 obj->SetBoneRotationFlags(13, ROT_Y);
79 obj->SetHitEffect(HitEffect::NonExplosive);
80 }
81
82 obj = &Objects[ID_TIGER];
83 if (obj->loaded)
84 {
85 obj->Initialize = InitializeCreature;
86 obj->control = TigerControl;
87 obj->collision = CreatureCollision;
88 obj->shadowType = ShadowMode::All;
89 obj->HitPoints = 24;
90 obj->pivotLength = 200;
91 obj->radius = 340;
92 obj->intelligent = true;
93 obj->SetBoneRotationFlags(21, ROT_Y);
94 obj->SetHitEffect();
95 }
96
97 obj = &Objects[ID_COBRA];
98 if (obj->loaded)
99 {
100 obj->Initialize = InitializeCobra;
101 obj->control = CobraControl;
102 obj->collision = CreatureCollision;
103 obj->shadowType = ShadowMode::All;
104 obj->HitPoints = 8;
105 obj->radius = 102;
106 obj->intelligent = true;
107 obj->nonLot = true;
108 obj->SetBoneRotationFlags(1, ROT_Z);
109 obj->SetBoneRotationFlags(5, ROT_Z);
110 obj->SetBoneRotationFlags(11, ROT_Z);
111 obj->SetBoneRotationFlags(12, ROT_Z);
112 obj->SetHitEffect();
113 }
114
115 obj = &Objects[ID_RAPTOR];
116 if (obj->loaded)
117 {
118 obj->Initialize = InitializeCreature;
119 obj->control = RaptorControl;
120 obj->collision = CreatureCollision;

Callers 1

InitializeTR3ObjectsFunction · 0.70

Calls 3

CheckIfSlotExistsFunction · 0.85
SetBoneRotationFlagsMethod · 0.80
SetHitEffectMethod · 0.80

Tested by

no test coverage detected