Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float (entity pse) against_wall =
- {
- // (org + (x * v_forward) + (y * v_right) + (z * v_up))
- local float score;
- makevectors (pse.v_angle);
- traceline (pse.spawnorigin, pse.origin + '25 0 0' ,FALSE, pse);
- if (trace_fraction != 1)
- {
- score = score + 1;
- //bprint (" near wall on right.....\n");
- }
- //SpawnTempDebugMarker (trace_endpos);
- makevectors (pse.v_angle);
- traceline (pse.spawnorigin, pse.origin + '-25 0 0' ,FALSE, pse);
- if (trace_fraction != 1)
- {
- score = score + 1;
- //bprint (" near wall on left.....\n");
- }
- //SpawnTempDebugMarker (trace_endpos);
- makevectors (pse.v_angle);
- traceline (pse.spawnorigin, pse.origin + '0 25 0' ,FALSE, pse);
- if (trace_fraction != 1)
- {
- score = score + 1;
- //bprint (" near wall in front.....\n");
- }
- //SpawnTempDebugMarker (trace_endpos);
- makevectors (pse.v_angle);
- traceline (pse.spawnorigin, pse.origin + '0 -25 0' ,FALSE, pse);
- if (trace_fraction != 1)
- {
- score = score + 1;
- //bprint (" near wall at rear.....\n");
- }
- //SpawnTempDebugMarker (trace_endpos);
- if (!score)
- return (FALSE);
- else
- return (TRUE);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement