> Quick question, the 'angles' field (either SmartEdit or manually entered) > in Hammer/WC, is this copied directly into the pev->angles field in > entities? > > I can't check it myself since I think the engine does it.
The engine calls DispatchKeyValue() (which is in cbase.cpp) in the game DLL to initialize entity variables from the key/value pairs of spawned entities in the .bsp file. DispatchKeyValue() calls EntvarsKeyvalue() (which is in util.cpp) which will loop through the gEntvarsDescription[] array trying to find a matching key name. gEntvarsDescription[] is defined in the util.cpp file (and "angles" is one of those keys). When it finds a matching key, it stores that key's value in the appropriate field (using some magic pointer offset math to determine the variables position within the structure). There are a few fields that are handled by the engine, for example, "angle" (not "angles") is a valid key, but you won't find it anywhere in the gEntvarsDescription[] array. The engine handles it and assumes that since it's 'angle' not 'angles' that the only angle being passed in is the YAW (the pitch and roll are set to zero). I assume this is a hold-over from Quake I. You should be able to set a breakpoint in EntvarsKeyvalue() to see when your entity is getting it's "angles" set and examine the key/value pair at that point. Jeffrey "botman" Broome _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

