From 0c48eb79989f0e9ea636c5d890b730aa5c290433 Mon Sep 17 00:00:00 2001 From: Bukz Date: Tue, 26 Apr 2011 00:36:04 +0000 Subject: [PATCH] even more fly updates git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6352 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/defaults.cfg | 1 + config/menus_settings.cfg | 1 + config/resetbinds.cfg | 2 +- config/scripts.cfg | 2 ++ source/src/physics.cpp | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/defaults.cfg b/config/defaults.cfg index edadc6aa..295f2bad 100644 --- a/config/defaults.cfg +++ b/config/defaults.cfg @@ -26,6 +26,7 @@ poniesmodeon = 0 // Reduced violence mode. __gibsgore = 1 // Default value for gibs slider. dyngamma = 0 old_editbinds = 1 +flystyle = 0 nickhighlight = 0 survMap = (rnd (listlen $defaultmaps)) survDifficulty = 0 diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 421370a6..763fc914 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -400,6 +400,7 @@ menuitemslider "Screenshot type: " -1 4 "$__screenshottype" 1 [ "JPEG (Terrible menuitemslider "Console size: " 0 20 "$consize" 1 "" [ consize $arg1 ] menuitemslider "Font type: " 0 2 "$__fontsetting" 1 [ "Default" "v104" "Mono" ] [ if (= $arg1 1) [ setfont v104; __fontsetting = 1 ] [ if (= $arg1 2) [ setfont mono; __fontsetting = 2 ] [ setfont default; __fontsetting = 0 ] ] ] menuitemslider "Mini-map background style: " 0 2 "$showmapbackdrop" 1 [ "Fully Transparent" "Black" "White/Transparent" ] [ showmapbackdrop $arg1 ] +menuitemslider "Fly style: " 0 1 "$flystyle" 1 [ "fly fast, toggle slow" "fly slow, toggle fast" ] [ flystyle = $arg1 ] menuitemcheckbox "Enable per-official map dynamic gamma: " "$dyngamma" [ dyngamma = $arg1 ] menuitemtextinput "Set default gamma for this map: " "(at $ofc_gamma_list (findlist $defaultmaps (curmap 1)))" [ setgamma $arg1 ] diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index 0fa27d21..81a2c80b 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -4,7 +4,7 @@ // Do not modify. bind MOUSE1 "attack" -bind MOUSE2 [ if $old_editbinds [ if $editing [ showmenu editing ] [ altaction ] ] [ if $editing [ slowmove 1; onrelease [ slowmove 0 ] ] [ altaction ] ] ] +bind MOUSE2 [ if $old_editbinds [ if $editing [ showmenu editing ] [ altaction ] ] [ if (&& (alive) (! $editing)) [ altaction ] [ slowtoggle $flystyle ] ] ] bind MOUSE3 "weapon" bind MOUSE4 "universaldelta 1" bind MOUSE5 "universaldelta -1" diff --git a/config/scripts.cfg b/config/scripts.cfg index d85dc655..9e0772b8 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -430,6 +430,8 @@ cleanshot = [ sleep 90 [ loop ros (listlen $cs_sets) [ (at $cs_sets $ros) (at $tmp_old_sets $ros) ] ] ] +slowtoggle = [ if (! (= $arg1 0)) [ slowmove 0; onrelease [ slowmove 1 ] ] [ slowmove 1; onrelease [ slowmove 0 ] ] ] + // Simple claim-admin script for one single-server. // Fill in the 3 aliases below, and uncomment the below line to activate. // bind F3 "customclaimadminscript" diff --git a/source/src/physics.cpp b/source/src/physics.cpp index 1b00d937..87565c39 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -328,7 +328,7 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) bool water = false; const bool editfly = pl->state==CS_EDITING; const bool specfly = pl->type==ENT_PLAYER && ((playerent *)pl)->spectatemode==SM_FLY; - const bool isfly = editfly || specfly; + const bool isfly = editfly || specfly || player1->spectatemode==SM_FLY; vec d; // vector of direction we ideally want to move in