testing onHit alias/cancel jump/crouch physics in editmode if both keys are pressed

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6553 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-07-06 02:12:58 +00:00
parent bf014e3e2f
commit 83cc603a3a
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -402,12 +402,12 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
if(editfly) // just apply velocity
{
pl->o.add(d);
if(pl->jumpnext)
if(pl->jumpnext && !pl->trycrouch)
{
pl->jumpnext = true; // fly directly upwards while holding jump keybinds
pl->vel.z = 0.5f;
}
else if (pl->trycrouch)
else if (pl->trycrouch && !pl->jumpnext)
{
pl->vel.z = -0.5f; // fly directly down while holding crouch keybinds
}