I've been having problems with my windsock crashing FS. I manually editted the .asm file to rotate the windsock with the wind, and also to only display the windsock at certain windspeeds. The idea was to display different windsocks at different speed ranges (0-4, 5-8, 9-13, etc). So, in addition to rotating with the wind, there will be a different windsock at 5 knots as opposed to 15 knots. I made a total of 6 different windsocks for this purpose, and placed them all in the same location, since only one should be visible at a time.
The problem is that everything seems fine when I start at the project airport, but when I fly there from a different airport, FS locks up. I've narrowed teh problem down to my windsocks, and I think taht it has to do with the fact that I manually editted the .asm files, since I am new at BGLC stuff. My question is where in the .asm file would you place a conditional display check?
Here's a snippet of my code:
Of course, this is just the "middle part" between the VERTEX_DEF and DRAW_TRI words. At the very end of the asm file is the speedfail label.
The rotate-to-wind part was taken from another post in the tutorials section, but I am not sure about the IFIN1 section. Should this go before the "VERTEX_DEF" words? Maybe this should go before the texture, material or vertex lists?
Thanks (in advance) for all your wisdom!
- Martin
The problem is that everything seems fine when I start at the project airport, but when I fly there from a different airport, FS locks up. I've narrowed teh problem down to my windsocks, and I think taht it has to do with the fact that I manually editted the .asm files, since I am new at BGLC stuff. My question is where in the .asm file would you place a conditional display check?
Here's a snippet of my code:
VERTEX_DEF 0.520000, 5.136000, -0.628000, 0.999769,-0.019149,-0.009733, 0.750000,0.200300 ; 460 part= 1 prim=6
VERTEX_DEF 0.520000, 5.728000, -0.384000, -0.996213,-0.006735, 0.086691, 0.750000,0.000500 ; 461 part= 1 prim=6
VERTEX_DEF 0.520000, 5.728000, -0.384000, 0.996213, 0.006735,-0.086691, 0.750000,0.000500 ; 462 part= 1 prim=6
VERTEX_LIST_END
BGL_RETURN
vertex_riff_end_windsock0004 label word
bgl_riff_start_windsock0004 label BGLCODE
db 'B','G','L',' '
dd bgl_riff_end_windsock0004 - $ - 4
LOD_0_windsock0004 label BGLCODE
IFIN1 speedfail, 0C72h, 0, 4 ; display only if wind is between 0 and 4 knots, else goto Label Speedfail
; NonAlpha
windsock_NonAlpha label BGLCODE
POINT_VICALL windsock0004_MasterScale_1, 0, 0, 0, 0, 0, 0, 0, 0, global_winds_surface_direction ; Node 1 - MasterScale
BGL_END
BGL_RETURN
windsock0004_MasterScale_1 label BGLCODE
MATERIAL 0,0 ; <255,255,255,255> TR_09.BMP;TR_09_LM.BMP;;
DRAW_TRI_BEGIN 0, 50
DRAW_TRI 40, 34, 30 ; poly=35 part=1
DRAW_TRI 37, 45, 48 ; poly=67 part=1
DRAW_TRI 37, 39, 45 ; poly=66 part=1
Of course, this is just the "middle part" between the VERTEX_DEF and DRAW_TRI words. At the very end of the asm file is the speedfail label.
The rotate-to-wind part was taken from another post in the tutorials section, but I am not sure about the IFIN1 section. Should this go before the "VERTEX_DEF" words? Maybe this should go before the texture, material or vertex lists?
Thanks (in advance) for all your wisdom!
- Martin


