… | |
… | |
154 | }; |
154 | }; |
155 | } |
155 | } |
156 | |
156 | |
157 | cf::client->attach (on_addme => sub { |
157 | cf::client->attach (on_addme => sub { |
158 | my ($ns) = @_; |
158 | my ($ns) = @_; |
159 | |
|
|
160 | if (!$ns->facecache) |
|
|
161 | { |
|
|
162 | $ns->send_drawinfo (<<EOF, cf::NDI_RED); |
|
|
163 | |
|
|
164 | |
|
|
165 | *** |
|
|
166 | *** WARNING: |
|
|
167 | *** Your client does not support face/image caching, |
|
|
168 | *** or it has been disabled. Face caching is mandatory |
|
|
169 | *** so please enable it or use a newer client. |
|
|
170 | *** |
|
|
171 | *** Look at your client preferences: |
|
|
172 | *** |
|
|
173 | *** deliantra: all known versions automatically enable the facecache. |
|
|
174 | *** cfclient: use the -cache commandline option. |
|
|
175 | *** cfclient: map will not redraw automatically (bug). |
|
|
176 | *** gcfclient: use -cache commandline option, or enable |
|
|
177 | *** gcfclient: Client => Configure => Map & Image => Cache Images. |
|
|
178 | *** jcrossclient: your client is broken, use deliantra or gcfclient. |
|
|
179 | *** |
|
|
180 | *** |
|
|
181 | EOF |
|
|
182 | if ($ns->version =~ /jcrossclient/) { |
|
|
183 | # let them, for now |
|
|
184 | } else { |
|
|
185 | $ns->flush; |
|
|
186 | return $ns->destroy; |
|
|
187 | } |
|
|
188 | |
|
|
189 | # $ns->facecache = true; |
|
|
190 | } |
|
|
191 | |
|
|
192 | if ($ns->mapmode < cf::Map1aCmd) { |
|
|
193 | $ns->send_drawinfo (<<EOF, cf::NDI_RED); |
|
|
194 | |
|
|
195 | |
|
|
196 | *** |
|
|
197 | *** WARNING: |
|
|
198 | *** Your client is too old. Please upgrade to a newer version. |
|
|
199 | EOF |
|
|
200 | |
|
|
201 | $ns->flush; |
|
|
202 | return $ns->destroy; |
|
|
203 | } |
|
|
204 | |
159 | |
205 | $ns->pl and return $ns->destroy; |
160 | $ns->pl and return $ns->destroy; |
206 | |
161 | |
207 | $ns->async (sub { |
162 | $ns->async (sub { |
208 | $Coro::current->{desc} = "addme init"; |
163 | $Coro::current->{desc} = "addme init"; |