1 #using scripts\codescripts\struct;
3 #using scripts\shared\util_shared;
5 #insert scripts\shared\shared.gsh;
7 #using scripts\zm\_zm_powerups;
8 #using scripts\zm\_zm_weapons;
10 #namespace zm_utility;
24 self endon(
"death" );
25 self.ignoreTriggers =
true;
34 self.ignoreTriggers =
false;
50 new_score = score - score % 10;
51 if( new_score < score )
62 new_score = score - score % value;
63 if( new_score < score )
72 n_score = n_score / 2;
84 if ( !isdefined( model ) )
86 model = weapon.worldModel;
89 weapon_model =
spawn( localClientNum, origin,
"script_model" );
90 if ( isdefined( angles ) )
92 weapon_model.angles = angles;
95 if (isdefined(options))
97 weapon_model useweaponmodel( weapon, model, options );
101 weapon_model useweaponmodel( weapon, model );
109 weapon_model =
spawn( localClientNum, origin,
"script_model" );
110 if ( isdefined( angles ) )
112 weapon_model.angles = angles;
127 b_is_gametype_active =
false;
129 if ( !IsArray( a_gametypes ) )
131 a_gametypes = Array( a_gametypes );
134 for ( i = 0; i < a_gametypes.size; i++ )
136 if ( GetDvarString(
"g_gametype" ) == a_gametypes[ i ] )
138 b_is_gametype_active =
true;
142 return b_is_gametype_active;
152 if ( IsSpectating( localClientNum ) )
156 SetUIModelValue( CreateUIModel( GetUIModelForController( localClientNum ),
"zmInventory." + fieldName ), newVal );
162 SetUIModelValue( CreateUIModel( GetUIModelForController( localClientNum ),
"zmInventory." + fieldName ), newVal );
165 function zm_ui_infotext( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
169 SetUIModelValue( CreateUIModel( GetUIModelForController( localClientNum ),
"zmInventory.infoText" ), fieldName );
173 SetUIModelValue( CreateUIModel( GetUIModelForController( localClientNum ),
"zmInventory.infoText" ),
"" );
179 self endon(
"disconnect" );
180 self endon(
"entityshutdown" );
182 umbra_settometrigger( localClientNum,
"" );
187 if( isdefined( level.custom_umbra_hotfix ) )
189 in_fix_area =
self thread [[level.custom_umbra_hotfix]]( localClientNum );
193 if( in_fix_area == 0 )
195 umbra_settometrigger( localClientNum,
"" );
204 topY = pos[2] + height;
206 if( (
self.origin[2] > bottomY) && (
self.origin[2] < topY) )
208 if( Distance2dSquared(
self.origin, pos) < radius*radius )
211 umbra_settometrigger( localClientNum, umbra_name );