I'll leave the cameras to someone else, as my vector maths is terrible.
And the hang I havent any idea on, I think its a big bit beyond the scope of this script.
But, here is some code to get the double-jump in, splice it in at
around line 250 in PLAYER.c
The the
abs(my.velocity_z) <= 10 is the number to play with to set the time the
double jump is available. Its currently set to about the top 20% of the jump.
So double jump wont react unless you hit space when you are 'almost' at the top,
or just starting to come back down. It doesnt react at all to falling from a height.
...
}
if(my.jumping_mode == 2 || my.jumping_mode == 3) my.jumping_mode = 0;
}
else
{
////////////////////////////////// vvvvv insert this code
if(my.jumping_mode == 1)
{
if(key_space == 0 && space_press == 1) space_press = 0;
if(key_space == 1 && space_press == 0 && abs(my.velocity_z) <= 10) //section of jump where double is available
{
space_press = 1;
my.jumping_mode = 2;
my.force_z = 25;
my.velocity_z = 0;
my.blendframe = jump;
my.animate2 = 0;
my.animblend = blend;
}
}
////////////////////////////////// ^^^^^ insert this code
if(my.jumping_mode == 2)
{
if(result > 120)
...