temporary double jump fix/typo fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7393 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+2
-1
@@ -130,6 +130,7 @@ public:
|
||||
bool inwater;
|
||||
bool onfloor, onladder, jumpnext, crouching, crouchedinair, trycrouch, cancollide, stuck, scoping, shoot;
|
||||
int lastjump;
|
||||
float lastjumpheight;
|
||||
int lastsplash;
|
||||
char move, strafe;
|
||||
uchar state, type;
|
||||
@@ -137,7 +138,7 @@ public:
|
||||
int last_pos;
|
||||
|
||||
physent() : o(0, 0, 0), deltapos(0, 0, 0), newpos(0, 0, 0), yaw(270), pitch(0), roll(0), pitchvel(0),
|
||||
crouching(false), crouchedinair(false), trycrouch(false), cancollide(true), stuck(false), scoping(false), shoot(false), lastjump(0), lastsplash(0), state(CS_ALIVE), last_pos(0)
|
||||
crouching(false), crouchedinair(false), trycrouch(false), cancollide(true), stuck(false), scoping(false), shoot(false), lastjump(0), lastjumpheight(0), lastsplash(0), state(CS_ALIVE), last_pos(0)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
@@ -444,8 +444,9 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
|
||||
if(pl->jumpnext)
|
||||
{
|
||||
pl->jumpnext = false;
|
||||
bool doublejump = pl->lastjump && lastmillis-pl->lastjump < 250 && pl->strafe != 0 && pl->lastjumpheight != 0 && pl->lastjumpheight != pl->o.z;
|
||||
pl->lastjumpheight = pl->o.z;
|
||||
pl->vel.z = 2.0f; // physics impulse upwards
|
||||
bool doublejump = pl->lastjump && lastmillis-pl->lastjump < 250 && pl->strafe != 0;
|
||||
if(doublejump) // more velocity on double jump
|
||||
{
|
||||
pl->vel.mul(1.25f);
|
||||
|
||||
@@ -842,8 +842,8 @@ void guidetoggle()
|
||||
Slot *sc = &slots[DEFAULT_CEIL];
|
||||
|
||||
char swn[256] = "packages/textures/"; swn[255] = '\0';
|
||||
char sfn[256] = "packages/textures/"; swn[255] = '\0';
|
||||
char scn[256] = "packages/textures/"; swn[255] = '\0';
|
||||
char sfn[256] = "packages/textures/"; sfn[255] = '\0';
|
||||
char scn[256] = "packages/textures/"; scn[255] = '\0';
|
||||
|
||||
strncat(swn, sw->name, 254);
|
||||
strncat(sfn, sf->name, 254);
|
||||
|
||||
Reference in New Issue
Block a user