Posted: Sat Jun 13, 2009 7:15 pm
OK, here's the little command line tool I wrote to do the trick:
http://inequation.unixpod.com/mohaa/
The .x86 file is for Linux, .exe is for Windows, .c is the source code.
This tool basically exploits the fact that q3map bakes shader surfaceparms into the BSP in a so-called shader lump. This tool removes the glass property from the given shaders; as a result, black windows behave as stone and cannot be shot through.
Extract your BSP from the PK3, patch it using the program and then put the patched BSP back into your game, preferably as a custom PK3. It's fully server-side. The only drawback is that black windows will give stone ricochets instead of glass shards when shot.
Run the program without any arguments for instructions, feel free to ask here if something isn't clear.
Here's an exemplary run of the program (well, 2 runs to be exact) that removes the most notorious black windows (i.e. on mohdm2):
I run Linux, thus the commandline which may appear weird to some of you. 
http://inequation.unixpod.com/mohaa/
The .x86 file is for Linux, .exe is for Windows, .c is the source code.
This tool basically exploits the fact that q3map bakes shader surfaceparms into the BSP in a so-called shader lump. This tool removes the glass property from the given shaders; as a result, black windows behave as stone and cannot be shot through.
Extract your BSP from the PK3, patch it using the program and then put the patched BSP back into your game, preferably as a custom PK3. It's fully server-side. The only drawback is that black windows will give stone ricochets instead of glass shards when shot.
Run the program without any arguments for instructions, feel free to ask here if something isn't clear.
Here's an exemplary run of the program (well, 2 runs to be exact) that removes the most notorious black windows (i.e. on mohdm2):
Code: Select all
inequation@spearhead:~/projects/blackwinfix/build/debug$ ./blackwinfix mohdm2.bsp
MoHAA BSP black window fix v0.1 [Jun 13 2009]
Written by Leszek "IneQuation" Godlewski
112: textures/mohcommon/panedwindow1
content flags: solid
surface flags: nomarks nodraw rock glass unknown2
113: textures/mohcommon/panedwindow1
content flags: solid
surface flags: glass unknown2
121: textures/mohtest/fltwall1grim2
content flags: solid
surface flags: nomarks nodraw rock glass
122: textures/mohtest/window3a
content flags: solid
surface flags: glass
169: textures/common/caulk
content flags: solid
surface flags: nomarks nodraw rock glass unknown2
211: textures/common/caulk
content flags: solid detail
surface flags: nomarks nodraw rock glass
212: textures/mohtest/window3a
content flags: solid detail
surface flags: glass
216: textures/common/caulk
content flags: solid
surface flags: nomarks nodraw rock glass
236: textures/mohtest/window3a
content flags: solid
surface flags: rock glass
238: textures/mohtest/window3a
content flags: solid
surface flags: nomarks nodraw rock glass
243: textures/mohtest/wood_joist_trim_masked
content flags: solid
surface flags: wood glass unknown2
inequation@spearhead:~/projects/blackwinfix/build/debug$ ./blackwinfix mohdm2.bsp 112 113 121 122 212 236 238 243
MoHAA BSP black window fix v0.1 [Jun 13 2009]
Written by Leszek "IneQuation" Godlewski
Patching shader 112 (textures/mohcommon/panedwindow1)...
Patching shader 113 (textures/mohcommon/panedwindow1)...
Patching shader 121 (textures/mohtest/fltwall1grim2)...
Patching shader 122 (textures/mohtest/window3a)...
Patching shader 212 (textures/mohtest/window3a)...
Patching shader 236 (textures/mohtest/window3a)...
Patching shader 238 (textures/mohtest/window3a)...
Patching shader 243 (textures/mohtest/wood_joist_trim_masked)...
inequation@spearhead:~/projects/blackwinfix/build/debug$