merged the changes of remod r403

http://code.google.com/p/remod-sauerbraten/source/detail?r=403