Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scout movement weapon #85

Merged
merged 14 commits into from May 22, 2016

Conversation

Projects
None yet
5 participants
@squeek502
Copy link
Member

squeek502 commented Dec 5, 2014

We were pretty happy with this in the old beta; just needed to get it finalized. Cherry-picked all the relevant commits from the dev/svn branch (hopefully I didn't miss any).

Things left to do:

  • Name it (its currently code named jumpdown because I'm a dumbo)
  • Give it a weapon model (currently uses the railgun model)
  • Give it a unique sound (currently uses the railgun sound)
  • Give it a better effect (currently uses a simple conc-like ring)

For anyone unfamiliar:

  • When used, gives the scout a double-jump-like boost (moves them in the direction they are looking, not an additive boost)
  • Must be fully charged to be used
  • Charges passively while held, loses all charge when switching weapons

Some quotes of mine from the old beta forums:

The goal is to communicate that the scout is primarily for movement. The current (2.4) weapon loadout does the exact opposite.

So, we basically have two options:

  • Remove all weapons, leaving the scout with "hands"
  • Add a movement weapon that requires you to have it out basically at all times except for certain cases (nailgunning an SG for instance)

We have done the latter, and I think it's a far better solution.


The other thing is that it's not really meant to be the most useful thing ever. As long as it is used instead of damage weapons, the goal has been met.

The scout is for movement, that is all we want to communicate. If this weapon does that, then fantastic.


Anyone playing scout trying to get kills is not going to be successful, and will conclude (incorrectly) that the game is unbalanced because of the scout's perceived weakness. This movement weapon will just make sure that no longer happens; if people no longer play scout, that's their prerogative. At least we'll no longer see D scouts.

Also, scout has always been a "forced" role (in that his weapons are awful; the best scouts don't use weapons). We're just making sure people understand that role, because as of now, it's not easy to grasp with the clues FF gives (it's hard to tell that his weapons are intended to be awful, and that it's better if you avoid using them altogether).


If this gets any one person to think "oh, I shouldn't be killing people with this class", it will have succeeded. If it also doesn't unbalance the scout in CTF while at the same it time improves the scout's usefulness in AvD, it will have succeeded quadrupaley.


Here are the goals I personally had in mind for a scout movement weapon:

  • Simple, accessible movement
  • Unique new movement tool (opens up new possibilities with movement, not just adding another way to achieve similar movement)
  • Not overpowering (or mostly doesn't affect the balance of the scout)
  • Can only be used for movement
  • Requires that it be used in place of damage weapons
  • Communicates that the scout shouldn't use damage weapons

squeek502 and others added some commits Sep 27, 2009

Added ff_weapon_jumpdown (scout movement weapon attempt)
(cherry picked from commit 882f40c)

Conflicts:
	cl_dll/client_scratch-2005.vcproj
	dlls/server_scratch-2005.vcproj
Added an effect to the jumpdown
TODO: Make it show to the client doing the shooting

(cherry picked from commit 601ed5d)
Scout gets jumpdown weapon out after building a jumppad
(cherry picked from commit 035f0b1)

Conflicts:
	dlls/ff/ff_player.cpp
Jumpdown pushes a standard horizontal amount no matter how far up/dow…
…n you're looking (ignores z-direction of eyeangles)

(cherry picked from commit c6e0b3b)
Made a lot of the jumpdown code shared
(cherry picked from commit ddfb1a4)

Conflicts:
	game_shared/ff/ff_weapon_jumpdown.cpp
Added cl_concaim_xhair 3 that flashes the trueaim crosshair when you …
…shoot while conced

Added cl_concaim_fadetime (default: 0.3)

(cherry picked from commit 89b615f)

Conflicts:
	cl_dll/ff/ff_hud_hitindicator.cpp
	cl_dll/hud_crosshair.cpp
	game_shared/ff/ff_weapon_assaultcannon.cpp
	game_shared/ff/ff_weapon_autorifle.cpp
	game_shared/ff/ff_weapon_base.cpp
	game_shared/ff/ff_weapon_baseclip.cpp
	game_shared/ff/ff_weapon_railgun.cpp
Jumpgun now starts fully charged on player spawn and doesn't lose cha…
…rge when you build a jumppad. ( or when you hold the jumppad out )

I hope i did this right!

(cherry picked from commit cbc74fe)
Nothing changed.
Removed GetLegacyAbsOrigin which just returned AbsOrigin
Removed GetWaistOrigin which just returned AbsOrigin
Renamed GetCurBuild to GetCurrentBuild (it bugged me. I dunno why)

(cherry picked from commit 0fbfc14)

Conflicts:
	game_shared/ff/ff_grenade_armorstrip.cpp
	game_shared/ff/ff_grenade_gas.cpp
	game_shared/ff/ff_grenade_vert.cpp
	game_shared/ff/ff_player_shared.cpp
	game_shared/ff/ff_weapon_hookgun.cpp
	game_shared/ff/ff_weapon_rpg.cpp
@AfterShockFF

This comment has been minimized.

Copy link
Member

AfterShockFF commented Dec 10, 2014

The only other thing we werent quite happy with, design mechanics wise, (if I remember correctly, was a while ago!) was switching weapons back and forth and whether you lose all your charge and stuff - I can't remember exactly what we decided.

@@ -137,6 +137,10 @@ typedef enum
// Engineer specific
FF_WEAPON_RAILGUN,

// Scout specific
FF_WEAPON_JUMPDOWN,
FF_WEAPON_JUMPUP,

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

i suspect we don't need both?

/// ---------
/// Jan 19 2004 Mirv: First implementation
//
// 11/11/2006 Mulchman: Reverting back to bouncy rail

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

We should probably try to get rid of these useless comments on new files, at least we should try to not make the problem worse in the absence of a big cleanup.

}

//Reset the last weapon to this jumpgun
ToFFPlayer(GetOwnerEntity())->SetLastFFWeapon(this);

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

I am somewhat surprised this must be done manually.

if( pLastWeapon->GetWeaponID() == FF_WEAPON_DEPLOYMANCANNON )
{
//The last weapon was a jumpad
DevMsg("Last weapon was a jumpad. Do nothing\n");

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

We probably dont need these devmsgs any more

m_flClampedChargeTime = JUMPDOWN_CHARGEUPTIME;

m_flNextPrimaryAttack = gpGlobals->curtime;
}

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

if you pulled all the code above here out into a function "you could return early and reduce the nested logic (which makes it quite hard to work out whats going on). In fact - if you don't need the below line (SetLastFFWeapon), you could just return early from inside the logic here.

//#else

//m_flTotalChargeTimeBuffered = m_flClampedChargeTimeBuffered = 0.0f;
//m_flChargeTimeBufferedNextUpdate = 0.0f;

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

can get rid of this stuff

if (!JUMPDOWN_VERTICALSETVELOCITY && !JUMPDOWN_HORIZONTALSETVELOCITY)
pPlayer->ApplyAbsVelocityImpulse(Vector(horizPush.x, horizPush.y, JUMPDOWN_VERTICALPUSH) * flPercent);
else if (JUMPDOWN_VERTICALSETVELOCITY && JUMPDOWN_HORIZONTALSETVELOCITY)
pPlayer->SetAbsVelocity(Vector(horizPush.x, horizPush.y, JUMPDOWN_VERTICALPUSH) * flPercent);

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

when we are happy with the jumpgun behaviour we can remove a lot of this testing-different-velocity-maths stuff (I suspect the time might be now).

// Player "shoot" animation
pPlayer->SetAnimation( PLAYER_ATTACK1 );

int nShots = min(GetFFWpnData().m_iCycleDecrement, pPlayer->GetAmmoCount(m_iPrimaryAmmoType));

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

Does it even have ammo?

);

#ifdef GAME_DLL
#endif

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

not very cool ifdef block


#ifdef GAME_DLL
// Not currently charging, but wanting to start it up
if (m_flStartTime == -1.0f && pPlayer->GetAmmoCount(GetPrimaryAmmoType()) > 0)

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

More ammo stuff

}

#ifdef GAME_DLL
#else // ^^ GAME_DLL ^^

This comment has been minimized.

Copy link
@AfterShockFF

AfterShockFF Dec 10, 2014

Member

This can just be #ifdef CLIENT_DLL

@AfterShockFF

This comment has been minimized.

Copy link
Member

AfterShockFF commented Dec 10, 2014

Looks ok, could do with a slight bit of cleanup. Probably want to rename the gun too.. :) 👍 merge when ready

