[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Player Speed

Player Speed

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Player Speed

Postby ajay » Wed Oct 23, 2013 3:05 pm

I have done a search for this, but results were almost but not quite what I was after. Probably needed to spend more time. Lazy.
Anyway; player speed. I've messed with player speed before; slowing them down dependant on what weapon was being carried. However, I'm still unsure about a few things:

1) What's the most efficient way of adjusting player speed? stuffcmd(self,"cl_forwardspeed 400\n"); type thing, or is there a better way?
2) In the example in bold above, does that change the walking or running speed?
3) If walking speed, does the running speed stay the same or is it a percentage increase of the walking speed?
4) If it changes the running speed, how do you change the walking speed?

For some, probably only partially, helpful background, I'm basically wanting to slow the player walking speed down to something realistic (that scary pretence!) and slow the running speed down to a realistic (again!) and temporary increase of that.

As always, thanks for any and all support.

ajay
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Re: Player Speed

Postby Spike » Wed Oct 23, 2013 3:16 pm

.float maxspeed;

use it. it is your friend.

Edit: I'm informed that maxspeed is QW only.
for reference, correct values are in qu. It is not a scaler.
Last edited by Spike on Wed Oct 23, 2013 6:22 pm, edited 1 time in total.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Player Speed

Postby r00k » Wed Oct 23, 2013 4:02 pm

r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Player Speed

Postby Nahuel » Wed Oct 23, 2013 5:55 pm

hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Player Speed

Postby Cobalt » Thu Oct 24, 2013 3:55 am

If using DP, include the supplied svplayerphysics.qc file, in it theres a wishspeed float already coded that works very well.

vlen (self.velocity) also has some uses...some examples of it are here on this site somewhere.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Player Speed

Postby Cobalt » Sun Oct 27, 2013 7:50 pm

Got another question related to player movememt, may have asked it before but wanna make sure.

There is really no way to set the rate at with the client executes pitch or yaw? [ with Darkplaces mostly ]

cl_yawspeed and cl_pitchspeed will work on the keyboard but not the mouse. If you are doing multiplayer
stuffing the mousespeed cvar is sucky. I have tried .avelocity and does not work. Is it possible using .angles
or v_angle ?
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Player Speed

Postby Spike » Sun Oct 27, 2013 9:34 pm

Client view angles are owned by the client not the server. This allows the client to look around without waiting for an echo off the server. Latency sucks. Trying to override it on the server will seriously fuck everything up.
m_pitch and m_yaw control the indivudal mouse axis speeds. Beware that invert mouse is implemented by inverting the sign of m_pitch, so be sure to preserve the sign. Or you can override the user's sensitivity. Either way whatever you do will suck. Yay.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Player Speed

Postby Max_Salivan » Tue Nov 05, 2013 1:16 pm

one time i used cvar_set ("sv_maxspeed", "80"); in worldspawn function for player's speed :lol:
Sorry for my english :)
Max_Salivan
 
Posts: 96
Joined: Thu Dec 15, 2011 1:00 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest