diff --git a/config/font_default.cfg b/config/font_default.cfg index 2b05c4df..d434371f 100644 --- a/config/font_default.cfg +++ b/config/font_default.cfg @@ -5,13 +5,13 @@ font default "packages/misc/chars_default.png" 32 64 0 2 0 -2 fontchar 1 0 23 64 // ! fontchar 28 0 38 64 // " fontchar 68 0 47 64 // # -fontchar 118 0 39 64 // $ -fontchar 157 0 59 64 // % -fontchar 216 0 50 64 // & +fontchar 118 -2 39 66 // $ +fontchar 157 -1 59 65 // % +fontchar 216 -1 50 65 // & fontchar 266 0 24 64 // ' -fontchar 293 0 28 64 // ( -fontchar 323 0 28 64 // ) -fontchar 352 0 36 64 // * +fontchar 293 -2 28 66 // ( +fontchar 323 -2 28 66 // ) +fontchar 352 -1 36 65 // * fontchar 388 0 43 64 // + fontchar 436 0 23 64 // , fontchar 457 0 33 64 // - @@ -60,29 +60,29 @@ fontchar 326 256 64 64 // W fontchar 392 256 48 64 // X fontchar 440 256 49 64 // Y fontchar 2 320 43 64 // Z -fontchar 46 320 29 64 // [ +fontchar 46 318 29 66 // [ fontchar 77 320 32 64 // \ -fontchar 109 320 29 64 // ] +fontchar 109 318 29 66 // ] fontchar 141 320 46 64 // ^ -fontchar 189 320 37 64 // _ -fontchar 226 320 28 64 // ` +fontchar 189 322 37 64 // _ +fontchar 226 318 28 66 // ` fontchar 259 320 40 64 // a -fontchar 302 320 41 64 // b +fontchar 302 319 41 65 // b fontchar 344 320 36 64 // c -fontchar 382 320 41 64 // d +fontchar 382 319 41 65 // d fontchar 426 320 41 64 // e -fontchar 468 320 33 64 // f -fontchar 2 384 41 64 // g -fontchar 45 384 40 64 // h -fontchar 87 384 23 64 // i -fontchar 110 384 27 64 // j -fontchar 141 384 42 64 // k -fontchar 183 384 23 64 // l +fontchar 468 319 33 65 // f +fontchar 2 384 41 65 // g +fontchar 45 383 40 65 // h +fontchar 87 383 23 65 // i +fontchar 110 383 27 66 // j +fontchar 141 383 42 65 // k +fontchar 183 383 23 65 // l fontchar 210 384 56 64 // m fontchar 270 384 40 64 // n fontchar 311 384 42 64 // o -fontchar 356 384 41 64 // p -fontchar 398 384 41 64 // q +fontchar 356 384 41 65 // p +fontchar 398 384 41 65 // q fontchar 439 384 32 64 // r fontchar 471 384 37 64 // s fontchar 2 448 35 64 // t @@ -90,9 +90,9 @@ fontchar 42 448 39 64 // u fontchar 85 448 44 64 // v fontchar 130 448 55 64 // w fontchar 187 448 42 64 // x -fontchar 230 448 44 64 // y +fontchar 230 448 44 65 // y fontchar 276 448 37 64 // z fontchar 320 448 35 64 // { -fontchar 366 448 20 64 // | +fontchar 366 448 20 66 // | fontchar 397 448 35 64 // } fontchar 443 448 43 64 // ~ diff --git a/config/font_serif.cfg b/config/font_serif.cfg index 3b10cf2e..108b21bd 100644 --- a/config/font_serif.cfg +++ b/config/font_serif.cfg @@ -1,98 +1,99 @@ // Serif font. // DO NOT MODIFY. +// font generated by ttf2font using following custom parameters: -g2 -s64 -c9 -nserif CharisSIL-B.ttf -font serif "packages/misc/chars_serif.png" 32 64 0 2 0 -2 -fontchar 0 0 25 64 // ! -fontchar 25 0 29 64 // " -fontchar 54 0 53 64 // # -fontchar 107 0 41 64 // $ -fontchar 148 0 69 64 // % -fontchar 217 0 46 64 // & -fontchar 263 0 17 64 // ' -fontchar 280 0 29 64 // ( -fontchar 309 0 29 64 // ) -fontchar 338 0 41 64 // * -fontchar 379 0 53 64 // + -fontchar 432 0 23 64 // , -fontchar 455 0 29 64 // - -fontchar 0 64 21 64 // . -fontchar 23 64 29 64 // / -fontchar 52 64 41 64 // 0 -fontchar 93 64 40 64 // 1 -fontchar 133 64 41 64 // 2 -fontchar 174 64 41 64 // 3 -fontchar 215 64 41 64 // 4 -fontchar 256 64 40 64 // 5 -fontchar 296 64 41 64 // 6 -fontchar 337 64 41 64 // 7 -fontchar 378 64 41 64 // 8 -fontchar 419 64 40 64 // 9 -fontchar 459 64 29 64 // : -fontchar 0 128 29 64 // ; -fontchar 29 128 52 64 // < -fontchar 81 128 53 64 // = -fontchar 134 128 52 64 // > -fontchar 186 128 35 64 // ? -fontchar 221 128 64 64 // @ -fontchar 285 128 44 64 // A -fontchar 329 128 44 64 // B -fontchar 373 128 45 64 // C -fontchar 418 128 49 64 // D -fontchar 0 192 40 64 // E -fontchar 40 192 37 64 // F -fontchar 77 192 50 64 // G -fontchar 127 192 48 64 // H -fontchar 175 192 27 64 // I -fontchar 202 192 29 64 // J -fontchar 231 192 44 64 // K -fontchar 275 192 36 64 // L -fontchar 311 192 54 64 // M -fontchar 365 192 48 64 // N -fontchar 413 192 50 64 // O -fontchar 1 256 37 64 // P -fontchar 38 256 51 64 // Q -fontchar 89 256 44 64 // R -fontchar 133 256 43 64 // S -fontchar 177 256 39 64 // T -fontchar 217 256 46 64 // U -fontchar 263 256 44 64 // V -fontchar 307 256 63 64 // W -fontchar 370 256 44 64 // X -fontchar 415 256 39 64 // Y -fontchar 454 256 44 64 // Z -fontchar 0 320 29 64 // [ -fontchar 29 320 29 64 // \ -fontchar 59 320 28 64 // ] -fontchar 87 320 52 64 // ^ -fontchar 139 320 41 64 // _ -fontchar 180 320 41 64 // ` -fontchar 221 320 38 64 // a -fontchar 259 320 40 64 // b -fontchar 299 320 33 64 // c -fontchar 332 320 40 64 // d -fontchar 372 320 39 64 // e -fontchar 411 320 22 64 // f -fontchar 435 320 38 64 // g -fontchar 0 384 40 64 // h -fontchar 40 384 16 64 // i -fontchar 58 384 22 64 // j -fontchar 80 384 38 64 // k -fontchar 118 384 17 64 // l -fontchar 135 384 62 64 // m -fontchar 197 384 41 64 // n -fontchar 238 384 39 64 // o -fontchar 277 384 40 64 // p -fontchar 317 384 39 64 // q -fontchar 357 384 27 64 // r -fontchar 385 384 32 64 // s -fontchar 417 384 25 64 // t -fontchar 443 384 40 64 // u -fontchar 0 448 38 64 // v -fontchar 38 448 52 64 // w -fontchar 90 448 38 64 // x -fontchar 128 448 38 64 // y -fontchar 166 448 34 64 // z -fontchar 200 448 41 64 // { -fontchar 241 448 29 64 // | -fontchar 270 448 40 64 // } -fontchar 310 448 53 64 // ~ +font serif "packages/misc/chars_serif.png" 32 64 0 31 0 31 +fontchar 1 1 26 // ! +fontchar 28 0 29 65 // " +fontchar 58 1 51 // # +fontchar 110 -2 42 67 // $ +fontchar 153 1 61 // % +fontchar 215 1 51 // & +fontchar 267 0 15 65 // ' +fontchar 283 0 29 65 // ( +fontchar 313 0 29 65 // ) +fontchar 343 1 35 // * +fontchar 379 1 68 // + +fontchar 448 1 24 // , +fontchar 473 1 25 // - +fontchar 499 1 24 // . +fontchar 524 0 37 65 // / +fontchar 562 1 41 // 0 +fontchar 604 1 42 // 1 +fontchar 647 1 42 // 2 +fontchar 0 112 42 // 3 +fontchar 43 112 42 // 4 +fontchar 86 112 42 // 5 +fontchar 129 112 41 // 6 +fontchar 171 112 43 // 7 +fontchar 215 112 41 // 8 +fontchar 257 112 41 // 9 +fontchar 299 112 24 // : +fontchar 324 112 25 // ; +fontchar 350 112 68 // < +fontchar 419 112 68 // = +fontchar 488 112 68 // > +fontchar 557 112 37 // ? +fontchar 595 112 64 // @ +fontchar 0 223 48 // A +fontchar 49 223 45 // B +fontchar 95 223 44 // C +fontchar 140 223 50 // D +fontchar 191 223 43 // E +fontchar 235 223 40 // F +fontchar 276 223 50 // G +fontchar 327 223 53 // H +fontchar 381 223 27 // I +fontchar 409 223 37 // J +fontchar 447 223 49 // K +fontchar 497 223 39 // L +fontchar 537 223 62 // M +fontchar 600 223 52 // N +fontchar 0 334 52 // O +fontchar 53 334 42 // P +fontchar 96 334 52 // Q +fontchar 149 334 49 // R +fontchar 199 334 38 // S +fontchar 238 334 43 // T +fontchar 282 334 50 // U +fontchar 333 333 49 65 // V +fontchar 383 333 66 65 // W +fontchar 450 333 47 65 // X +fontchar 498 334 46 // Y +fontchar 545 334 41 // Z +fontchar 587 334 39 // [ +fontchar 627 334 36 // \ +fontchar 0 445 42 // ] +fontchar 43 443 26 66 // ^ +fontchar 70 445 26 // _ +fontchar 97 443 28 66 // ` +fontchar 126 445 39 // a +fontchar 166 443 42 66 // b +fontchar 209 445 37 // c +fontchar 247 443 44 66 // d +fontchar 292 445 38 // e +fontchar 331 443 32 66 // f +fontchar 364 445 40 67 // g +fontchar 405 443 45 66 // h +fontchar 451 443 25 66 // i +fontchar 477 443 31 68 // j +fontchar 509 443 42 66 // k +fontchar 552 443 25 66 // l +fontchar 578 445 63 // m +fontchar 642 445 45 // n +fontchar 0 556 41 // o +fontchar 42 556 42 // p +fontchar 85 556 43 // q +fontchar 129 556 32 // r +fontchar 162 556 33 // s +fontchar 196 556 29 // t +fontchar 226 556 44 // u +fontchar 271 556 40 // v +fontchar 312 556 58 // w +fontchar 371 556 39 // x +fontchar 411 556 41 66 // y +fontchar 453 556 35 // z +fontchar 489 556 36 // { +fontchar 526 550 29 73 // | +fontchar 556 556 36 // } +fontchar 593 556 57 // ~ diff --git a/config/menus_edit.cfg b/config/menus_edit.cfg index 11b25901..ad5ecbfb 100644 --- a/config/menus_edit.cfg +++ b/config/menus_edit.cfg @@ -147,6 +147,7 @@ tempalias __rebuildmapmodelmenus [ delmenu [Edit mapmodel slots] if $editing_sp [ newmenu [Delete unused mapmodel slot] + menurenderoffset -40 0 loop i 256 [ mpath = (mapmodelslotname $i) if (strlen $mpath) [ @@ -1447,9 +1448,9 @@ menuitemeditkeyinput [Texture on floor previous: ] editkey_floortex_dn menuitemeditkeyinput [Texture on wall forward: ] editkey_walltex_up menuitemeditkeyinput [Texture on wall previous: ] editkey_walltex_dn menuitemeditkeyinput [Texture on ceiling forward: ] editkey_ceiltex_up -menuitemeditkeyinput [Texture on floor previous: ] editkey_ceiltex_dn -menuitemeditkeyinput [Texture on upper wall forward: ] editkey_uppertex_dn -menuitemeditkeyinput [Texture on upper wall previous: ] editkey_uppertex_up +menuitemeditkeyinput [Texture on ceiling previous: ] editkey_ceiltex_dn +menuitemeditkeyinput [Texture on upper wall forward: ] editkey_uppertex_up +menuitemeditkeyinput [Texture on upper wall previous: ] editkey_uppertex_dn menuitem "" -1 menuitem "\f2Misc editing keys:" -1 menuitemkeyinput [Enter edit mode: ] edittoggle diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index ce4884d4..ae57bf72 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -48,14 +48,14 @@ alias editkey_scroll_vdelta [ domodifier 1 ] alias editkey_scroll_floorceiltex [ domodifier 2 ] alias editkey_scroll_walluppertex [ domodifier 3 ] alias editkey_fullbright [ if $fullbright [ fullbright 0 ] [ fullbright 1 ] ] -alias editkey_floortex_up [ edittex 0 1 ] -alias editkey_floortex_dn [ edittex 0 -1 ] -alias editkey_walltex_up [ edittex 1 1 ] -alias editkey_walltex_dn [ edittex 1 -1 ] -alias editkey_ceiltex_up [ edittex 2 1 ] -alias editkey_ceiltex_dn [ edittex 2 -1 ] -alias editkey_uppertex_up [ edittex 3 1 ] -alias editkey_uppertex_dn [ edittex 3 -1 ] +alias editkey_floortex_up [ if $editmeta2down [ edittex 0 3 ] [ edittex 0 1 ] ] +alias editkey_floortex_dn [ if $editmeta2down [ edittex 0 -3 ] [ edittex 0 -1 ] ] +alias editkey_walltex_up [ if $editmeta2down [ edittex 1 3 ] [ edittex 1 1 ] ] +alias editkey_walltex_dn [ if $editmeta2down [ edittex 1 -3 ] [ edittex 1 -1 ] ] +alias editkey_ceiltex_up [ if $editmeta2down [ edittex 2 3 ] [ edittex 2 1 ] ] +alias editkey_ceiltex_dn [ if $editmeta2down [ edittex 2 -3 ] [ edittex 2 -1 ] ] +alias editkey_uppertex_up [ if $editmeta2down [ edittex 3 3 ] [ edittex 3 1 ] ] +alias editkey_uppertex_dn [ if $editmeta2down [ edittex 3 -3 ] [ edittex 3 -1 ] ] alias editkey_tagclip_none [ edittagclip none ] alias editkey_tagclip_plclip [ edittagclip plclip ] alias editkey_tagclip_clip [ edittagclip clip ] diff --git a/config/scripts.cfg b/config/scripts.cfg index 77dc2246..e81e97c2 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -499,6 +499,9 @@ const customclaimadminscript [ ] [ echo "\f3Error: \f5you're not connected to" $_CAS_servername servers ] ] +const claimadmin [ setadmin 1 $arg1 ] +const dropadmin [ setadmin 0 ] + // manage per-map gamma values // setgamma sets a persistent gamma value for a map diff --git a/packages/misc/chars_serif.png b/packages/misc/chars_serif.png old mode 100755 new mode 100644 index 1d0a3860..8e9f030e Binary files a/packages/misc/chars_serif.png and b/packages/misc/chars_serif.png differ diff --git a/packages/misc/huddigits.png b/packages/misc/huddigits.png index 39a11cb2..f1dc795d 100644 Binary files a/packages/misc/huddigits.png and b/packages/misc/huddigits.png differ diff --git a/packages/misc/license.txt b/packages/misc/license.txt index cd4857e1..4e6d388c 100644 --- a/packages/misc/license.txt +++ b/packages/misc/license.txt @@ -52,6 +52,104 @@ Which is available under the following MIT-style license: WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +================================================================================ +"chars_serif.png" was rendered basing off the Charis SIL Bold v5.000 font, +which is available under the following license: + +This Font Software is Copyright (c) 1997-2014, SIL International (http://scripts.sil.org/) +with Reserved Font Names "Charis" and "SIL". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + ================================================================================ "explosion.png" is by: Stephanos "RaZgRiZ" Vlastos diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 278d2477..f339adff 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -1159,6 +1159,7 @@ void startmap(const char *name, bool reset, bool norespawn) // called just aft sendmapidenttoserver = true; if(m_botmode) BotManager.BeginMap(name); else kickallbots(); + showmipstats = false; clearbounceents(); preparectf(!m_flags_); suicided = -1; diff --git a/source/src/editing.cpp b/source/src/editing.cpp index 35006ce6..46fce26c 100644 --- a/source/src/editing.cpp +++ b/source/src/editing.cpp @@ -784,6 +784,8 @@ void renderhudtexturepreview(int slot, int pos, bool highlight) color c(0, 0, 0.6f, 1); blendbox(x, y, x + bs, y + bs, false, -1, &c); } + defformatstring(texslotnumber)("#%d", slot); + draw_text(texslotnumber, x + bs / 2 - text_width(texslotnumber) / 2, y + bs + border + FONTH / 8); if(highlight) { glDisable(GL_BLEND); diff --git a/source/src/protos.h b/source/src/protos.h index 57214884..c6f42fdd 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -481,6 +481,7 @@ extern void drawcrosshair(playerent *p, int n, struct color *c = NULL, float siz // autodownload enum { PCK_TEXTURE = 0, PCK_SKYBOX, PCK_MAPMODEL, PCK_AUDIO, PCK_MAP, PCK_MOD, PCK_NUM }; extern int autodownload; +extern bool canceldownloads; extern void setupautodownload(); extern void pollautodownloadresponse(); extern bool requirepackage(int type, const char *name, const char *host = NULL); @@ -491,6 +492,7 @@ extern void writepcksourcecfg(); struct zone { int x1, x2, y1, y2, color; }; // zones (drawn on the minimap) // rendercubes +extern bool showmipstats; extern void mipstats(const int a[]); extern const char *cubetypenames[]; extern bool editfocusdetails(sqr *s); diff --git a/source/src/rendercubes.cpp b/source/src/rendercubes.cpp index 70804809..7f3792ec 100644 --- a/source/src/rendercubes.cpp +++ b/source/src/rendercubes.cpp @@ -133,19 +133,19 @@ int ol1r, ol1g, ol1b, ol2r, ol2g, ol2b; float ofloor, oceil; bool ohf; int firstindex; -bool showm = false, showef = false; +bool showmipstats = false, showeditfocus = false; -COMMANDF(showmip, "",() { showm = !showm; }); -COMMANDF(showfocuscubedetails, "",() { showef = !showef; }); +COMMANDF(showmip, "",() { showmipstats = !showmipstats; }); +COMMANDF(showfocuscubedetails, "",() { showeditfocus = !showeditfocus; }); const char *cubetypenames[] = {"SOLID", "CORNER", "FHF", "CHF", "SPACE", ""}; const char *cubetypename(int t) { return t >= 0 && t < SEMISOLID ? cubetypenames[t] : "unknown"; } -void mipstats(const int a[]) { if(showm && !showef) hudeditf(HUDMSG_MIPSTATS, "1x1/2x2/4x4/8x8: %d / %d / %d / %d", a[0], a[1], a[2], a[3]); } +void mipstats(const int a[]) { if(showmipstats && !showeditfocus) hudeditf(HUDMSG_MIPSTATS, "1x1/2x2/4x4/8x8: %d / %d / %d / %d", a[0], a[1], a[2], a[3]); } bool editfocusdetails(sqr *s) { - if(showef) + if(showeditfocus) { const char *g = SOLID(s) ? "\f4" : ""; hudeditf(HUDMSG_EDITFOCUS, "%s: \fs%s%d..%d\fr W:%d \fs%sU:%d F:%d C:%d v:%d t:0x%X (%02X%02X%02X)\fr", cubetypename(s->type), g, s->floor, s->ceil, s->wtex, g, s->utex, s->ftex, s->ctex, s->vdelta, s->tag, s->r, s->g, s->b); @@ -176,7 +176,7 @@ VARP(lighterror, 1, 4, 100); void render_flat(int wtex, int x, int y, int size, int h, sqr *l1, sqr *l4, sqr *l3, sqr *l2, bool isceil) // floor/ceil quads { - if(showm) { l3 = l1 = &sbright; l4 = l2 = &sdark; } + if(showmipstats) { l3 = l1 = &sbright; l4 = l2 = &sdark; } Texture *t = lookupworldtexture(wtex); float xf = TEXTURESCALE/t->xs; @@ -253,7 +253,7 @@ void render_flat(int wtex, int x, int y, int size, int h, sqr *l1, sqr *l4, sqr void render_flatdelta(int wtex, int x, int y, int size, float h1, float h4, float h3, float h2, sqr *l1, sqr *l4, sqr *l3, sqr *l2, bool isceil) // floor/ceil quads on a slope { - if(showm) { l3 = l1 = &sbright; l4 = l2 = &sdark; } + if(showmipstats) { l3 = l1 = &sbright; l4 = l2 = &sdark; } Texture *t = lookupworldtexture(wtex); float xf = TEXTURESCALE/t->xs; @@ -339,7 +339,7 @@ void render_tris(int x, int y, int size, bool topleft, void render_square(int wtex, float floor1, float floor2, float ceil1, float ceil2, int x1, int y1, int x2, int y2, int size, sqr *l1, sqr *l2, bool flip, int dir) // wall quads { - if(showm) { l1 = &sbright; l2 = &sdark; } + if(showmipstats) { l1 = &sbright; l2 = &sdark; } Texture *t = lookupworldtexture(wtex); float xf = TEXTURESCALE/t->xs; diff --git a/source/src/server.cpp b/source/src/server.cpp index ab1d6882..50e92948 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -2554,6 +2554,7 @@ bool scallvote(voteinfo *v, ENetPacket *msg) // true if a regular vote was calle /** same team, with low tk, not lagging, and not spamming... so, why to kick? */ else if ( isteam(c->team, b->team) && b->state.teamkills < c->state.teamkills ) error = VOTEE_WEAK; } + else if( c->role == CR_DEFAULT && servmillis - c->connectmillis < 60000 && numclients() > 1 ) error = VOTEE_PERMISSION; // after connection 60s delay before possibility of vote start if(error>=0) { @@ -3378,7 +3379,7 @@ void process(ENetPacket *packet, int sender, int chan) { int gzs = getint(p); int rev = getint(p); - if(!isdedicated || (sg->curmap && sg->curmap->cgzlen == gzs && sg->curmap->maprevision == rev)) + if(!isdedicated || (sg->curmap && sg->curmap->cgzlen == gzs && sg->curmap->maprevision == rev) || m_coop) { // here any game really starts for a client: spawn, if it's a new game - don't spawn if the game was already running cl->isonrightmap = true; int sp = canspawn(cl); diff --git a/source/src/world.cpp b/source/src/world.cpp index b2a2f7fa..36ee9051 100644 --- a/source/src/world.cpp +++ b/source/src/world.cpp @@ -188,17 +188,18 @@ int closestent() // used for delent and edit mode ent display bdist = dist; } } - } - if(best >= 0) - { // if closest ent shares location with other ents, pick one with clentsel - vector bs; - loopv(ents) - { - entity &e = ents[i]; - if(!(enttypemask & (1 << e.type))) continue; - if(ents[best].x == e.x && ents[best].y == e.y && ents[best].z == e.z) bs.add(i); + + if(best >= 0) + { // if closest ent shares location with other ents, pick one with clentsel + vector bs; + loopv(ents) + { + entity &e = ents[i]; + if(!(enttypemask & (1 << e.type))) continue; + if(ents[best].x == e.x && ents[best].y == e.y && ents[best].z == e.z) bs.add(i); + } + best = bs[(clentsel %= bs.length())]; } - best = bs[(clentsel %= bs.length())]; } return best; }