From 4d2d3261368b939d1537edb781324ae83e00471a Mon Sep 17 00:00:00 2001 From: aurhat Date: Sat, 18 Feb 2017 18:49:55 +0100 Subject: [PATCH] Cleanup --- config/menus_edit.cfg | 1 + config/resetbinds.cfg | 1 - config/scripts.cfg | 2 +- install_or_remove_menuitem.sh | 2 +- packages/models/weapons/carbine/world/md2.cfg | 2 +- packages/models/weapons/sniper/md3.cfg | 2 +- packages/models/weapons/sniper/world/md2.cfg | 2 +- source/src/audiomanager.cpp | 4 ++-- source/src/client.cpp | 8 ++++---- source/src/clientgame.cpp | 1 - source/src/entities.cpp | 11 ++++++++--- source/src/protocol.cpp | 2 +- 12 files changed, 21 insertions(+), 17 deletions(-) diff --git a/config/menus_edit.cfg b/config/menus_edit.cfg index 9b2e23f4..46c47744 100644 --- a/config/menus_edit.cfg +++ b/config/menus_edit.cfg @@ -2,6 +2,7 @@ persistidents 0 newmenu editing +menuinit [ if (! $editing) [menuheader "" "\f3You are not in edit mode"] [menuheader] ] menuitem "Mapmodels..." [ showmenu Mapmodels ] menuitem "Lighting..." [ showmenu Lighting ] menuitem "Entities..." [ showmenu Entities ] diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index 67692e93..ebaf01f2 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -254,7 +254,6 @@ bind RSHIFT [] bind LSHIFT crouch editbind LSHIFT editkey_editmeta2 bind RCTRL jump -editbind RCTRL [] bind LCTRL [] editbind LCTRL editmeta bind RALT [] diff --git a/config/scripts.cfg b/config/scripts.cfg index 84905fdd..d6776134 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -100,7 +100,7 @@ listcomplete loadsky (pop skies) // Game mode descriptions... gamemodedesc 0 [Team Deathmatch: Shred the enemy team to pieces!] -gamemodedesc 1 [Co-operative edit: Edit maps with others online!] +gamemodedesc 1 [Co-operative Editing: Edit maps with others online!] gamemodedesc 2 [Deathmatch: Destroy anything that moves! Everyone for themselves!] gamemodedesc 3 [Survivor: Conserve your precious life, destroy the enemy's. Once all your enemies are dead, the round restarts.] gamemodedesc 4 [Team Survivor: Conserve your precious life, destroy the enemy team. Once all your enemies are dead, the round restarts.] diff --git a/install_or_remove_menuitem.sh b/install_or_remove_menuitem.sh index 339acf19..5ad81be4 100755 --- a/install_or_remove_menuitem.sh +++ b/install_or_remove_menuitem.sh @@ -35,7 +35,7 @@ Categories=Game;ActionGame;Shooter; Terminal=false StartupNotify=false Exec=$CUBE_DIR/$CUBE_EXEC -Icon=$CUBE_DIR/docs/images/icon.png +Icon=$CUBE_DIR/packages/misc/icon.png Comment=A multiplayer, first-person shooter game, based on the CUBE engine. Fast, arcade gameplay. EOF diff --git a/packages/models/weapons/carbine/world/md2.cfg b/packages/models/weapons/carbine/world/md2.cfg index 317dbd03..46cfd068 100644 --- a/packages/models/weapons/carbine/world/md2.cfg +++ b/packages/models/weapons/carbine/world/md2.cfg @@ -3,5 +3,5 @@ mdltrans 2 2 24 mdlshadowdist 32 md2tag tag_muzzle X -md2emit tag_muzzle 11 50 +md2emit tag_muzzle 11 50 50 diff --git a/packages/models/weapons/sniper/md3.cfg b/packages/models/weapons/sniper/md3.cfg index 0ab490c8..1cf72c3e 100644 --- a/packages/models/weapons/sniper/md3.cfg +++ b/packages/models/weapons/sniper/md3.cfg @@ -4,4 +4,4 @@ md3skin hands ../knife/skin_hands.jpg md3anim "gun idle" 0 1 md3anim "gun shoot" 8 50 md3anim "gun reload" 0 1 -md3emit tag_muzzle 10 50 +md3emit tag_muzzle 10 50 100 diff --git a/packages/models/weapons/sniper/world/md2.cfg b/packages/models/weapons/sniper/world/md2.cfg index 317dbd03..20ff4f36 100644 --- a/packages/models/weapons/sniper/world/md2.cfg +++ b/packages/models/weapons/sniper/world/md2.cfg @@ -3,5 +3,5 @@ mdltrans 2 2 24 mdlshadowdist 32 md2tag tag_muzzle X -md2emit tag_muzzle 11 50 +md2emit tag_muzzle 11 50 100 diff --git a/source/src/audiomanager.cpp b/source/src/audiomanager.cpp index f34d645a..9f95e70f 100644 --- a/source/src/audiomanager.cpp +++ b/source/src/audiomanager.cpp @@ -130,9 +130,9 @@ void audiomanager::musicpreload(int id) conoutf("preloading music #%d : %s", id, name); if(gamemusic->open(name)) { - defformatstring(whendone)("musicvol %d", musicvol); + /*defformatstring(whendone)("musicvol %d", musicvol); musicdonecmd = newstring(whendone); - //conoutf("when done: %s", musicdonecmd); + conoutf("when done: %s", musicdonecmd);*/ const int preloadfadetime = 3; gamemusic->fadein(lastmillis, preloadfadetime); gamemusic->fadeout(lastmillis+2*preloadfadetime, preloadfadetime); diff --git a/source/src/client.cpp b/source/src/client.cpp index ff1082a0..8acb7bc8 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -312,7 +312,7 @@ void pm(char *text) trimtrailingwhitespace(text); addmsg(SV_TEXTPRIVATE, "ris", cn, text); - conoutf("to %s:\f9 %s", colorname(to), highlight(text)); + conoutf("to %s (PM):\f9 %s", colorname(to), highlight(text)); } COMMAND(pm, "c"); @@ -841,12 +841,12 @@ void listdemos() void shiftgametime(int newmillis) { - newmillis = max(0, newmillis); - int gamemillis = gametimecurrent + (lastmillis - lastgametimeupdate); - if(!watchingdemo) { conoutf("You have to be watching a demo to change game time"); return; } + + newmillis = max(0, newmillis); if(newmillis > gametimemaximum) { conoutf("Invalid time specified"); return; } + int gamemillis = gametimecurrent + (lastmillis - lastgametimeupdate); if(newmillis < gamemillis) { // if rewinding diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index f9298db0..38bc7729 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -383,7 +383,6 @@ void deathstate(playerent *pl) setscope(false); setburst(false); if(editmode) toggleedit(true); - damageblend(-1); if(pl->team == TEAM_SPECT) spectatemode(SM_FLY); else if(team_isspect(pl->team)) spectatemode(SM_FOLLOW1ST); } diff --git a/source/src/entities.cpp b/source/src/entities.cpp index f1252264..8e58696e 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -89,11 +89,16 @@ void rendermapmodels() void showedithide() { - loopv(eh_ents) + if(eh_ents.length()) { - if(eh_ents[i]>0 && eh_ents[i]0 && eh_ents[i]