Are you by any chance spawning this entity client side before server side? Sounds like that might be the case.
Usually you press your fire button and in the PrimaryAttack the missile gets spawned within the #ifndef CLIENT_DLL / #endif declarations. Otherwise you'll get a glitch when you fire. Keeper -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Ravaine Sent: Wednesday, October 24, 2007 7:30 AM To: [email protected] Subject: [hlcoders] Prediction of projectile-based weapons in Source -- [ Picked text/plain from multipart/alternative ] I'd like to apologize in advance if this has already been discussed previously, but I can't seem to find any relevant topics. I'm currently implementing several missile-based weapons such as a quake style rocket launcher. Right now I've just modified the existing weapon_rpg code to shoot a rocket in a straight line instead of the laser-guided one from HL2DM. It's all working fine except one thing: when the missile entity is created in front of the rocket launcher in 1st person view (havent checked how it looks from 3rd person yet) there seems to be a very slight delay between the time the missile is spawned and the moment it starts flying at its intended velocity, as if one simulation tick was elapsing with the rocket having a null velocity. This is quite annoying as it really makes the weapon feel wierd and unnatural. My guess is this has something to do with prediction and how the missile entity is interpolated on the client side, but Im not quite sure yet how to handle this properly. I've tried a few approaches like using CBaseEntity::CreatePredictedEntity to create the rocket on both the server and client "at the same time" but it still doesnt fix the glitch. Maybe it's the good approach and I forgot to set some flags or data tables... The rocket launcher of the soldier in TF2 doesnt seem to suffer from this effect, nor do the grenade launcher of the Demoman, so I supposed they fixed the problem. I'd like to achieve the same result. Does any have any suggestions and/or code snippets that could help me out? Thanks in advance. _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

