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

Function SwitchPathfinding

TombEngine/Objects/TR1/Entity/WingedMutant.cpp:135–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 };
134
135 static void SwitchPathfinding(ItemInfo& item, WingedMutantPathFinding path)
136 {
137 auto& creature = *GetCreatureInfo(&item);
138
139 switch (path)
140 {
141 case WMUTANT_PATH_GROUND:
142 creature.LOT.Step = CLICK(1);
143 creature.LOT.Drop = -CLICK(1);
144 creature.LOT.Fly = NO_FLYING;
145 creature.LOT.Zone = ZoneType::Basic;
146 break;
147
148 case WMUTANT_PATH_AERIAL:
149 creature.LOT.Step = BLOCK(20);
150 creature.LOT.Drop = -BLOCK(20);
151 creature.LOT.Fly = WINGED_MUTANT_FLY_VELOCITY;
152 creature.LOT.Zone = ZoneType::Flyer;
153 break;
154 }
155 }
156
157 static WingedMutantProjectileType CanTargetPlayer(ItemInfo& item, AI_INFO& ai)
158 {

Callers 2

ControlWingedMutantFunction · 0.85

Calls 1

GetCreatureInfoFunction · 0.85

Tested by

no test coverage detected