MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / operator()

Method operator()

src/SB/Core/x/xScene.cpp:1128–1178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1126}
1127
1128bool cb_ray_hits_ent::operator()(xEnt& ent, xGridBound& gridb)
1129{
1130 xCollis c;
1131
1132 if (!(ent.chkby & chkby))
1133 {
1134 return true;
1135 }
1136
1137 if (!(ent.collType & collType))
1138 {
1139 return true;
1140 }
1141
1142 c.flags = coll.flags;
1143
1144 xRayHitsBound(&ray, &ent.bound, &c);
1145
1146 if (!(c.flags & 0x1))
1147 {
1148 return true;
1149 }
1150
1151 if (c.dist > coll.dist)
1152 {
1153 return true;
1154 }
1155
1156 if (ent.collLev == 0x5)
1157 {
1158 iRayHitsModel(&ray, ent.model, &c);
1159
1160 if (!(c.flags & 0x1))
1161 {
1162 return true;
1163 }
1164
1165 if (c.dist > coll.dist)
1166 {
1167 return true;
1168 }
1169 }
1170
1171 memcpy(&coll, &c, sizeof(xCollis));
1172
1173 coll.oid = ent.id;
1174 coll.optr = &ent;
1175 coll.mptr = ent.model;
1176
1177 return true;
1178}
1179
1180void xEntEnable(xEnt* ent)
1181{

Callers

nothing calls this directly

Calls 3

memcpyFunction · 0.85
xRayHitsBoundFunction · 0.70
iRayHitsModelFunction · 0.50

Tested by

no test coverage detected