G-Spawn Bug

broken avatar :(
Created 1120 days ago
by Harry Bo21
0 Members and 1 Guest are viewing this topic.
2,708 views
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 22 days ago
Posts
6,879
Respect
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
I just found this in treyarchs stupid ass code...

Explains why people had GSpawn errors with my  perks, as well as without

in zombiemode_utility.gsc - youll find this function

check_point_in_active_zone( origin )
{
player_zones = GetEntArray( "player_zone", "script_noteworthy" );
if( !isDefined( level.zones ) || !isDefined( player_zones ) )
{
return true;
}

scr_org = spawn( "script_origin", origin+(0, 0, 40) );

one_valid_zone = false;
for( i = 0; i < player_zones.size; i++ )
{
if( scr_org isTouching( player_zones[i] ) )
{
if( isDefined( level.zones[player_zones[i].targetname] ) &&
isDefined( level.zones[player_zones[i].targetname].is_enabled ) )
{
one_valid_zone = true;
}
}
}

return one_valid_zone;
}


Not only do they spawn a script_origin that they dont delete - meaning every time this function is called another ent is created and lost

They also check if is_enabled "is Defined" - but not if its "true" - so this will always return true even if the zone "isnt" active...

Replace it with this :

check_point_in_active_zone( origin )
{
player_zones = GetEntArray( "player_zone", "script_noteworthy" );
if( !isDefined( level.zones ) || !isDefined( player_zones ) )
return true;

scr_org = spawn( "script_origin", origin + ( 0, 0, 40 ) );

one_valid_zone = false;
for( i = 0; i < player_zones.size; i++ )
{
if( scr_org isTouching( player_zones[ i ] ) )
{
if( isDefined( level.zones[ player_zones[ i ].targetname ] ) && isDefined( level.zones[ player_zones[ i ].targetname ].is_enabled ) && level.zones[ player_zones[ i ].targetname ].is_enabled )
one_valid_zone = true;

}
}
scr_org delete();
return one_valid_zone;
}
broken avatar :(
×
broken avatar :(
Location: no
Date Registered: 4 April 2014
Last active: 101 days ago
Posts
68
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
Signature
Raatn
×
mala15's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
mala15's Contact & Social Links
Nice, great find!

Do you know when and how often that function is used?
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 22 days ago
Posts
6,879
Respect
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
Nice, great find!

Do you know when and how often that function is used?
in my perks? A lot

treyarchs, prob quite a bit but off hand can only think of monkey bombs
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 3 days ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
Great find harry! +1.
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 11 days ago
Posts
1,863
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
I just found this in treyarchs stupid ass code...

Explains why people had GSpawn errors with my  perks, as well as without

in zombiemode_utility.gsc - youll find this function

check_point_in_active_zone( origin )
{
player_zones = GetEntArray( "player_zone", "script_noteworthy" );
if( !isDefined( level.zones ) || !isDefined( player_zones ) )
{
return true;
}

scr_org = spawn( "script_origin", origin+(0, 0, 40) );

one_valid_zone = false;
for( i = 0; i < player_zones.size; i++ )
{
if( scr_org isTouching( player_zones[i] ) )
{
if( isDefined( level.zones[player_zones[i].targetname] ) &&
isDefined( level.zones[player_zones[i].targetname].is_enabled ) )
{
one_valid_zone = true;
}
}
}

return one_valid_zone;
}


Not only do they spawn a script_origin that they dont delete - meaning every time this function is called another ent is created and lost

They also check if is_enabled "is Defined" - but not if its "true" - so this will always return true even if the zone "isnt" active...

Replace it with this :

check_point_in_active_zone( origin )
{
player_zones = GetEntArray( "player_zone", "script_noteworthy" );
if( !isDefined( level.zones ) || !isDefined( player_zones ) )
return true;

scr_org = spawn( "script_origin", origin + ( 0, 0, 40 ) );

one_valid_zone = false;
for( i = 0; i < player_zones.size; i++ )
{
if( scr_org isTouching( player_zones[ i ] ) )
{
if( isDefined( level.zones[ player_zones[ i ].targetname ] ) && isDefined( level.zones[ player_zones[ i ].targetname ].is_enabled ) && level.zones[ player_zones[ i ].targetname ].is_enabled )
one_valid_zone = true;

}
}
scr_org delete();
return one_valid_zone;
}

And this script is from the same people, who the person who shall not be mentioned said have no issues in their scripts, and we are to blame for any bugs.. ::)

+1 though, now we have a working function for checking active zones. :D
Last Edit: July 27, 2016, 09:52:10 am by Scobalula
broken avatar :(
×
broken avatar :(
Location: auMandurah
Date Registered: 3 January 2016
Last active: 129 days ago
Posts
110
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
;)
Signature
×
PlutoBro's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
PlutoBro's Contact & Social Linksbro_maho_101PlutoBroPlutoBroPlutoBrobt100101
I just found this in treyarchs stupid ass code...

Explains why people had GSpawn errors with my  perks, as well as without

in zombiemode_utility.gsc - youll find this function

check_point_in_active_zone( origin )
{
player_zones = GetEntArray( "player_zone", "script_noteworthy" );
if( !isDefined( level.zones ) || !isDefined( player_zones ) )
{
return true;
}

scr_org = spawn( "script_origin", origin+(0, 0, 40) );

one_valid_zone = false;
for( i = 0; i < player_zones.size; i++ )
{
if( scr_org isTouching( player_zones[i] ) )
{
if( isDefined( level.zones[player_zones[i].targetname] ) &&
isDefined( level.zones[player_zones[i].targetname].is_enabled ) )
{
one_valid_zone = true;
}
}
}

return one_valid_zone;
}


Not only do they spawn a script_origin that they dont delete - meaning every time this function is called another ent is created and lost

They also check if is_enabled "is Defined" - but not if its "true" - so this will always return true even if the zone "isnt" active...

Replace it with this :

check_point_in_active_zone( origin )
{
player_zones = GetEntArray( "player_zone", "script_noteworthy" );
if( !isDefined( level.zones ) || !isDefined( player_zones ) )
return true;

scr_org = spawn( "script_origin", origin + ( 0, 0, 40 ) );

one_valid_zone = false;
for( i = 0; i < player_zones.size; i++ )
{
if( scr_org isTouching( player_zones[ i ] ) )
{
if( isDefined( level.zones[ player_zones[ i ].targetname ] ) && isDefined( level.zones[ player_zones[ i ].targetname ].is_enabled ) && level.zones[ player_zones[ i ].targetname ].is_enabled )
one_valid_zone = true;

}
}
scr_org delete();
return one_valid_zone;
}

Great find harry! Good work fixing.

And this script is from the same people, who the person who shall not be mentioned said have no issues in their scripts, and we are to blame for any bugs.. ::)

+1 though, now we have a working function for checking active zones. :D

Even the biggest of companies have bad/badly written scripts. Can be a result of many things. "He who shall not be named" sounds like a Harry Potter thing.
broken avatar :(
×
broken avatar :(
Location: seDesert..
Date Registered: 22 May 2015
Last active: 43 days ago
Posts
29
Respect
Forum Rank
Legless Crawler
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
The Samantha Project
×
Sebra's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Sebra's Contact & Social LinksMcfu34mcfu34Sebraa
Awesome +1
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 6 days ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: [You are not allowed to view external links. Register or Login to see them]
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social Linksalaurenc9xSanchez78xSanchez78xSanchez78
Lol I found this too a while back, amazing how they managed to fuck this though. But they fixed it in BO1, doesn't suprise me.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 22 days ago
Posts
6,879
Respect
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
Lol I found this too a while back, amazing how they managed to fuck this though. But they fixed it in BO1, doesn't suprise me.
somehow i knew you were going to say that

 

Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Twitch
Loading ...