Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Wall jumping Goto page Previous 1, 2

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
r00k Joined: 13 Nov 2004 Posts: 483 |

Posted: Thu May 03, 2007 9:06 am Post subject: |

Testing your mod, it stopped me when i touched the wall, but here's the fix for ya I tested it and it works fine...

Code:
void () player_touch = { if ((other.solid == SOLID_BSP) && (self.button2)) { if ((time > self.timetojump) && ((time > self.timetojump2)))
{
if ((!self.flags & FL_ONGROUND)) self.flags = self.flags + FL_ONGROUND;
self.velocity = (self.velocity * 1.5);
self.timetojump2 = time + 0.5;
return;
}
}
};

Code:
void() PlayerJump = { if (self.flags & FL_WATERJUMP) return; if (self.waterlevel >= 2)
{
if (self.watertype == CONTENT_WATER)
self.velocity_z = 100;
else if (self.watertype == CONTENT_SLIME)
self.velocity_z = 80;
else
self.velocity_z = 50;
// play swiming sound
if (self.swim_flag < time)
{
self.swim_flag = time + 1;
if (random() < 0.5)
sound (self, CHAN_BODY, "misc/water1.wav", 1, ATTN_NORM);
else
sound (self, CHAN_BODY, "misc/water2.wav", 1, ATTN_NORM);
}
return;
}
if (!(self.flags & FL_ONGROUND))
{
return;// already in air...
}
if ( !(self.flags & FL_JUMPRELEASED) )
{
return; // don't pogo stick
}
self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
self.flags = self.flags - FL_ONGROUND; // don't stairwalk
self.button2 = 0;
// player jumping sound
sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
self.timetojump = time + (0.2);
HarblTron ();
};

Cool mod so far! Hope this helps you out!
-R00k

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT Goto page Previous 1, 2
Page 2 of 2

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group