If you don't need to predict the creation of the entity, but just want to predict it's state, then you don't need to use that API. Otherwise, have a look at where CREATE_PREDICTED_ENTITY is defined in c_baseentity.h. Predicting entity creation is something we use for TF2, but the HL2/HL2DM/CS:S code doesn't use it yet. Since that specific functionality is unshipped, you may run into some issues. You'll want to look at predictable_entity.h and predictableid as well.
The core concept is that when the creation of an entity is predicted client side, a predictable ID is created for it. Because entities being created this way are created using the identical code (the code for all of these things should live in the game_shared folder), the server will create it's version with a matching ID and will network that id down to the client in the network update packets. This allows the client to "reconnect" the predicted creation entity with the true server entity after it starts getting network updates for it. There isn't a good example in the current SDK for this. :( The usage pattern would be to create the prediction of a rocket or grenade (so that if you are lagged it doesn't just pop into existence at some later time like you are probably used to) and predict its simulation forward while waiting for the server to ack the true object. The real tricky part is that the predicted entity must be locked to the creating player's clock for simulation (see AddToPlayerSimulationList() in c_baseplayer.cpp.h). For most entities where you don't care about predicting actual creation, but just care about predicting the entity's behavior, you can probably make due without CREATE_PREDICTED_ENTITY. If anyone starts to go down this road and runs into snags, feel free to post questions and I'll try to respond. At some point I'd like to ship out a proper example which will make all of this stuff clear, or at least write up a document. Not sure if you noticed that all of the code for client side prediction and for server side lag compensation is in the SDK now. I would highly recommend studying that code as it will give you a ton of insight into how on-line FPSs work at the low level. Yahn -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: Wednesday, December 15, 2004 7:01 PM To: [EMAIL PROTECTED] Subject: [hlcoders] CreatePredictedEntityByName Hi gang, Has anyone sussed out the CreatePredictedEntityByName function? I'm trying to make a client-side predicted beam entity, but i can't figure out all the parameters. The command goes something like: CBaseEntity::CreatePredictedEntityByName( const char *classname, const char *module, int line) I figured out the classname (duh) but i've got nfi what module or line does. Can anyone shed some light on this? Thanks, Teddy _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders