MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / PhysPastPortal

Function PhysPastPortal

physics/findintersection.cpp:4438–4451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4436}
4437
4438bool PhysPastPortal(const room *rp, portal *pp) {
4439 // If we don't render the portal's faces, then we see through it
4440 if (!(pp->flags & PF_RENDER_FACES))
4441 return 1;
4442
4443 // Check if the face's texture has transparency
4444 face *fp = &rp->faces[pp->portal_face];
4445 int bm_handle = GetTextureBitmap(fp->tmap, 0);
4446
4447 if (GetFaceAlpha(fp, bm_handle))
4448 return 1; // Face has alpha or transparency, so we can see through it
4449 else
4450 return 0; // Not transparent, so no render past
4451}
4452
4453int fvi_room(int room_index, int from_portal, int room_obj) {
4454 vector hit_point; // where we hit

Callers 1

fvi_roomFunction · 0.85

Calls 2

GetTextureBitmapFunction · 0.85
GetFaceAlphaFunction · 0.70

Tested by

no test coverage detected