Post by knightmare on Aug 25, 2014 16:51:19 GMT -5
One irritating thing I've encountered in making maps is how the func_train entity follows its route. The bottom southwest bounding corner (or more precisely, a point 1 unit below that on all 3 axis) follows the path_corners.
On more complex, non-rectangular brush models this point is harder to find, making it difficult to predict exactly where the train will go. Add in that 1-unit corner misalignment, and it's a real headache.
I realized that it would be easier for the func_train to be made with an origin brush, and have the origin point follow the path_corners instead (in Q3, all bmodels have to have an origin brush). Because the Lazarus func_train additions used up all the spawnflags available in most editors, I had to make a new entity named func_train_origin. This becomes a regular func_train on map load, with an internal spawnflag set that makes it follow path_corners by its origin. I also made similar variants of model_train, misc_viper, and misc_strogg_ship, with "_origin" added to the classname.
I've already got this working in a test build of 3ZB2 (same as the one I added some Lazarus features to such as model_spawn, model_train and rotating trains). It will also be included in the next KMQ2 update. For now you'll have to add the new train variants to your editor's entity list (just make a copy of the func_train entity definition, and add "_origin" to the classname).
Here's the 3ZB2 build with this implemented (for both vanilla Q2 and KMQ2):
www.markshan.com/knightmare/downloads/3zb2_lazarus_1.2.4.zip
EDIT: attached screenshots of func_train_origin in action. The red boxes mark the path_corners, and the white light texture on top of the platform marks the location of its origin brush.
On more complex, non-rectangular brush models this point is harder to find, making it difficult to predict exactly where the train will go. Add in that 1-unit corner misalignment, and it's a real headache.
I realized that it would be easier for the func_train to be made with an origin brush, and have the origin point follow the path_corners instead (in Q3, all bmodels have to have an origin brush). Because the Lazarus func_train additions used up all the spawnflags available in most editors, I had to make a new entity named func_train_origin. This becomes a regular func_train on map load, with an internal spawnflag set that makes it follow path_corners by its origin. I also made similar variants of model_train, misc_viper, and misc_strogg_ship, with "_origin" added to the classname.
I've already got this working in a test build of 3ZB2 (same as the one I added some Lazarus features to such as model_spawn, model_train and rotating trains). It will also be included in the next KMQ2 update. For now you'll have to add the new train variants to your editor's entity list (just make a copy of the func_train entity definition, and add "_origin" to the classname).
Here's the 3ZB2 build with this implemented (for both vanilla Q2 and KMQ2):
www.markshan.com/knightmare/downloads/3zb2_lazarus_1.2.4.zip
EDIT: attached screenshots of func_train_origin in action. The red boxes mark the path_corners, and the white light texture on top of the platform marks the location of its origin brush.