action fire_bullets()
{
if (mouse_right == 1) return;
{
VECTOR trace_coords[3];
vec_set(trace_coords.x, vector(5000, 0, 0)); // trace 5000 quants in front of the player
// rotate "trace_coords"
vec_rotate(trace_coords.x, camera.pan);
vec_add(trace_coords.x, player.x); // add the resulting vector to player's position
snd_play(bullet_wav, 100, 0); // play the bullet sound
if (c_trace (player.x, trace_coords.x, IGNORE_ME + USE_POLYGON) > 0) // the "c_trace" ray has hit something?
{
if (you) // and the hit object is an entity?
{
if (you.skill1 == 99) // and the hit entity has its skill1 set to 99?
{
you.skill50 = 30; // 30 = maximum rotation speed
}
}
}
}
}