UGX-Mods 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 Facebook
Sign In with Twitch

G-Spawn Bug

broken avatar :(
Created 8 years ago
by Harry Bo21
0 Members and 1 Guest are viewing this topic.
4,481 views
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
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

Code Snippet
Plaintext
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 :

Code Snippet
Plaintext
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: 2 years ago
Posts
69
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: 4 years ago
Posts
6,877
Respect
1,004Add +1
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: 2 years 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: 1 year ago
Posts
1,864
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

Code Snippet
Plaintext
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 :

Code Snippet
Plaintext
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: 2 years 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

Code Snippet
Plaintext
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 :

Code Snippet
Plaintext
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: 4 years 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: 8 months 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: www.steamcommunity.com/id/xSanchez78
×
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 LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
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: 4 years ago
Posts
6,877
Respect
1,004Add +1
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

 
Loading ...