|
03-05-2008, 12:43 AM | #1 |
QUAD ROCKET
Server Owner
Fortress Forever Staff Join Date: Jul 2007
Class/Position: Soldier Gametype: Rocket Jumping Affiliations: -g1 ]qS[ -eC- :e0: [ESAD] Posts Rated Helpful 11 Times
|
Conc push formula
I'm working on a plugin that needs to emulate a conc grenade.
I was wondering if one of the developers or someone with access to the source can let me know what the formula is for the conc push. I tried a basic formula of: ((distance + speed) * 2.35) The above works but is not efficient enough. |
|
03-05-2008, 12:58 AM | #2 |
no war but class war
Fortress Forever Staff
Join Date: Oct 2007
Location: big bad berlin
Class/Position: Soldier / Scout Gametype: ctf Affiliations: [w~k!] Posts Rated Helpful 3 Times
|
..for?
|
|
03-05-2008, 01:00 AM | #3 |
Useless
Retired FF Staff
|
His plugin, obviously.
I don't have the formula you crave, nor access to it. We'll see if a dev steps up.
__________________
Look at all those dead links. |
|
03-05-2008, 05:27 AM | #4 | |
Join Date: Sep 2007
Class/Position: O Gametype: CTF Affiliations: mimic- Posts Rated Helpful 0 Times
|
Quote:
|
|
|
03-05-2008, 01:56 PM | #5 |
make it rain
Join Date: Dec 2007
Location: North Bay
Posts Rated Helpful 0 Times
|
first you have to derive the conc, finding the slope of the push. now take the push slope and multiply by the noob factor devided by pi
|
|
03-05-2008, 07:10 PM | #6 |
Wiki Team
Fortress Forever Staff Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly Gametype: PAYLOAD Affiliations: DET- Posts Rated Helpful 19 Times
|
wow stfu guys...this guy is trying to ask a genuine question. why do you have to be jackasses about it?
at OP I'll pm a dev and see if I can't get them to stop by for ya man.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
03-05-2008, 07:19 PM | #7 |
no war but class war
Fortress Forever Staff
Join Date: Oct 2007
Location: big bad berlin
Class/Position: Soldier / Scout Gametype: ctf Affiliations: [w~k!] Posts Rated Helpful 3 Times
|
Cui bono..
|
|
03-05-2008, 09:49 PM | #8 |
Retired FF Staff
Join Date: Jan 2005
Location: CowTown
Posts Rated Helpful 0 Times
|
This is the conc code, simplified:
From CFFGrenadeConcussion::Explode(): Code:
Vector vecDisplacement = pPlayer->GetLegacyAbsOrigin() - GetAbsOrigin(); float flDistance = vecDisplacement.Length(); Vector vecResult; // HAND-HELD CONC if ((pEntity == GetThrower() && m_fIsHandheld) || (flDistance < 16.0f)) { float fLateral = FFDEV_CONC_LATERAL_POWER; // 2.74f float fVertical = FFDEV_CONC_VERTICAL_POWER; // 4.10f Vector vecVelocity = pPlayer->GetAbsVelocity(); Vector vecLatVelocity = vecVelocity * Vector(1.0f, 1.0f, 0.0f); float flHorizontalSpeed = vecLatVelocity.Length(); vecResult = Vector(vecVelocity.x * fLateral, vecVelocity.y * fLateral, vecVelocity.z * fVertical); } // DROP CONC else { float verticalDistance = vecDisplacement.z; vecDisplacement.z = 0; float horizontalDistance = vecDisplacement.Length(); // Normalise the lateral direction of this vecDisplacement /= horizontalDistance; vecDisplacement *= (horizontalDistance * (8.4f - 0.015f * flDistance)); vecDisplacement.z = (verticalDistance * (12.6f - 0.0225f * flDistance)); vecResult = vecDisplacement; } pPlayer->SetAbsVelocity(vecResult); |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|