File tree 1 file changed +21
-3
lines changed
1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,18 @@ static int cl_lastofs;
47
47
48
48
void CL_ClearLightStyles (void )
49
49
{
50
- memset (cl_lightstyles , 0 , sizeof (cl_lightstyles ));
50
+ int i ;
51
+ clightstyle_t * ls ;
52
+
53
+ for (i = 0 , ls = cl_lightstyles ; i < MAX_LIGHTSTYLES ; i ++ , ls ++ ) {
54
+ List_Init (& ls -> entry );
55
+ ls -> length = 0 ;
56
+ ls -> value [0 ] =
57
+ ls -> value [1 ] =
58
+ ls -> value [2 ] =
59
+ ls -> value [3 ] = 1 ;
60
+ }
61
+
51
62
List_Init (& cl_lightlist );
52
63
cl_lastofs = -1 ;
53
64
}
@@ -99,11 +110,18 @@ void CL_SetLightStyle(int index, const char *s)
99
110
return ;
100
111
}
101
112
113
+ if (ls -> length == 1 ) {
114
+ ls -> value [0 ] =
115
+ ls -> value [1 ] =
116
+ ls -> value [2 ] =
117
+ ls -> value [3 ] = ls -> map [0 ];
118
+ return ;
119
+ }
120
+
102
121
ls -> value [0 ] =
103
122
ls -> value [1 ] =
104
123
ls -> value [2 ] =
105
- ls -> value [3 ] =
106
- ls -> map [0 ] = 1 ;
124
+ ls -> value [3 ] = 1 ;
107
125
}
108
126
109
127
/*
You can’t perform that action at this time.
0 commit comments