From b930b59438d1234b0e1fd93f93b08d6252c1b7c6 Mon Sep 17 00:00:00 2001 From: Bukz Date: Mon, 25 Apr 2011 20:09:33 +0000 Subject: [PATCH] reversed jump physics while crouching in editmode git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6340 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- bot/bot_names.txt | 54 +++++++++++++++++++++--------------------- config/menus_bot.cfg | 2 +- config/survival.cfg | 2 +- source/src/physics.cpp | 9 +++---- 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/bot/bot_names.txt b/bot/bot_names.txt index 56cb318f..9e3f1af4 100644 --- a/bot/bot_names.txt +++ b/bot/bot_names.txt @@ -7,28 +7,28 @@ Coolbot stefanhendriks Dude Dumb -Rabid Newb +Rabid_Newb Eek w00t Pwned -Indoor Terrain +Indoor_Terrain Dumbstruck [prrt]brainfart -Santa Far +Santa_Far TinCan-Sam Aristotles MuHaHaHa 0x0DEFACED -James Bonk -Rotaredom Murof +James_Bonk +Rotaredom_Murof zaiBan YHWH -gruiiik gruiiik -Lady Die -!!!BUY NOW!!! +gruiiik_gruiiik +Lady_Die +!!!BUY_NOW!!! where_am_i PMB -Leagle Eagle +Leagle_Eagle Maleficus Grolsch Gambrinius @@ -43,7 +43,7 @@ Hell Koff Orval Zlatopramen -Lapin Kulta +Lapin_Kulta Kaltenberg Zeunerts Bluesman @@ -90,28 +90,28 @@ L33t_kR3W Bones MrJoe Shrike -Captain Shrimps -Count Draculol -Harun Al-RushIt -Honey Bunny -Joe Blow -Z00per N00b -Corporal Clegg -Rushing Russian -Johnny Crash -Private Parts -Major Headache -General Surgery +Captain_Shrimps +Count_Draculol +Harun_Al-RushIt +Honey_Bunny +Joe_Blow +Z00per_N00b +Corporal_Clegg +Rushing_Russian +Johnny_Crash +Private_Parts +Major_Headache +General_Surgery luggable -fried circuits -Byte my ASCII! +fried_circuits +Byte_my_ASCII! CPLD FPGA THE_STORM -Die Hard -Bad boy +Die_Hard +Bad_boy Beast -Dead man +Dead_man chibby teh_ownerer teh_masterer diff --git a/config/menus_bot.cfg b/config/menus_bot.cfg index efcbb481..f649eb60 100644 --- a/config/menus_bot.cfg +++ b/config/menus_bot.cfg @@ -117,7 +117,7 @@ menuitemslider "# of bots to spawn at checkpoints: " 1 5 "$survBotsToAdd" 1 [] menuitemslider "# of milliseconds between checkpoints: " 10000 120000 "$timeBetChkPts" 10000 [] [ timeBetChkPts = $arg1 ] menuitemslider "Maximum # of bots in survival mode: " 10 50 "$survMaxBots" 2 [] [ survMaxBots = $arg1 ] menuitem [] -1 -menuitem " Back" [ closemenu "Survival Mode - Customize" ] +menuitem " Back" [ closemenu "Survival Mode - Customize" ] newmenu "Creating bot waypoints" diff --git a/config/survival.cfg b/config/survival.cfg index ec4dd93b..8915f609 100644 --- a/config/survival.cfg +++ b/config/survival.cfg @@ -93,7 +93,7 @@ isInZone = [ checkzone = [ if (! $survIsFinished) [ - if (|| $editing (|| (> $gamespeed 100) (< $gamespeed 100))) [ endSurvival (concatword (c 3) "Error: " (c 1) editmode (c 5) " and " (c 1) gamespeed (c 5) " are not allowed in Survival Mode.") ] + if (|| $editing (! (= $gamespeed 100))) [ endSurvival (concatword (c 3) "Error: " (c 1) editmode (c 5) " and " (c 1) gamespeed (c 5) " are not allowed in Survival Mode.") ] if (&& (isInZone) (! $startedSurvival)) [ startSurvival ] if (&& (&& $startedSurvival $gotCheckPoint) (>= (- (millis) $lastCheckPoint) $timeBetChkPts)) [ increaseDifficulty ] if (&& (&& (! (isInZone)) $startedSurvival) (! $startedOBCount)) [ startOBCount ] diff --git a/source/src/physics.cpp b/source/src/physics.cpp index ef7b2bac..b09e6d2f 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -402,9 +402,10 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) pl->o.add(d); if(pl->jumpnext) { - pl->jumpnext = false; - pl->vel.z = 2; + pl->jumpnext = true; // fly directly upwards while holding jump keybinds + pl->vel.z = 0.5f; } + else if (pl->crouching) pl->vel.z = -0.5f; // fly directly down while holding crouch keybinds } else if(specfly) { @@ -458,7 +459,7 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) else { pl->timeinair += curtime; - if (pl->trycrouch && !pl->crouching && !pl->crouchedinair) { + if (pl->trycrouch && !pl->crouching && !pl->crouchedinair && pl->state!=CS_EDITING) { pl->vel.z += 0.3f; pl->crouchedinair = true; } @@ -750,7 +751,7 @@ void updatecrouch(playerent *p, bool on) const float crouchspeed = 0.6f; p->crouching = on; p->eyeheightvel = on ? -crouchspeed : crouchspeed; - if(p==player1) audiomgr.playsoundc(on ? S_CROUCH : S_UNCROUCH); + if(p==player1 && p->state!=CS_EDITING) audiomgr.playsoundc(on ? S_CROUCH : S_UNCROUCH); } void crouch(bool on)