How to Prevent Your Maps from Crashing and/or Fix Them — “Bad Inline Model” Errors

This is partially a rewrite of this thread in the form of a guide/tutorial for mappers. I feel that more of them need to know about this. It is not posting the same thing twice.

[HR][/HR]

https://dl.dropbox.com/u/17850283/badinlinemodel.png

I’m sure you’ve experienced these errors at one point or another. They’re incredibly annoying and make your game crash instantly. They cause entire servers to empty out if an affected map comes on, and they’re hell to troubleshoot.

[H2]How can I prevent my map from being affected?[/H2]The cause of bad inline model errors is the presence of static content (decals) on dynamic brush entities (doors, moving platforms, breakable glass panes, rotating parts and so on). This is what the number in the errors represents — the index of the inline (brush) model causing problems.
All you have to do is be careful where you stick your decals: make sure they aren’t placed over any brush you’ve tied to an entity, either partially or in their entirety. This, for example, is bad:

https://dl.dropbox.com/u/17850283/baddecalexample.png

Even though the button doesn’t move when pressed, the lambda decal on it still causes an error. In a perfect world, the compile tools would report this to you, or even fix it for you, but you’ll just have to keep an eye out yourself.
In summation, tread carefully when decorating your map, and keep decals away from moving parts! This includes, but is not limited to, the following entities:

[TABLE=“class: outer_border, width: 500, align: center”]

func_breakable
func_breakable_surf
func_brush
func_button
func_clip_vphysics
func_conveyor
func_door
func_door_rotating

func_extinguishercharger
func_guntarget
func_healthcharger
func_illusionary
func_ladder
func_lod
func_lookdoor
func_monitor

func_movelinear
func_physbox
func_physbox_multiplayer
func_platrot
func_recharge
func_reflective_glass
func_rot_button
func_rotating

func_tank
func_tankairboatgun
func_tankapcrocket
func_tanklaser
func_tankmortar
func_tankphyscannister
func_tankpulselaser
func_tankrocket

func_tanktrain
func_trackautochange
func_trackchange
func_tracktrain
func_traincontrols
func_wall
func_wall_toggle
momentary_rot_button

[/TABLE]

[H2]Need a quick way to check or fix your map?[/H2]Look no further than the Sassilization Inline Patcher.
If you’re unsure whether you’ve misplaced any decals in your map, a quick way to check is to compile it and run the BSP through this application. The thorough logging system will inform you what the problematic decals are (their texture paths) and where they’re located (underlying brush model, class and targetname).
Likewise, if you’re a server owner and would like to spare your players the discomfort of crashing to desktop, run any map you get complaints about through the patcher, and then upload the fixed version to your servers.
Check this thread for more info.

Thanks for taking the time to read this. I hope that you will use what you learned here to improve your mapping, both for your and the end-user’s sake.
Comments, remarks and criticism are welcome.

Added better example picture and updated entity list.