Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[RELEASE] 'Bug fixes' stock scripts (care package running glitch etc.)

Опубликовано:

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:

 

3onQr.jpg

jW2Ps.jpg

 

To fix that bug, get a _gamelogic.gsc (from your m2demo/maps/mp/gametypes folder) and search the line:

displayGameEnd( winner, endReasonText );

Directly above it, add this:

 

	if ( level.gametype == "sd" || level.gametype == "dd" )
	winner = getWinningTeam();

 

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):

M5eXG.jpg

 

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

if ( isDefined( attacker.finalKill ) && doKillcam && !isDefined( level.nukeDetonated ) )

change it to:

if ( isDefined( attacker.finalKill ) && doKillcam && !isDefined( level.nukeDetonated ) && level.finalKillcam )

 

Initialize the dvar somewhere on init() or similar:

	setDvarIfUninitialized( "scr_game_allowfinalkillcam", 1 );
level.finalKillcam = getDvarInt( "scr_game_allowfinalkillcam" );

 

Now you will be able to turn final killcam off (on) by setting:

set scr_game_allowfinalkillcam 0  //1

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 ) :

setDvar( "scr_intermission_time", 30.0 );

to

setDvarIfUninitialized( "scr_intermission_time", 30.0 );

 

// 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):

JdmO8.jpg

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/

Featured Replies

Опубликовано:

Well as "fourDeltaOne is a project which currently primarily focuses on fixing large gaming companies' stuff giving a greater gaming experience" this should definitely be distributed over the updater at some point, just makes me kind of laugh everytime how a 3rd party is fixing the errors the original developers introduced.

great, yet small work banz :)

Опубликовано:
Also openscriptmenu 1337 endround ;p

Why the hell did IW leave this in the game in the first place? I mean, yeah the console was disabled, but it is basically direct access to the nextmap command. Fun to mess with it on certain servers though :D

Опубликовано:
Also openscriptmenu 1337 endround ;p

Why the hell did IW leave this in the game in the first place? I mean, yeah the console was disabled, but it is basically direct access to the nextmap command. Fun to mess with it on certain servers though :D

Who knows man... there's a lot IW screwed up on.

Опубликовано:
  • Автор
Also openscriptmenu 1337 endround ;p

 

Yeah, i remember messing around with that long time ago.

Well, NTA fixed that one already.

 

		if ( response == "endround" )
	{
		if ( !self isHost() )
		{
			continue;
		}
...

 

There might be some servers using an 'old' _menus.gsc included in a mod though...so the exploit would work there

 

EDIT: Confirmed working on certain aRev trickshot servers. trololololol.

 

Why the hell did IW leave this in the game in the first place?

 

The endround response kind of makes sense for the host in private match, they 'just' forgot to block it for others i'd guess.

  • 2 weeks later...
Опубликовано:
  • Автор

So i've added a fix for the 'care package running glitch' and implemented a dvar to enable/disable final killcams.

Look at the first post for more info.

Опубликовано:

if cg_gun_z can be changeable in weapon file, i can make iron sight Intervention :)

also iron sight m14 like mw3...

 

hxx6m.png

 

hxx7h.png

 

hxx8p.png

 

hxx9q.png

 

both guns need some tweaking. m14's cg_gun_z is 1.1, cheytac's 1.15

m14's scope mount area needs to be removed because in front of iron sights and blocking them

cheytac need far sight dot for better aiming... if possible, we can use m4's...

 

EDIT: M14's rail removed! (was blocking iron sight) and cg_gun_z value is now 1.18

hxxpd.png

Опубликовано:
if cg_gun_z can be changeable in weapon file, i can make iron sight Intervention :)

also iron sight m14 like IW5...

 

4 Images.

 

both guns need some tweaking. m14's cg_gun_z is 1.1, cheytac's 1.15

m14's scope mount area needs to be removed because in front of iron sights and blocking them

cheytac need far sight dot for better aiming... if possible, we can use m4's...

 

 

 

EDIT: M14's rail removed! (was blocking iron sight) and cg_gun_z value is now 1.18

 

Can you release the sauce code? :)

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.