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

Function lara_col_monkey_forward

TombEngine/Game/Lara/lara_monkey.cpp:224–255  ·  view source on GitHub ↗

State: LS_MONKEY_FORWARD (76) Control: lara_as_monkey_forward()

Source from the content-addressed store, hash-verified

222// State: LS_MONKEY_FORWARD (76)
223// Control: lara_as_monkey_forward()
224void lara_col_monkey_forward(ItemInfo* item, CollisionInfo* coll)
225{
226 auto& player = GetLaraInfo(*item);
227
228 player.Control.IsMonkeySwinging = true;
229 player.Control.MoveAngle = item->Pose.Orientation.y;
230 coll->Setup.LowerFloorBound = NO_LOWER_BOUND;
231 coll->Setup.UpperFloorBound = 0;
232 coll->Setup.LowerCeilingBound = MONKEY_STEPUP_HEIGHT;
233 coll->Setup.UpperCeilingBound = -MONKEY_STEPUP_HEIGHT;
234 coll->Setup.BlockCeilingSlope = true;
235 coll->Setup.BlockMonkeySwingEdge = true;
236 coll->Setup.ForwardAngle = player.Control.MoveAngle;
237 coll->Setup.Radius = LARA_RADIUS;
238 coll->Setup.Height = LARA_HEIGHT_MONKEY;
239 GetCollisionInfo(coll, item);
240
241 if (LaraDeflectEdgeMonkey(item, coll))
242 LaraCollideStopMonkey(item, coll);
243
244 if (CanFallFromMonkeySwing(*item, *coll))
245 {
246 SetLaraMonkeyFallAnimation(item);
247 return;
248 }
249
250 if (CanPerformMonkeySwingStep(*item, *coll))
251 {
252 DoLaraMonkeyStep(item, coll);
253 return;
254 }
255}
256
257// State: LS_MONKEY_BACK (163)
258// Collision: lara_col_monkey_back()

Callers

nothing calls this directly

Calls 7

GetCollisionInfoFunction · 0.85
LaraDeflectEdgeMonkeyFunction · 0.85
LaraCollideStopMonkeyFunction · 0.85
CanFallFromMonkeySwingFunction · 0.85
DoLaraMonkeyStepFunction · 0.85

Tested by

no test coverage detected