PDA

View Full Version : Changing movement speed in MP


Homeboy
07-08-2002, 06:43 PM
First, I'm really new to any editting other than binding keys so please forgive me if I'm being silly.

What I want to do is modifying walking/running speed so that people run backwards slower. This could help the bot and make running backwards and backstabbing less effective. It's more reallistic, too.

Where should I start? The editting guides are mostly about mapping or making skins.

And also I'd like to make people turn slower when doing any saber swing. Like when you do a blue lunge or red DFA it freezes your direction. Because one can do a swing and spin like mad which isn't very reallistic, either.

Any hints what I should look into? Thanks in advance!

Subject452
07-09-2002, 09:18 PM
look up the g_speed value in the source

Homeboy
07-10-2002, 11:10 AM
which file is it in?
is it as simple as changing weapon speeds?

Jaii der Herr
07-10-2002, 03:22 PM
you can simply change it in the console while playing ( if you have the server )

[JHQ]Inty
07-10-2002, 03:24 PM
if you're going to change the code you'll need programming experience first.

Homeboy
07-10-2002, 06:29 PM
I mean, I have the SDK & source, but there are lots of files with complex corelations. The "Make a MOD" readme made it look real simple to only change a value or two. So where is it in the source?

About the console command I heard of the one which slows all motion down but that's not what I want. Please tell me if you're refering to some other command.

I still have two months of summer vacation for this; I hope to learn some programming while working on it.

Jaii der Herr
07-10-2002, 06:42 PM
search for "PM_WalkMove()" etc. in bg_pmove.c

I think there you'll find what you search ( If you are a liitle bit famillar with c :) ).

Subject452
07-10-2002, 07:39 PM
PM_WalkMove() doesn't handle the speed of your walking only how you walk, just do a search on g_speed, i think its in g_active.c and change the float value of it.

Jaii der Herr
07-10-2002, 08:39 PM
Originally posted by Homeboy

What I want to do is modifying walking/running speed so that people run backwards slower. This could help the bot and make running backwards and backstabbing less effective. It's more reallistic, too.


For just editing g_speed you needn't change the speed...

If it isn't in PM_WalkMove than it is in one funktion in bg_pmove.
I think that wich calls PM_WalkMove...

HM, perhaps

BG_AdjustClientSpeed()

Subject452
07-11-2002, 03:40 AM
For just editing g_speed you needn't change the speed...

If it isn't in PM_WalkMove than it is in one funktion in bg_pmove.
I think that wich calls PM_WalkMove...

HM, perhaps

BG_AdjustClientSpeed()

...........................*yawn*................. ...what the hell is that supposed to mean?, the clients walking speed is handled by the g_speed value!!!!! (third time im posting this), default it's 250 aka basespeed for clientside prediction, just change the default cvar value of g_speed and WOW u have a new walkspeed and yes u can also do this with the console command /g_speed <value>.........................


Now lets apply logical thinking for the walking backwards thing, so if the player/bot is walking backwards then the speed value <ps.speed> will be depleted...... just do a search on g_speed, basespeed and speed itself....it's just that easy.....

Jaii der Herr
07-11-2002, 03:53 AM
oh, I meant code, not speed :D

it is in the funkten I mentioned after the perhaps.

There is already one part that reduces backwardspeed to 70% ( *= 0.7 )

Homeboy
07-12-2002, 01:08 AM
Ok, I did it. Thank you so much!
It turned out to be in the bg_pmove.c file as Jaii der Herr said. At which speed the player moves in all situations is all (I think?) described in this file.

Originally backwards was *= 0.75 ; I made it *= 0.5 and it worked out great! It's now very challenging fighting with bots since you'll have to block :)

I still need to slow down turning when the saber is in swing. One way is to minimize mouse sensitivity when swinging. But it won't work with keyboard or joystick. Any other ideas?

Jaii der Herr
07-12-2002, 01:40 AM
you could add an maxangle/sec. Then you check if s.o. turned greater than the angle / frametime (or whatever time you have in that funktion ) and cap it if it is higher