[RELEASE] 'Bug fixes' stock scripts (care package running glitch etc.)
Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
Well, this topic deals with the default .gsc files and is about two things mainly:
(1) fixes for certain bugs you might have come across already
(2) some improvements which might come in handy for some of you
//care package running 'glitch' fix
As you might know, running with the airdrop marker in your hands increases your speed. Some people use it while 'knife running'.
It annoys lots of players so i thought about this fix:
Get a clean _airdrop.gsc and find this part:
while( isAirdropMarker( currentWeapon ) /*|| currentWeapon == "none"*/ ) { self waittill( "weapon_change", currentWeapon ); if ( isAirdropMarker( currentWeapon ) ) airdropMarkerWeapon = currentWeapon; }Change it to:
while( isAirdropMarker( currentWeapon ) /*|| currentWeapon == "none"*/ ) { //fix 'care package running' bug self setMoveSpeedScale( 0.75 * self.moveSpeedScaler ); //0.8 self waittill( "weapon_change", currentWeapon ); if ( isAirdropMarker( currentWeapon ) ) airdropMarkerWeapon = currentWeapon; }From now on running with airdrop marker wont increase your running speed anymore:
(I've done some measurements using fraps and virtual dub, and it turns out that running with care package marker in your hands is slighty slower than running with smg in your hands, after you used the fix above with 0.75 multiplier.)
//Game is showing wrong 'winner' in SnD/Demolition on game end
If the winlimit dvar is set to 0 in SnD or Demolition you might experience a bug when the game ends;
it shows the wrong winner. It always shows the team which won the last round.
Here is an example:
roundlimit 24, winlimit 0, axis: 13 allies: 11, but allies won the last round
-> game will show allies as winner...by default
Well, if you don't get me take a look at the screenshots:
To fix that bug, get a _gamelogic.gsc (from your m2demo/maps/mp/gametypes folder) and search the line:
Directly above it, add this:
and copy this to the end of the file (below all the other code):
getWinningTeam() { if ( game["roundsWon"]["allies"] == game["roundsWon"]["axis"] ) winner = "tie"; else if ( game["roundsWon"]["axis"] > game["roundsWon"]["allies"] ) winner = "axis"; else winner = "allies"; return winner; }After doing so the game should always show the correct result (tie in this case):
Note sure if this kind of bug exists in other gametypes too...
//About roundswitch dvar issue in SnD (and similar)
I've seen some people/clans having issues with setting the roundswitch to higher values than 9.
They set the dvar to e.g. 12 but the game switches sides at 9.
To fix that, get a _utility.gsc (from your m2demo/maps/mp/gametypes folder) and search for this part:
registerRoundSwitchDvar( dvarString, defaultValue, minValue, maxValue ) { registerWatchDvarInt( "roundswitch", defaultValue ); dvarString = ( "scr_" + dvarString + "_roundswitch" ); level.roundswitchDvar = dvarString; level.roundswitchMin = minValue; level.roundswitchMax = maxValue; level.roundswitch = getDvarInt( dvarString, defaultValue ); if ( level.roundswitch < minValue ) level.roundswitch = minValue; else if ( level.roundswitch > maxValue ) level.roundswitch = maxValue; }change it to:
registerRoundSwitchDvar( dvarString, defaultValue, minValue, maxValue ) { registerWatchDvarInt( "roundswitch", defaultValue ); dvarString = ( "scr_" + dvarString + "_roundswitch" ); level.roundswitch = getDvarInt( dvarString, defaultValue ); }If you set the dvar higher than 9 now, the game should switch sides correctly at your desired round value instead of switching after 9 rounds.
// Add dvar to turn final killcam on/off through server.cfg
There's scr_game_allowkillcam dvar to enable/disable killcams. But that dvar doesn't affect final killcams (round winning killcams).
So i decided to implement scr_game_allowfinalkillcam dvar.
Find this line in _damage.gsc
change it to:
Initialize the dvar somewhere on init() or similar:
Now you will be able to turn final killcam off (on) by setting:
in your server.cfg
// Make intermission time adjustable through server.cfg
To be able to change the intermission time (time after one game, between the maps when the scoreboard is shown) through server.cfg just change ( in _gamelogic.gsc ) :
to
// Fix the (black) desert eagle's iron sights (credits to iAegle for initial version)
The black deagle's iron sights are a bit off by default,
as you can see here (note: golden deagle is fine):
To fix it i used cg_gun_y clientdvar. (BTW: Does anyone know if there's a cg_gun_y equivalent in the weapon files?!)
Call this somewhere onPlayerSpawned(); :
( in case you want adjusted recoil two, uncomment the two outcommented lines in the code)
deagleFix() { self endon( "death" ); self endon( "disconnect" ); self.guny = -1; for(; { self waittill( "weapon_change", newWeapon ); if( isSubStr( newWeapon, "deserteagle" ) ) { //self player_recoilScaleOn( 60 ); //uncomment in case you want adjusted recoil for deagle... if( newWeapon == "deserteagle_mp" && self.guny != -0.12 ) { self.guny = -0.12; self setClientDvar( "cg_gun_y", -0.12 ); } else if ( newWeapon == "deserteaglegold_mp" && self.guny != 0 ) { self.guny = 0; self setClientDvar( "cg_gun_y", 0 ); } } else { //self player_recoilScaleOn( 100 ); //uncomment if you want to use adjusted recoil for deagle... if ( self.guny != 0 ) { self.guny = 0; self setClientDvar( "cg_gun_y", 0 ); } } } }Like this:
onPlayerSpawned() { self endon("disconnect"); for(; { self waittill("spawned_player"); self thread deagleFix(); } }EDIT: I will add more stuff later and attach the 'fixed/ajusted' .gsc files
EDIT2: attached .iwd with the changed.gsc files
EDIT3: added deagle fix
EDIT4: added scr_game_allowfinalkillcam dvar
EDIT4: added fix for 'care package running'
Virustotal: https://www.virustotal.com/file/0834d9c ... 358113954/