@AfterShockFF

This comment has been minimized.

Copy link
Member

AfterShockFF commented Apr 4, 2016

Is there a corresponding script change, presumably it just needs the scout with the gun added to his inventory, and the ff_weapon_jumpgun.txt?

@squeek502

This comment has been minimized.

Copy link
Member Author

squeek502 commented Apr 4, 2016

Yeah, I assume there are a few script changes necessary. Weapon script file, scout player script file, sound script addition. Those changes should be buried somewhere in the old SVN branch. I'll try to dig them up and submit a corresponding PR on the scripts repo later tonight.

@AfterShockFF

This comment has been minimized.

Copy link
Member

AfterShockFF commented Apr 4, 2016

Ok, thanks. If you have any thoughts on the weapon sound let me know otherwise I'll try to dig something out.

@squeek502

This comment has been minimized.

Copy link
Member Author

squeek502 commented Apr 4, 2016

@BullyFF made something (see #115) but it's no longer online. I'll check if I downloaded it when I get a chance.

@BullyFF

This comment has been minimized.

@squeek502

This comment has been minimized.

Copy link
Member Author

squeek502 commented Apr 5, 2016

Thanks @BullyFF

@AfterShockFF, added what we had in the old beta to fortressforever/fortressforever-scripts#54. Will definitely need some fleshing out, though (given its own sound definition, adding a localized string for its name to the language files, etc).

@FDA-

This comment has been minimized.

Copy link

FDA- commented Apr 5, 2016

If the jump gun is going to replace one of the other weapons I'd like to opt for the scout keeping his nailgun, I think it's weapon for team work allowing the scout to help with very weak sentries occasionally.

@squeek502

This comment has been minimized.

Copy link
Member Author

squeek502 commented Apr 5, 2016

Definitely agree. In fortressforever/fortressforever-scripts#54 it's in slot3, not replacing any weapons.

@AfterShockFF

This comment has been minimized.

Copy link
Member

AfterShockFF commented May 22, 2016

Going to merge this - it's releasable in this state. It doesnt have a unique weapons model but thats unlikely to come soon and we can do it later. I've added the sounds. Weapons naming and adding a better effect can always be added later.

@AfterShockFF AfterShockFF merged commit 15938fb into beta May 22, 2016

@AfterShockFF AfterShockFF deleted the features/scout-movement-weapon branch Jun 4, 2016

@AfterShockFF AfterShockFF restored the features/scout-movement-weapon branch Jun 4, 2016

@squeek502 squeek502 deleted the features/scout-movement-weapon branch Jul 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.