MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getBlock

Method getBlock

src/Ruleset/MapData.cpp:168–185  ·  view source on GitHub ↗

* Gets the amount of blockage of a certain type. * @param type Type. * @return The blockage (0-255). */

Source from the content-addressed store, hash-verified

166 * @return The blockage (0-255).
167 */
168int MapData::getBlock(ItemDamageType type) const
169{
170 switch (type)
171 {
172 case DT_NONE:
173 return _block[1];
174 case DT_SMOKE:
175 return _block[3];
176 case DT_HE:
177 case DT_IN:
178 case DT_STUN:
179 return _block[2];
180 default:
181 break;
182 }
183
184 return 0;
185}
186
187/**
188 * Sets the amount of blockage for all types.

Callers 3

blockageMethod · 0.80
faceWindowMethod · 0.80
loadDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected