after a brief scan through the thread, these are my thoughts:
the phaser model should have its origin at its tail end:
Code:
+------------
in this illustration, '+' is the origin and '------------' is the model.
when you shoot, do a c_trace in the direction and distance you want to shoot. this will let you detect the enemy that gets hit, and will return the distance from the gun to the point of impact. place the 'phaser_model' at the gun, use vec_to_angle to get the phaser to point in the direction of the shot, and phaser.scale_x = result / factor; where result is the distance traced to the target (c_trace will return this distance) and factor is the length of your phaser model.
^^ sorry, that's an instant beam. i didn't realize until just now you need it to move over time. in this case, when you shoot you need the trace distance to increase by phaser_speed * time_step, until eventually it hits something or reaches a maximum distance. this would need to be done in a while loop.
bugger! i did a search for c_trace to see if either of you had already though of this idea, and didn't find any. but i should've searched for "trace" because demiGod has already said that

julz