Jump to content

Force push speed


Recommended Posts

Hello everyone, I recently found the value of the push force speed like that of the npc, but having slightly reduced the values from 500 units to 200, I noticed that the player began to push faster but slightly fast as the npc, moreover, the npc started pushing even faster than before. How can I change the speed of the force push so that I am on par with the NPC ??? One more thing, it seems to me that the push force is somehow related to the pulling force. How to explain this ???

Link to post

Hello there. This is the code for Push and Pull speed. I left some notes to help you understand the code.

if ( pull )
	{
		if ( self->NPC )
		{//NPCs can push more often
			//FIXME: vary by rank and game skill?
			self->client->ps.forcePowerDebounce[FP_PULL] = level.time + 200; // This is the Pull speed for NPCs, edit this to determine how fast npcs pull!
		}
		else
		{
			self->client->ps.forcePowerDebounce[FP_PULL] = level.time + self->client->ps.torsoAnimTimer + 500; // // This is the Pull speed for the Player, edit this to determine how fast Players pull!
		}
	}
	else
	{
		if ( self->NPC )
		{//NPCs can push more often
			//FIXME: vary by rank and game skill? 
			self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + 200; // This is the Push speed for NPCs, edit this to determine how fast npcs push!
		}
		else
		{
			self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + self->client->ps.torsoAnimTimer + 500; // This is the Push speed for the Player, edit this to determine how fast the Player pushes!
		}
	}

 

Link to post
12 hours ago, GamingPrince83 said:

Hello there. This is the code for Push and Pull speed. I left some notes to help you understand the code.


if ( pull )
	{
		if ( self->NPC )
		{//NPCs can push more often
			//FIXME: vary by rank and game skill?
			self->client->ps.forcePowerDebounce[FP_PULL] = level.time + 200; // This is the Pull speed for NPCs, edit this to determine how fast npcs pull!
		}
		else
		{
			self->client->ps.forcePowerDebounce[FP_PULL] = level.time + self->client->ps.torsoAnimTimer + 500; // // This is the Pull speed for the Player, edit this to determine how fast Players pull!
		}
	}
	else
	{
		if ( self->NPC )
		{//NPCs can push more often
			//FIXME: vary by rank and game skill? 
			self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + 200; // This is the Push speed for NPCs, edit this to determine how fast npcs push!
		}
		else
		{
			self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + self->client->ps.torsoAnimTimer + 500; // This is the Push speed for the Player, edit this to determine how fast the Player pushes!
		}
	}

 

I edited to 200, but it's not enough, it doesn't push like npc

Link to post

I've gotten it to work!

 

else
    {
        if ( self->NPC )
        {//NPCs can push more often
            //FIXME: vary by rank and game skill? 
            self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + 200;  Copy the line marked in Yellow and replace the line in blue
        }
        else
        {
            self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + self->client->ps.torsoAnimTimer + 500 // Replace this line
            //self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + self->client->ps.torsoAnimTimer + 500;
        }
    }

 

Link to post

On 2/22/2021 at 10:18 AM, GamingPrince83 said:

I've gotten it to work!

 

else
{
if ( self->NPC )
{//NPCs can push more often
//FIXME: vary by rank and game skill?
           }Copy the line marked in Yellow and replace the line in blue
}
/ /
{
            self->client->ps.forcePowerDebounce[FP_PUSH] = level.time + self->client->ps.torsoAnimTimer + 500 } }

 

 

I have one more question for you: many NPCs when you shoot them, they automatically push missiles and projectiles, do you happen to know how to find this code to register it for the player?

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
×
×
  • Create New...