Jump to content

Projectile's starting Force


'LinKin

Recommended Posts

  • Moderators
I would assume force only applies to some projectiles, such as grenades and molotovs. Have you tried it with those?

You are totally right:

//from CPacketHandler.cpp 
switch ( weaponType ) 
    { 
        case WEAPONTYPE_GRENADE: 
        case WEAPONTYPE_TEARGAS: 
        case WEAPONTYPE_MOLOTOV: 
        case WEAPONTYPE_REMOTE_SATCHEL_CHARGE: 
        { 
            // Read the force 
            SFloatSync < 7, 17 > projectileForce; 
            if ( !bitStream.Read ( &projectileForce ) ) 
                return; 
            fForce = projectileForce.data.fValue; 
  
            // Read the velocity 
            if ( !bitStream.Read ( &velocity ) ) 
                return; 
            pvecVelocity = &( velocity.data.vecVelocity ); 
            bCreateProjectile = true; 
  
            break; 
        } 
        //truncated code 
} 

Ahhh, no I've not tried but I think you're right!

Do you know which is the interval of that number?

Maybe 0 < x < 1 ..?

No more like 0 <= x <= 127 if I'm right (2^7 - 1)

EDIT: Wiki page updated (hope it won't get reverted for some reason) => createProjectile

Link to comment
  • 9 months later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...