MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getWorldObjectTangibility

Method getWorldObjectTangibility

src/clientbase/ClientIntangibilityManager.cpp:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24unsigned char ClientIntangibilityManager::getWorldObjectTangibility(const Obstacle* obs) {
25 if (!obs) {
26 return 0; // we don't know what it is, so it's not setable (like a teleporter or custom object) assume it's solid as a rock
27 }
28
29 if (false) {
30 // FIXME -- obstacle GUID's are broken, meshFaces are not accounted for
31 TangibilityMap::iterator itr = tangibilityMap.find(obs->getGUID());
32 if (itr != tangibilityMap.end()) {
33 return itr->second;
34 }
35 }
36
37 return obs->isDriveThrough() ? _INVALID_TANGIBILITY : 0;
38}
39
40void ClientIntangibilityManager::resetTangibility(void) {
41 tangibilityMap.clear();

Callers 3

hitBuildingMethod · 0.45
hitObstacleResizingMethod · 0.45

Calls 4

getGUIDMethod · 0.80
isDriveThroughMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected