Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
DuckReconMajor

CF_NOMOMENTUM

Recommended Posts

I've been fugglin around with the Chocolate Doom source again, trying to do something I've wanted to do for a while, take the momentum out. As in, right when I press a movement key go full speed and right when I let go, stop.

I tried several things, including making P_thrust update my position instead of my momentum, which caused me to noclip and float through the air.

Then I found this

    if (player && player->cheats & CF_NOMOMENTUM)
    {
	// debug option for no sliding at all
	mo->momx = mo->momy = 0;
	return;
    }
I used it and it did what I wanted, but slowly. Like, running is slower than normal walking slow. I guess I could just increase the movement speed, but I still wonder why it's slower and if I can solve the problem more directly.

Also, is this a Chocolate Doom thing or is it in vanilla Doom?

Share this post


Link to post

It comes from vanilla of course. There would be no reason for Fraggle to add effectively dead code (since CF_NOMOMENTUM is never set anywhere; there's no cheat code for it) in a painstakingly faithful port.

Share this post


Link to post
DuckReconMajor said:

I guess that was a silly question. Do you know how I would do this? Would it be easier in another source port?

Just copy the "stealth boots" code from Chocolate Strife in st_bar.c - All it does is set CF_NOMOMENTUM (why they're called "stealth" boots is entirely beyond me, because they grant no stealth whatsoever).

Share this post


Link to post

Where is that? I don't see it here or here.

Anyway, I tried it out in vanilla Strife and it does almost what I want. I'm trying to get it to go instant fullspeed as well as instant stop. It did maintain full speed in Strife though, which isn't happening in Doom for some reason.

And I can see where it would be stealth. If you're sneaking around corners you don't want to slide into view because you didn't stop soon enough.

Share this post


Link to post
DuckReconMajor said:

Where is that? I don't see it here or here.

Sorry, st_stuff.c :P Dunno how I made a mistake like that.

Share this post


Link to post

Risen3D already has this. It is the option "Player deceleration" which has a variable slider to change this behaviour from doom default to run and stop.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×