Toggling RPG Guidance
nes game guides american driving records online childrens game indian recipe south vegetarian which broadband andrew grove richard advocacy resource exchange master photographers uk audiovox ringtones novo progresso pittsburgh aircraft charter ashlee cum los continentes ashlee cum animal online game jaguar sale maverick artist modern dance classes tampa white dress pants men safe children longhorns texas ticket vietnam war deaths psychology masters degree plus size business suits for women super smash bros melee movies lucky sex mobile shower trailer memory test computer software erotic night story wedding oil portrait professional japanese girls spitting society of plastic engineer auto patcher windows rolex replica watches pictures of tattoos on top of feet turkey weather june trapezoid rule example nextel cell phones only insane games. com philosophy of discipline scotlands people site texas emergency preparedness pilot the band in lyric night still temptation electronics student projects art college design ireland national resizing photos for email ad plus ware 2 fighting flash game reasonable suspicion and probable cause jay z song lyric lake hamilton middle school i laugh at everything name service switch interest rate predictions slim in six videos telegraph forum virginia hunting and fishing movie oliver twist asbury park press news 1920s golf history 4 code music myspace u video scientific revolution in europe low voltage detector andamans and nicobar islands economics job recruit what does this mean seminole recreation center ssc tool pictures of a normal lung interactive virtual paper dolls alex and aj fisher aruba needs new stories jazz mark c collier voyage campus international business degree mls system shake speare poems 2000 accord specs windows xp sp1a serial live nba player see they log home magazine mega mix 2004 spanish garden design junior year apartment california century city rental universal motion picture petite blonde anal top 100 cities population the great gatsby quotes mountain meadow 2nd fair grade science topic cheap lortab view earth from space policy frameworks in the uk and emu palauan legends play a mcdonalds game motorcycle rider training course equipping force rapid Based on tutorial found here.
Basically what we're going to be doing is allowing a player to switch the RPG's guiding laser on and off using the weapon's secondary fire. Along with this, we will allow a player who has fired a dumb (non-guided) rocket that hasn't yet exploded to change weapons.
Files affected:
- weapon_rpg.cpp
In CWeaponRPG::ItemPostFrame() (about line 1539), add the following code:
if ( pPlayer->m_afButtonPressed & IN_ATTACK2 ) { ToggleGuiding(); }
at the end of the method, after:
if ( pPlayer->GetAmmoCount(m_iPrimaryAmmoType) <= 0 && m_hMissile == NULL ) { StopGuiding(); }
This says, in effect, "If the player hits the secondary attack, toggle rocket guidance on or off."
Then in CWeaponRPG::SuppressGuiding() (about line 1497), find the following code:
if ( m_hLaserDot == NULL ) { StartGuiding(); //STILL!? if ( m_hLaserDot == NULL ) return; }
and comment "StartGuiding();" out, so that it looks like this:
if ( m_hLaserDot == NULL ) { //StartGuiding(); //STILL!? if ( m_hLaserDot == NULL ) return; }
This stops the code from automatically starting up rocket guidance again.
That's it for the guidance toggling code. Now to allow the player to lower the RPG after firing a dumb rocket but before it explodes.
In CWeaponRPG::Lower() (about line 1528), find the following code:
if ( m_hMissile != NULL ) return false;
and change it to read:
if ( m_hMissile != NULL && IsGuiding() ) return false;
This prevents the code from automatically telling us that we can't lower the RPG if we're not guiding. You will then need to make the same change in CWeaponRPG::CanHolster() (about line 1641).
Then in CWeaponRPG::Reload() (about line 1827), add this code:
if ( pOwner->GetActiveWeapon() != this ) return false;
after:
if ( pOwner->GetAmmoCount(m_iPrimaryAmmoType) <= 0 ) return false;
If we changed weapons after firing, this will prevent the RPG from getting kicked back up to us for a reload after the dumb rocket explodes.
And that's it! You're done.