MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / hazard_check

Method hazard_check

src/SB/Game/zEntCruiseBubble.cpp:3047–3061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3045 }
3046
3047 bool cruise_bubble::state_missle_fly::hazard_check(NPCHazard& haz, void* context)
3048 {
3049 // get_missle_mat()->pos uses one more instruction for no apparent reason
3050 xVec3 vvar = haz.pos_hazard - get_missle_mat()->pos;
3051 F32 fvar = current_tweak->missle.hit_dist + haz.custdata.typical.rad_cur;
3052
3053 // scheduling for implicit copy ctor off
3054 if (vvar.length2() < fvar * fvar)
3055 {
3056 ((NPCHazard**)context)[0] = &haz;
3057 return false;
3058 }
3059
3060 return true;
3061 }
3062
3063 U8 cruise_bubble::state_missle_fly::collide()
3064 {

Callers

nothing calls this directly

Calls 3

get_missle_matFunction · 0.85
check_lock_targetFunction · 0.70
length2Method · 0.45

Tested by

no test coverage detected