MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getSupport

Method getSupport

game/state/battle/battleitem.cpp:302–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302void BattleItem::getSupport()
303{
304 auto tile = tileObject->getOwningTile();
305 auto obj = tile->getItemSupportingObject();
306 auto restingPosition =
307 obj->getPosition() + Vec3<float>{0.0f, 0.0f, (float)obj->type->height / 40.0f};
308
309 bounced = false;
310 falling = false;
311 velocity = {0.0f, 0.0f, 0.0f};
312 obj->supportedItems = true;
313 if (position != restingPosition)
314 {
315 setPosition(restingPosition);
316 }
317}
318
319bool BattleItem::findSupport()
320{

Callers 1

Calls 3

getOwningTileMethod · 0.80
getPositionMethod · 0.45

Tested by

no test coverage detected