- vector floor_test_start = vectical_trace_endpos + v_up * STAT(PL_MAX, NULL).z; // top of player's head - highest point we know is not inside solid
- traceline(floor_test_start, floor_test_start + v_forward * 128 - v_up * 128, MOVE_NOMONSTERS, it);
- te_beam(NULL, floor_test_start, trace_endpos);
- LOG_INFOF(" floor trace_fraction: %f\n", trace_fraction);
- if (trace_fraction == 1.0) continue;
+ vector floor_test_start = vectical_trace_endpos + v_up * STAT(PL_MAX, NULL).z + v_forward * STAT(PL_MAX, NULL).x; // top front of player's bbox - highest point we know is not inside solid
+ traceline(floor_test_start, floor_test_start + v_forward * 100 - v_up * 128, MOVE_NOMONSTERS, it);
+ //te_beam(NULL, floor_test_start, trace_endpos);
+ if (trace_fraction == 1.0) goto skip;
+
+ if (autocvar_g_nades) {
+ bool nade_in_range = false;
+ IL_EACH(g_projectiles, it.classname == "nade",
+ {
+ if (vdist(it.origin - vectical_trace_endpos, <, autocvar_g_nades_nade_radius)) {
+ nade_in_range = true;
+ goto skip;
+ }
+ });
+ if (nade_in_range) goto skip;
+ }