MCPcopy Create free account
hub / github.com/ddnet/ddnet / TestBox

Method TestBox

src/game/collision.cpp:507–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507bool CCollision::TestBox(vec2 Pos, vec2 Size) const
508{
509 Size *= 0.5f;
510 if(CheckPoint(Pos.x - Size.x, Pos.y - Size.y))
511 return true;
512 if(CheckPoint(Pos.x + Size.x, Pos.y - Size.y))
513 return true;
514 if(CheckPoint(Pos.x - Size.x, Pos.y + Size.y))
515 return true;
516 if(CheckPoint(Pos.x + Size.x, Pos.y + Size.y))
517 return true;
518 return false;
519}
520
521void CCollision::MoveBox(vec2 *pInoutPos, vec2 *pInoutVel, vec2 Size, vec2 Elasticity, bool *pGrounded) const
522{

Callers 3

GetNearestAirPosMethod · 0.80
TickDeferredMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected