From 272a52cdf6639ea31aa0e8f0d76c651731f3e0db Mon Sep 17 00:00:00 2001 From: JezuzLizard Date: Thu, 23 Jul 2020 07:27:39 -0700 Subject: [PATCH] replaced several isdefined( condition ) && condition with is_true() Also added the corresponding include if it was missing. --- patch_mp/codescripts/struct.gsc | 2 +- patch_mp/maps/mp/_ballistic_knife.gsc | 2 +- patch_mp/maps/mp/_mgturret.gsc | 2 +- patch_mp/maps/mp/bots/_bot.gsc | 2 +- patch_mp/maps/mp/bots/_bot_combat.gsc | 16 ++++++++-------- patch_mp/maps/mp/bots/_bot_sd.gsc | 2 +- patch_mp/maps/mp/gametypes/_battlechatter_mp.gsc | 2 +- patch_mp/maps/mp/gametypes/_callbacksetup.gsc | 3 ++- patch_mp/maps/mp/gametypes/_class.gsc | 10 ++++------ patch_mp/maps/mp/gametypes/_copter.gsc | 4 +++- patch_mp/maps/mp/gametypes/_gameobjects.gsc | 16 ++++++++-------- patch_mp/maps/mp/gametypes/_globallogic.gsc | 4 ++-- .../maps/mp/gametypes/_globallogic_actor.gsc | 3 ++- .../maps/mp/gametypes/_globallogic_audio.gsc | 3 ++- .../maps/mp/gametypes/_globallogic_player.gsc | 16 ++++++++-------- .../maps/mp/gametypes/_globallogic_score.gsc | 8 ++++---- .../maps/mp/gametypes/_globallogic_spawn.gsc | 6 +++--- patch_mp/maps/mp/gametypes/_globallogic_ui.gsc | 6 +++--- .../maps/mp/gametypes/_globallogic_vehicle.gsc | 3 ++- patch_mp/maps/mp/gametypes/_healthoverlay.gsc | 3 ++- patch_mp/maps/mp/gametypes/_hud_message.gsc | 7 ++++--- patch_mp/maps/mp/gametypes/_killcam.gsc | 3 ++- patch_mp/maps/mp/gametypes/_persistence.gsc | 13 +++++++------ patch_mp/maps/mp/gametypes/_rank.gsc | 8 ++++---- patch_mp/maps/mp/gametypes/_spawning.gsc | 6 +++--- patch_mp/maps/mp/gametypes/_wager.gsc | 14 +++++++------- patch_mp/maps/mp/gametypes/_weaponobjects.gsc | 16 ++++++++-------- patch_mp/maps/mp/gametypes/ctf.gsc | 7 ++++--- patch_mp/maps/mp/gametypes/dem.gsc | 4 ++-- patch_mp/maps/mp/gametypes/gun.gsc | 3 ++- patch_mp/maps/mp/gametypes/oic.gsc | 2 +- patch_mp/maps/mp/gametypes/oneflag.gsc | 7 ++++--- patch_mp/maps/mp/gametypes/sd.gsc | 4 ++-- 33 files changed, 109 insertions(+), 98 deletions(-) diff --git a/patch_mp/codescripts/struct.gsc b/patch_mp/codescripts/struct.gsc index b6d2b96..71b5502 100644 --- a/patch_mp/codescripts/struct.gsc +++ b/patch_mp/codescripts/struct.gsc @@ -13,7 +13,7 @@ createstruct() //checked matches cerberus output findstruct( position ) //checked changed to match cerberus output see info.md { - foreach ( _ in level.struct_class_names ) + foreach ( key in level.struct_class_names ) { foreach ( s_array in level.struct_class_names[ key ] ) { diff --git a/patch_mp/maps/mp/_ballistic_knife.gsc b/patch_mp/maps/mp/_ballistic_knife.gsc index d6d17c1..e8b0fd5 100644 --- a/patch_mp/maps/mp/_ballistic_knife.gsc +++ b/patch_mp/maps/mp/_ballistic_knife.gsc @@ -79,7 +79,7 @@ wait_to_show_glowing_model( prey ) //checked matches cerberus output self.glowing_model = glowing_retrievable_model; glowing_retrievable_model.angles = self.angles; glowing_retrievable_model linkto( self ); - if ( isDefined( prey ) && !isalive( prey ) ) + if ( !is_true( prey ) ) { wait 2; } diff --git a/patch_mp/maps/mp/_mgturret.gsc b/patch_mp/maps/mp/_mgturret.gsc index 0f249f2..5ab3ee2 100644 --- a/patch_mp/maps/mp/_mgturret.gsc +++ b/patch_mp/maps/mp/_mgturret.gsc @@ -184,7 +184,7 @@ burst_fire_unmanned() //checked changed at own discretion self endon( "death" ); self endon( "remote_start" ); level endon( "game_ended" ); - if ( isDefined( self.controlled ) && self.controlled ) + if ( is_true( self.controlled ) ) { return; } diff --git a/patch_mp/maps/mp/bots/_bot.gsc b/patch_mp/maps/mp/bots/_bot.gsc index 20d1d49..2764f0b 100644 --- a/patch_mp/maps/mp/bots/_bot.gsc +++ b/patch_mp/maps/mp/bots/_bot.gsc @@ -1120,7 +1120,7 @@ bot_has_radar() //checked changed at own discretion { return 1; } - if ( isDefined( self.hasspyplane ) && self.hasspyplane || isDefined( self.hassatellite ) && self.hassatellite) + if ( is_true( self.hasspyplane ) || is_true( self.hassatellite ) ) { return 1; } diff --git a/patch_mp/maps/mp/bots/_bot_combat.gsc b/patch_mp/maps/mp/bots/_bot_combat.gsc index 7e2c055..d67e1a2 100644 --- a/patch_mp/maps/mp/bots/_bot_combat.gsc +++ b/patch_mp/maps/mp/bots/_bot_combat.gsc @@ -128,11 +128,11 @@ threat_dead() //checked changed at own discretion if ( bot_has_enemy() ) { ent = self.bot.threat.entity; - if ( threat_is_turret() && isDefined( ent.dead ) && ent.dead ) + if ( threat_is_turret() && is_true( ent.dead ) ) { return 1; } - if ( threat_is_qrdrone() && isDefined( ent.crash_accel ) && ent.crash_accel ) + if ( threat_is_qrdrone() && is_true( ent.crash_accel ) ) { return 1; } @@ -319,7 +319,7 @@ bot_combat_main() //checked partially changed to match cerberus output changed a self allowattack( 0 ); } } - if ( isDefined( self.stingerlockstarted ) && self.stingerlockstarted ) + if ( is_true( self.stingerlockstarted ) ) { self allowattack( self.stingerlockfinalized ); return; @@ -703,12 +703,12 @@ bot_best_enemy() //checked partially changed to match cerberus output did not ch } if ( enemies[ i ].classname == "auto_turret" ) { - if ( isDefined( enemies[ i ].dead ) && enemies[ i ].dead || isDefined( enemies[ i ].carried ) && enemies[ i ].carried ) + if ( isDefined( enemies[ i ].dead ) && enemies[ i ].dead || is_true( enemies[ i ].carried ) ) { i++; continue; } - if ( isDefined( enemies[ i ].turret_active ) && !enemies[ i ].turret_active ) + if ( !is_true( enemies[ i ].turret_active ) ) { i++; continue; @@ -722,7 +722,7 @@ bot_best_enemy() //checked partially changed to match cerberus output did not ch continue; } origin = self getplayercamerapos(); - angles = vectorToAngle( enemies[ i ].origin - origin ); + angles = vectorToAngles( enemies[ i ].origin - origin ); if ( angles[ 0 ] < 290 ) { threat_ignore( enemies[ i ], 3.5 ); @@ -1650,11 +1650,11 @@ bot_turret_set_dangerous( turret ) //checked partially changed to match cerberus { return; } - if ( isDefined( turret.dead ) && turret.dead || isDefined( turret.carried ) && turret.carried ) + if ( is_true( turret.dead ) || is_true( turret.carried ) ) { return; } - if ( isDefined( turret.turret_active ) && !turret.turret_active ) + if ( !is_true( turret.turret_active ) ) { return; } diff --git a/patch_mp/maps/mp/bots/_bot_sd.gsc b/patch_mp/maps/mp/bots/_bot_sd.gsc index 6fba7eb..53f49ec 100644 --- a/patch_mp/maps/mp/bots/_bot_sd.gsc +++ b/patch_mp/maps/mp/bots/_bot_sd.gsc @@ -208,7 +208,7 @@ bot_sd_defender( zone, isplanted ) //checked partially changed to match cerberus continue; } height = node[ i ].origin[ 2 ] - zone.nearest_node.origin[ 2 ]; - if ( isDefined( isplanted ) && isplanted ) + if ( is_true( isplanted ) ) { dist = distance2d( node[ i ].origin, zone.nearest_node.origin ); score = ( 10000 - dist ) + height; diff --git a/patch_mp/maps/mp/gametypes/_battlechatter_mp.gsc b/patch_mp/maps/mp/gametypes/_battlechatter_mp.gsc index 7a2d281..a159c3a 100644 --- a/patch_mp/maps/mp/gametypes/_battlechatter_mp.gsc +++ b/patch_mp/maps/mp/gametypes/_battlechatter_mp.gsc @@ -801,7 +801,7 @@ saykillbattlechatter( attacker, sweapon, victim ) //checked changed to match cer { return; } - if ( isDefined( victim.issniperspotted ) && victim.issniperspotted && randomintrange( 0, 100 ) >= level.bckillinformprobability ) + if ( is_true( victim.issniperspotted ) && randomintrange( 0, 100 ) >= level.bckillinformprobability ) { level thread saylocalsounddelayed( attacker, "kill", "sniper", 0.75 ); victim.issniperspotted = 0; diff --git a/patch_mp/maps/mp/gametypes/_callbacksetup.gsc b/patch_mp/maps/mp/gametypes/_callbacksetup.gsc index 485ecee..a435745 100644 --- a/patch_mp/maps/mp/gametypes/_callbacksetup.gsc +++ b/patch_mp/maps/mp/gametypes/_callbacksetup.gsc @@ -5,6 +5,7 @@ #include maps/mp/gametypes/_globallogic; #include maps/mp/_audio; #include maps/mp/_utility; +#include common_scripts/utility; codecallback_startgametype() //checked matches cerberus output { @@ -111,7 +112,7 @@ codecallback_vehicleradiusdamage( einflictor, eattacker, idamage, finnerdamage, codecallback_faceeventnotify( notify_msg, ent ) //checked matches cerberus output { - if ( isDefined( ent ) && isDefined( ent.do_face_anims ) && ent.do_face_anims ) + if ( isDefined( ent ) && is_true( ent.do_face_anims ) ) { if ( isDefined( level.face_event_handler ) && isDefined( level.face_event_handler.events[ notify_msg ] ) ) { diff --git a/patch_mp/maps/mp/gametypes/_class.gsc b/patch_mp/maps/mp/gametypes/_class.gsc index ab2e570..98e8a8d 100644 --- a/patch_mp/maps/mp/gametypes/_class.gsc +++ b/patch_mp/maps/mp/gametypes/_class.gsc @@ -404,14 +404,14 @@ givekillstreaks( classnum ) //checked changed to match cerberus output if ( isDefined( level.tbl_killstreakdata[ killstreakindex ] ) ) { self.killstreak[ currentkillstreak ] = level.tbl_killstreakdata[ killstreakindex ]; - if ( isDefined( level.usingmomentum ) && level.usingmomentum ) + if ( is_true( level.usingmomentum ) ) { killstreaktype = maps/mp/killstreaks/_killstreaks::getkillstreakbymenuname( self.killstreak[ currentkillstreak ] ); if ( isDefined( killstreaktype ) ) { weapon = maps/mp/killstreaks/_killstreaks::getkillstreakweapon( killstreaktype ); self giveweapon( weapon ); - if ( isDefined( level.usingscorestreaks ) && level.usingscorestreaks ) + if ( is_true( level.usingscorestreaks ) ) { if ( maps/mp/killstreaks/_killstreak_weapons::isheldkillstreakweapon( weapon ) ) { @@ -469,13 +469,11 @@ givekillstreaks( classnum ) //checked changed to match cerberus output actionslotorder[ 0 ] = 4; actionslotorder[ 1 ] = 2; actionslotorder[ 2 ] = 1; - while ( isDefined( level.usingmomentum ) && level.usingmomentum ) + if( is_true( level.usingmomentum ) ) { - sortindex = 0; - while ( sortindex < sortedkillstreaks.size && sortindex < actionslotorder.size ) + for ( sortIndex = 0 ; (sortIndex < sortedKillstreaks.size && sortIndex < actionSlotOrder.size) ; sortIndex++ ) { self setactionslot( actionslotorder[ sortindex ], "weapon", sortedkillstreaks[ sortindex ].weapon ); - sortindex++; } } } diff --git a/patch_mp/maps/mp/gametypes/_copter.gsc b/patch_mp/maps/mp/gametypes/_copter.gsc index 3ae8390..d87cf0e 100644 --- a/patch_mp/maps/mp/gametypes/_copter.gsc +++ b/patch_mp/maps/mp/gametypes/_copter.gsc @@ -1,4 +1,6 @@ //checked no includes +//added for is_true check +#include common_scripts/utility; init() //checked changed to match cerberus output { @@ -549,7 +551,7 @@ mymagicbullet( pos, dir ) //checked matches cerberus output dvars found in beta setcopterdest( newlocation, descend, dontascend ) //checked matches cerberus output { self.finaldest = getabovebuildingslocation( newlocation ); - if ( isDefined( descend ) && descend ) + if ( is_true( descend ) ) { self.finalzdest = newlocation[ 2 ]; } diff --git a/patch_mp/maps/mp/gametypes/_gameobjects.gsc b/patch_mp/maps/mp/gametypes/_gameobjects.gsc index 46e81ca..e80ea16 100644 --- a/patch_mp/maps/mp/gametypes/_gameobjects.gsc +++ b/patch_mp/maps/mp/gametypes/_gameobjects.gsc @@ -43,7 +43,7 @@ main( allowed ) //checked changed to match cerberus output entity_is_allowed( entity, allowed_game_modes ) //checked changed to match cerberus output { - if ( isDefined( level.createfx_enabled ) && level.createfx_enabled ) + if ( is_true( level.createfx_enabled ) ) { return 1; } @@ -293,7 +293,7 @@ carryobjectusethink() //checked changed to match cerberus output { continue; } - if ( isDefined( player.laststand ) && player.laststand ) + if ( is_true( player.laststand ) ) { continue; } @@ -344,7 +344,7 @@ carryobjectproxthink() //checked changed to match cerberus output { continue; } - if ( isDefined( player.laststand ) && player.laststand ) + if ( is_true( player.laststand ) ) { continue; } @@ -1713,7 +1713,7 @@ useholdthink( player ) //checked changed to match cerberus output { player thread takeuseweapon( useweapon ); } - if ( isDefined( result ) && result ) + if ( is_true( result ) ) { return 1; } @@ -1778,7 +1778,7 @@ continueholdthinkloop( player, waitforweapon, timedout, usetime ) //checked matc { return 0; } - if ( isDefined( player.laststand ) && player.laststand ) + if ( is_true( player.laststand ) ) { return 0; } @@ -2475,7 +2475,7 @@ destroyobject( deletetrigger, forcehide ) //checked changed to match cerberus ou disableobject( forcehide ) //checked changed to match cerberus output { self notify( "disabled" ); - if ( self.type == "carryObject" || isDefined( forcehide ) && forcehide ) + if ( self.type == "carryObject" || is_true( forcehide ) ) { if ( isDefined( self.carrier ) ) { @@ -2492,7 +2492,7 @@ disableobject( forcehide ) //checked changed to match cerberus output enableobject( forceshow ) //checked changed to match cerberus output { - if ( self.type == "carryObject" || isDefined( forceshow ) && forceshow ) + if ( self.type == "carryObject" || is_true( forceshow ) ) { for ( index = 0; index < self.visuals.size; index++ ) { @@ -2579,7 +2579,7 @@ caninteractwith( player ) //checked changed to match beta dump { return 1; } - else if ( isDefined( self.decayprogress ) && self.decayprogress && self.curprogress > 0 ) + else if ( is_true( self.decayprogress ) && self.curprogress > 0 ) { return 1; } diff --git a/patch_mp/maps/mp/gametypes/_globallogic.gsc b/patch_mp/maps/mp/gametypes/_globallogic.gsc index 8e2e289..b844b82 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic.gsc @@ -1269,7 +1269,7 @@ startNextRound( winner, endReasonText ) //checked matches bo3 _globallogic.gsc w displayRoundSwitch( winner, endReasonText ); } - if ( IsDefined( level.nextRoundIsOvertime ) && level.nextRoundIsOvertime ) + if ( is_true( level.nextRoundIsOvertime ) ) { if ( !IsDefined( game["overtime_round"] ) ) { @@ -1675,7 +1675,7 @@ roundEndDOF( time ) //checked matches bo3 _globallogic.gsc within reason checkTimeLimit() //checked matches bo3 _globallogic.gsc within reason { - if ( isDefined( level.timeLimitOverride ) && level.timeLimitOverride ) + if ( is_true( level.timeLimitOverride ) ) return; if ( game["state"] != "playing" ) diff --git a/patch_mp/maps/mp/gametypes/_globallogic_actor.gsc b/patch_mp/maps/mp/gametypes/_globallogic_actor.gsc index ef4983d..5fc7cba 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic_actor.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic_actor.gsc @@ -7,6 +7,7 @@ #include maps/mp/gametypes/_globallogic_utils; #include maps/mp/gametypes/_globallogic_player; #include maps/mp/_utility; +#include common_scripts/utility; callback_actordamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime, boneindex ) //checked changed to match cerberus output { @@ -18,7 +19,7 @@ callback_actordamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sw { return; } - if ( isDefined( eattacker ) && isplayer( eattacker ) && isDefined( eattacker.candocombat ) && !eattacker.candocombat ) + if ( isDefined( eattacker ) && isplayer( eattacker ) && !is_true( eattacker.candocombat ) ) { return; } diff --git a/patch_mp/maps/mp/gametypes/_globallogic_audio.gsc b/patch_mp/maps/mp/gametypes/_globallogic_audio.gsc index 8b2dd70..456be6c 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic_audio.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic_audio.gsc @@ -3,6 +3,7 @@ #include maps/mp/gametypes/_globallogic_audio; #include maps/mp/gametypes/_globallogic_utils; #include maps/mp/_utility; +#include common_scripts/utility; init() //checked matches cerberus output { @@ -562,7 +563,7 @@ playnextleaderdialog() //checked changed to match cerberus output { self endon( "disconnect" ); self endon( "flush_dialog" ); - if ( isDefined( level.allowannouncer ) && !level.allowannouncer ) + if ( !is_true( level.allowannouncer ) ) { return; } diff --git a/patch_mp/maps/mp/gametypes/_globallogic_player.gsc b/patch_mp/maps/mp/gametypes/_globallogic_player.gsc index ef3d6fb..d8b2d57 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic_player.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic_player.gsc @@ -264,15 +264,15 @@ callback_playerconnect() //checked partially changed to match cerberus output pa { self.pers[ "killstreaksEarnedThisKillstreak" ] = 0; } - if ( isDefined( level.usingscorestreaks ) && level.usingscorestreaks && !isDefined( self.pers[ "killstreak_quantity" ] ) ) + if ( is_true( level.usingscorestreaks ) && !isDefined( self.pers[ "killstreak_quantity" ] ) ) { self.pers[ "killstreak_quantity" ] = []; } - if ( isDefined( level.usingscorestreaks ) && level.usingscorestreaks && !isDefined( self.pers[ "held_killstreak_ammo_count" ] ) ) + if ( is_true( level.usingscorestreaks ) && !isDefined( self.pers[ "held_killstreak_ammo_count" ] ) ) { self.pers[ "held_killstreak_ammo_count" ] = []; } - if ( isDefined( level.usingscorestreaks ) && level.usingscorestreaks && !isDefined( self.pers[ "held_killstreak_clip_count" ] ) ) + if ( is_true( level.usingscorestreaks ) && !isDefined( self.pers[ "held_killstreak_clip_count" ] ) ) { self.pers[ "held_killstreak_clip_count" ] = []; } @@ -507,7 +507,7 @@ callback_playermigrated() //checked matches cerberus output println( "Player " + self.name + " finished migrating at time " + getTime() ); #/ */ - if ( isDefined( self.connected ) && self.connected ) + if ( is_true( self.connected ) ) { self maps/mp/gametypes/_globallogic_ui::updateobjectivetext(); } @@ -758,11 +758,11 @@ callback_playerdamage( einflictor, eattacker, idamage, idflags, smeansofdeath, s { return; } - if ( isDefined( self.candocombat ) && !self.candocombat ) + if ( !is_true( self.candocombat ) ) { return; } - if ( isDefined( eattacker ) && isplayer( eattacker ) && isDefined( eattacker.candocombat ) && !eattacker.candocombat ) + if ( isDefined( eattacker ) && isplayer( eattacker ) && !is_true( eattacker.candocombat ) ) { return; } @@ -2123,7 +2123,7 @@ callback_playerkilled( einflictor, attacker, idamage, smeansofdeath, sweapon, vd vattackerorigin = attacker.origin; } ragdoll_now = 0; - if ( isDefined( self.usingvehicle ) && self.usingvehicle && isDefined( self.vehicleposition ) && self.vehicleposition == 1 ) + if ( is_true( self.usingvehicle ) && isDefined( self.vehicleposition ) && self.vehicleposition == 1 ) { ragdoll_now = 1; } @@ -2766,7 +2766,7 @@ getkillcamentity( attacker, einflictor, sweapon ) //checked changed to match cer { return undefined; } - if ( isDefined( einflictor.ismagicbullet ) && !einflictor.ismagicbullet ) + if ( !is_true( einflictor.ismagicbullet ) ) { return undefined; } diff --git a/patch_mp/maps/mp/gametypes/_globallogic_score.gsc b/patch_mp/maps/mp/gametypes/_globallogic_score.gsc index bffbb26..be500f4 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic_score.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic_score.gsc @@ -266,7 +266,7 @@ roundtonearestfive( score ) //checked matches cerberus output giveplayermomentumnotification( score, label, descvalue, countstowardrampage ) //checked matches cerberus output { rampagebonus = 0; - if ( isDefined( level.usingrampage ) && level.usingrampage ) + if ( is_true( level.usingrampage ) ) { if ( countstowardrampage ) { @@ -300,7 +300,7 @@ giveplayermomentumnotification( score, label, descvalue, countstowardrampage ) / resetplayermomentumonspawn() //checked matches cerberus output { - if ( isDefined( level.usingscorestreaks ) && level.usingscorestreaks ) + if ( is_true( level.usingscorestreaks ) ) { _setplayermomentum( self, 0 ); self thread resetscorechain(); @@ -531,7 +531,7 @@ _giveplayerkillstreakinternal( player, momentum, oldmomentum, killstreaktypearra if ( momentumcost > oldmomentum && momentumcost <= momentum ) { weapon = maps/mp/killstreaks/_killstreaks::getkillstreakweapon( killstreaktype ); - if ( isDefined( level.usingscorestreaks ) && level.usingscorestreaks ) + if ( is_true( level.usingscorestreaks ) ) { if ( maps/mp/killstreaks/_killstreak_weapons::isheldkillstreakweapon( weapon ) ) { @@ -893,7 +893,7 @@ incpersstat( dataname, increment, record_stats, includegametype ) //checked matc { pixbeginevent( "incPersStat" ); self.pers[ dataname ] += increment; - if ( isDefined( includegametype ) && includegametype ) + if ( is_true( includegametype ) ) { self addplayerstatwithgametype( dataname, increment ); } diff --git a/patch_mp/maps/mp/gametypes/_globallogic_spawn.gsc b/patch_mp/maps/mp/gametypes/_globallogic_spawn.gsc index 3821fd2..5167548 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic_spawn.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic_spawn.gsc @@ -167,7 +167,7 @@ spawnplayerprediction() //checked matches cerberus output dvar taken from beta d doinitialspawnmessaging() //checked changed to match cerberus output { self endon( "disconnect" ); - if ( isDefined( level.disableprematchmessages ) && level.disableprematchmessages ) + if ( is_true( level.disableprematchmessages ) ) { return; } @@ -616,7 +616,7 @@ spawnintermission( usedefaultcallback ) //checked matches cerberus output self.archivetime = 0; self.psoffsettime = 0; self.friendlydamage = undefined; - if ( isDefined( usedefaultcallback ) && usedefaultcallback ) + if ( is_true( usedefaultcallback ) ) { maps/mp/gametypes/_globallogic_defaults::default_onspawnintermission(); } @@ -709,7 +709,7 @@ shouldshowrespawnmessage() //checked matches cerberus output { return 0; } - if ( isDefined( level.livesdonotreset ) && level.livesdonotreset ) + if ( is_true( level.livesdonotreset ) ) { return 0; } diff --git a/patch_mp/maps/mp/gametypes/_globallogic_ui.gsc b/patch_mp/maps/mp/gametypes/_globallogic_ui.gsc index ccbe364..e867d60 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic_ui.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic_ui.gsc @@ -178,7 +178,7 @@ menuautoassign( comingfrommenu ) //checked changed to match cerberus output teamkeys = getarraykeys( level.teams ); assignment = teamkeys[ randomint( teamkeys.size ) ]; self closemenus(); - if ( isDefined( level.forceallallies ) && level.forceallallies ) + if ( is_true( level.forceallallies ) ) { assignment = "allies"; } @@ -512,13 +512,13 @@ showmainmenuforteam() //checked matches cerberus output menuteam( team ) //checked changed to match cerberus output { self closemenus(); - if ( !level.console && level.allow_teamchange == "0" && isDefined( self.hasdonecombat ) && self.hasdonecombat ) + if ( !level.console && level.allow_teamchange == "0" && is_true( self.hasdonecombat ) ) { return; } if ( self.pers[ "team" ] != team ) { - if ( level.ingraceperiod || !isDefined( self.hasdonecombat ) && !self.hasdonecombat ) + if ( level.ingraceperiod && !isDefined( self.hasdonecombat ) || !self.hasdonecombat ) { self.hasspawned = 0; } diff --git a/patch_mp/maps/mp/gametypes/_globallogic_vehicle.gsc b/patch_mp/maps/mp/gametypes/_globallogic_vehicle.gsc index c4a14cc..b35c4f4 100644 --- a/patch_mp/maps/mp/gametypes/_globallogic_vehicle.gsc +++ b/patch_mp/maps/mp/gametypes/_globallogic_vehicle.gsc @@ -5,6 +5,7 @@ #include maps/mp/_vehicles; #include maps/mp/gametypes/_class; #include maps/mp/_utility; +#include common_scripts/utility; callback_vehicledamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime, damagefromunderneath, modelindex, partname ) //checked partially changed to match cerberus output partially changed to match beta dump //changed at own discretion { @@ -18,7 +19,7 @@ callback_vehicledamage( einflictor, eattacker, idamage, idflags, smeansofdeath, { return; } - if ( isDefined( eattacker ) && isplayer( eattacker ) && isDefined( eattacker.candocombat ) && !eattacker.candocombat ) + if ( isDefined( eattacker ) && isplayer( eattacker ) && !is_true( eattacker.candocombat ) ) { return; } diff --git a/patch_mp/maps/mp/gametypes/_healthoverlay.gsc b/patch_mp/maps/mp/gametypes/_healthoverlay.gsc index 6e75ac6..6e04572 100644 --- a/patch_mp/maps/mp/gametypes/_healthoverlay.gsc +++ b/patch_mp/maps/mp/gametypes/_healthoverlay.gsc @@ -1,4 +1,5 @@ #include maps/mp/gametypes/_globallogic_player; +#include common_scripts/utility; init() //checked matches cerberus output { @@ -112,7 +113,7 @@ playerhealthregen() //checked changed to match cerberus output { return; } - if ( isDefined( player.laststand ) && player.laststand ) + if ( is_true( player.laststand ) ) { continue; } diff --git a/patch_mp/maps/mp/gametypes/_hud_message.gsc b/patch_mp/maps/mp/gametypes/_hud_message.gsc index 0ad4241..3ba1591 100644 --- a/patch_mp/maps/mp/gametypes/_hud_message.gsc +++ b/patch_mp/maps/mp/gametypes/_hud_message.gsc @@ -4,6 +4,7 @@ #include maps/mp/_music; #include maps/mp/gametypes/_hud_message; #include maps/mp/gametypes/_hud_util; +#include common_scripts/utility; init() //checked matches cerberus output { @@ -913,7 +914,7 @@ wageroutcomenotify( winner, endreasontext ) //checked changed to match cerberus spacing = 20; } halftime = 0; - if ( isDefined( level.sidebet ) && level.sidebet ) + if ( is_true( level.sidebet ) ) { halftime = 1; } @@ -1082,7 +1083,7 @@ teamwageroutcomenotify( winner, isroundend, endreasontext ) //checked partially spacing = 15; } halftime = 0; - if ( isDefined( level.sidebet ) && level.sidebet ) + if ( is_true( level.sidebet ) ) { halftime = 1; } @@ -1224,7 +1225,7 @@ teamwageroutcomenotify( winner, isroundend, endreasontext ) //checked partially matchbonus.immunetodemofreecamera = 1; matchbonus.label = game[ "strings" ][ "wager_winnings" ]; matchbonus setvalue( self.wagerwinnings ); - if ( isDefined( game[ "side_bets" ] ) && game[ "side_bets" ] ) + if ( is_true( game[ "side_bets" ] ) ) { sidebetwinnings = createfontstring( font, 2 ); sidebetwinnings setparent( matchbonus ); diff --git a/patch_mp/maps/mp/gametypes/_killcam.gsc b/patch_mp/maps/mp/gametypes/_killcam.gsc index a3cf8b0..1c9d327 100644 --- a/patch_mp/maps/mp/gametypes/_killcam.gsc +++ b/patch_mp/maps/mp/gametypes/_killcam.gsc @@ -5,6 +5,7 @@ #include maps/mp/gametypes/_globallogic; #include maps/mp/gametypes/_hud_util; #include maps/mp/_utility; +#include common_scripts/utility; init() //checked matches cerberus output { @@ -100,7 +101,7 @@ finalkillcamwaiter() //checked matches cerberus output postroundfinalkillcam() //checked matches cerberus output { - if ( isDefined( level.sidebet ) && level.sidebet ) + if ( is_true( level.sidebet ) ) { return; } diff --git a/patch_mp/maps/mp/gametypes/_persistence.gsc b/patch_mp/maps/mp/gametypes/_persistence.gsc index a605b28..31b7205 100644 --- a/patch_mp/maps/mp/gametypes/_persistence.gsc +++ b/patch_mp/maps/mp/gametypes/_persistence.gsc @@ -9,6 +9,7 @@ #include maps/mp/gametypes/_rank; #include maps/mp/gametypes/_class; #include maps/mp/_utility; +#include common_scripts/utility; init() //checked matches cerberus output { @@ -221,7 +222,7 @@ uploadglobalstatcounters() //checked partially changed to match cerberus output statgetwithgametype( dataname ) //checked matches cerberus output { - if ( isDefined( level.nopersistence ) && level.nopersistence ) + if ( is_true( level.nopersistence ) ) { return 0; } @@ -236,7 +237,7 @@ getgametypename() //checked matches cerberus output { if ( !isDefined( level.fullgametypename ) ) { - if ( isDefined( level.hardcoremode ) && level.hardcoremode && ispartygamemode() == 0 ) + if ( is_true( level.hardcoremode ) && ispartygamemode() == 0 ) { prefix = "HC"; } @@ -273,7 +274,7 @@ isstatmodifiable( dataname ) //checked changed at own discretion statsetwithgametype( dataname, value, incvalue ) //checked matches cerberus output { - if ( isDefined( level.nopersistence ) && level.nopersistence ) + if ( is_true( level.nopersistence ) ) { return 0; } @@ -320,7 +321,7 @@ getrecentstat( isglobal, index, statname ) //checked changed to match cerberus o setrecentstat( isglobal, index, statname, value ) //checked matches cerberus output { - if ( isDefined( level.nopersistence ) && level.nopersistence ) + if ( is_true( level.nopersistence ) ) { return; } @@ -355,7 +356,7 @@ setrecentstat( isglobal, index, statname, value ) //checked matches cerberus out addrecentstat( isglobal, index, statname, value ) //checked matches cerberus output { - if ( isDefined( level.nopersistence ) && level.nopersistence ) + if ( is_true( level.nopersistence ) ) { return; } @@ -387,7 +388,7 @@ addmatchhistorystat( statname, value ) //checked matches cerberus output initializematchstats() //checked matches cerberus output { - if ( isDefined( level.nopersistence ) && level.nopersistence ) + if ( is_true( level.nopersistence ) ) { return; } diff --git a/patch_mp/maps/mp/gametypes/_rank.gsc b/patch_mp/maps/mp/gametypes/_rank.gsc index 5d69bf8..70d4579 100644 --- a/patch_mp/maps/mp/gametypes/_rank.gsc +++ b/patch_mp/maps/mp/gametypes/_rank.gsc @@ -148,7 +148,7 @@ initscoreinfo() //checked changed to match cerberus output getrankxpcapped( inrankxp ) //checked matches cerberus output { - if ( isDefined( level.rankxpcap ) && level.rankxpcap && level.rankxpcap <= inrankxp ) + if ( is_true( level.rankxpcap ) && level.rankxpcap <= inrankxp ) { return level.rankxpcap; } @@ -157,7 +157,7 @@ getrankxpcapped( inrankxp ) //checked matches cerberus output getcodpointscapped( incodpoints ) //checked matches cerberus output { - if ( isDefined( level.codpointscap ) && level.codpointscap && level.codpointscap <= incodpoints ) + if ( is_true( level.codpointscap ) && level.codpointscap <= incodpoints ) { return level.codpointscap; } @@ -521,7 +521,7 @@ giverankxp( type, value, devadd ) //checked changed to match cerberus output { self syncxpstat(); } - if ( isDefined( self.enabletext ) && self.enabletext && !level.hardcoremode ) + if ( is_true( self.enabletext ) && !level.hardcoremode ) { if ( type == "teamkill" ) { @@ -650,7 +650,7 @@ updaterankscorehud( amount ) //checked matches cerberus output self endon( "disconnect" ); self endon( "joined_team" ); self endon( "joined_spectators" ); - if ( isDefined( level.usingmomentum ) && level.usingmomentum ) + if ( is_true( level.usingmomentum ) ) { return; } diff --git a/patch_mp/maps/mp/gametypes/_spawning.gsc b/patch_mp/maps/mp/gametypes/_spawning.gsc index b82561e..1f428cd 100644 --- a/patch_mp/maps/mp/gametypes/_spawning.gsc +++ b/patch_mp/maps/mp/gametypes/_spawning.gsc @@ -103,7 +103,7 @@ onplayerspawned() //checked matches cerberus output self maps/mp/killstreaks/_airsupport::clearmonitoredspeed(); self thread initialspawnprotection(); self thread monitorgpsjammer(); - if ( isDefined( self.pers[ "hasRadar" ] ) && self.pers[ "hasRadar" ] ) + if ( is_true( self.pers[ "hasRadar" ] ) ) { self.hasspyplane = 1; } @@ -1006,7 +1006,7 @@ getspawnpoint( player_entity, predictedspawn ) //checked matches cerberus output point_team = "free"; influencer_team = "free"; } - if ( level.teambased && isDefined( game[ "switchedsides" ] ) && game[ "switchedsides" ] && level.spawnsystem.unifiedsideswitching ) + if ( level.teambased && is_true( game[ "switchedsides" ] ) && level.spawnsystem.unifiedsideswitching ) { point_team = getotherteam( point_team ); } @@ -1118,7 +1118,7 @@ gatherspawnentities( player_team ) //checked changed to match cerberus output is_hardcore() //checked changed at own discretion { - if ( isDefined( level.hardcoremode ) && level.hardcoremode ) + if ( is_true( level.hardcoremode ) ) { return 1; } diff --git a/patch_mp/maps/mp/gametypes/_wager.gsc b/patch_mp/maps/mp/gametypes/_wager.gsc index a8c3c58..d3feaae 100644 --- a/patch_mp/maps/mp/gametypes/_wager.gsc +++ b/patch_mp/maps/mp/gametypes/_wager.gsc @@ -58,7 +58,7 @@ initwagerplayer() //checked changed to match cerberus output self.pers[ "wager_sideBetWinnings" ] = 0; self.pers[ "wager_sideBetLosses" ] = 0; } - if ( isDefined( level.inthemoneyonradar ) && level.inthemoneyonradar || isDefined( level.firstplaceonradar ) && level.firstplaceonradar ) + if ( is_true( level.inthemoneyonradar ) || is_true( level.firstplaceonradar ) ) { self.pers[ "hasRadar" ] = 1; self.hasspyplane = 1; @@ -210,7 +210,7 @@ calculatefreeforallpayouts() //checked changed to match cerberus output payoutpercentages = array( 1 ); } setwagerwinningsonplayers( level.players, 0 ); - if ( isDefined( level.hostforcedend ) && level.hostforcedend ) + if ( is_true( level.hostforcedend ) ) { wagerbet = getDvarInt( "scr_wagerBet" ); for ( i = 0; i < playerrankings.size; i++ ) @@ -387,7 +387,7 @@ determinetopearners() //checked changed to match beta dump postroundsidebet() //checked matches cerberus output { - if ( isDefined( level.sidebet ) && level.sidebet ) + if ( is_true( level.sidebet ) ) { level notify( "side_bet_begin" ); level waittill( "side_bet_end" ); @@ -452,7 +452,7 @@ setupblankrandomplayer( takeweapons, chooserandombody, weapon ) //checked change { self takeallweapons(); } - if ( isDefined( self.pers[ "hasRadar" ] ) && self.pers[ "hasRadar" ] ) + if ( is_true( self.pers[ "hasRadar" ] ) ) { self.hasspyplane = 1; } @@ -522,7 +522,7 @@ setradarvisibility() //checked changed to match cerberus output { prevscoreplace = 1; } - if ( isDefined( level.inthemoneyonradar ) && level.inthemoneyonradar ) + if ( is_true( level.inthemoneyonradar ) ) { if ( prevscoreplace <= 3 && isDefined( self.score ) && self.score > 0 ) { @@ -533,7 +533,7 @@ setradarvisibility() //checked changed to match cerberus output self setperk( "specialty_gpsjammer" ); } } - else if ( isDefined( level.firstplaceonradar ) && level.firstplaceonradar ) + else if ( is_true( level.firstplaceonradar ) ) { if ( prevscoreplace == 1 && isDefined( self.score ) && self.score > 0 ) { @@ -691,7 +691,7 @@ pulsepowerupicon( powerupindex ) //checked changed to match cerberus output pulsepercent = 1.5; pulsetime = 0.5; hud_elem = self.powerups[ powerupindex ].hud_elem_icon; - if ( isDefined( hud_elem.animating ) && hud_elem.animating ) + if ( is_true( hud_elem.animating ) ) { return; } diff --git a/patch_mp/maps/mp/gametypes/_weaponobjects.gsc b/patch_mp/maps/mp/gametypes/_weaponobjects.gsc index 4effb6e..46956fa 100644 --- a/patch_mp/maps/mp/gametypes/_weaponobjects.gsc +++ b/patch_mp/maps/mp/gametypes/_weaponobjects.gsc @@ -721,7 +721,7 @@ weaponobjectdamage( watcher ) //checked changed to match cerberus output { self.waschained = 1; } - if ( isDefined( idflags ) && idflags & level.idflags_penetration ) + if ( is_true( idflags ) & level.idflags_penetration ) { self.wasdamagedfrombulletpenetration = 1; } @@ -737,7 +737,7 @@ playdialogondeath( owner ) //checked matches cerberus output owner endon( "disconnect" ); self endon( "hacked" ); self waittill( "death" ); - if ( isDefined( self.playdialog ) && self.playdialog ) + if ( is_true( self.playdialog ) ) { owner maps/mp/gametypes/_globallogic_audio::leaderdialogonplayer( "equipment_destroyed", "item_destroyed" ); } @@ -964,7 +964,7 @@ commononspawnuseweaponobject( watcher, owner ) //checked matches cerberus output { if ( watcher.detectable ) { - if ( isDefined( watcher.ismovable ) && watcher.ismovable ) + if ( is_true( watcher.ismovable ) ) { self thread weaponobjectdetectionmovable( owner.pers[ "team" ] ); } @@ -1499,15 +1499,15 @@ canhack( player, owner, weapon_check ) //checked matches cerberus output { return 0; } - if ( isDefined( player.isdefusing ) && player.isdefusing ) + if ( is_true( player.isdefusing ) ) { return 0; } - if ( isDefined( player.isplanting ) && player.isplanting ) + if ( is_true( player.isplanting ) ) { return 0; } - if ( isDefined( player.proxbar ) && !player.proxbar.hidden ) + if ( !is_true( player.proxbar ) ) { return 0; } @@ -1535,7 +1535,7 @@ canhack( player, owner, weapon_check ) //checked matches cerberus output { return 0; } - if ( isDefined( player.laststand ) && player.laststand ) + if ( is_true( player.laststand ) ) { return 0; } @@ -2349,7 +2349,7 @@ watchusetrigger( trigger, callback, playersoundonuse, npcsoundonuse ) //checked } grenade = player.throwinggrenade; isequipment = isweaponequipment( player getcurrentweapon() ); - if ( isDefined( isequipment ) && isequipment ) + if ( is_true( isequipment ) ) { grenade = 0; } diff --git a/patch_mp/maps/mp/gametypes/ctf.gsc b/patch_mp/maps/mp/gametypes/ctf.gsc index 96dec93..97850a4 100644 --- a/patch_mp/maps/mp/gametypes/ctf.gsc +++ b/patch_mp/maps/mp/gametypes/ctf.gsc @@ -16,6 +16,7 @@ #include maps/mp/gametypes/_globallogic; #include maps/mp/gametypes/_hud_util; #include maps/mp/_utility; +#include common_scripts/utility; main() //checked matches cerberus output { @@ -977,7 +978,7 @@ onplayerkilled( einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, shi if ( defendedflag ) { attacker addplayerstatwithgametype( "DEFENDS", 1 ); - if ( isDefined( self.isflagcarrier ) && self.isflagcarrier ) + if ( is_true( self.isflagcarrier ) ) { maps/mp/_scoreevents::processscoreevent( "kill_flag_carrier", attacker, undefined, sweapon ); } @@ -1222,7 +1223,7 @@ ctf_gamemodespawndvars( reset_dvars ) //checked matches cerberus output ctf_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked matches cerberus output { teamkill_penalty = maps/mp/gametypes/_globallogic_defaults::default_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ); - if ( isDefined( self.isflagcarrier ) && self.isflagcarrier ) + if ( is_true( self.isflagcarrier ) ) { teamkill_penalty *= level.teamkillpenaltymultiplier; } @@ -1232,7 +1233,7 @@ ctf_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked ctf_getteamkillscore( einflictor, attacker, smeansofdeath, sweapon ) //checked matches cerberus output { teamkill_score = maps/mp/gametypes/_rank::getscoreinfovalue( "kill" ); - if ( isDefined( self.isflagcarrier ) && self.isflagcarrier ) + if ( is_true( self.isflagcarrier ) ) { teamkill_score *= level.teamkillscoremultiplier; } diff --git a/patch_mp/maps/mp/gametypes/dem.gsc b/patch_mp/maps/mp/gametypes/dem.gsc index f312bb7..4ed211f 100644 --- a/patch_mp/maps/mp/gametypes/dem.gsc +++ b/patch_mp/maps/mp/gametypes/dem.gsc @@ -115,7 +115,7 @@ onprecachegametype() //checked matches cerberus output dem_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked changed to match cerberus output { teamkill_penalty = maps/mp/gametypes/_globallogic_defaults::default_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ); - if ( isDefined( self.isdefusing ) && self.isdefusing || isDefined( self.isplanting ) && self.isplanting ) + if ( is_true( self.isdefusing ) || is_true( self.isplanting ) ) { teamkill_penalty *= level.teamkillpenaltymultiplier; } @@ -125,7 +125,7 @@ dem_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked dem_getteamkillscore( einflictor, attacker, smeansofdeath, sweapon ) //checked changed to match cerberus output { teamkill_score = maps/mp/gametypes/_rank::getscoreinfovalue( "team_kill" ); - if ( isDefined( self.isdefusing ) && self.isdefusing || isDefined( self.isplanting ) && self.isplanting ) + if ( is_true( self.isdefusing ) || is_true( self.isplanting ) ) { teamkill_score *= level.teamkillscoremultiplier; } diff --git a/patch_mp/maps/mp/gametypes/gun.gsc b/patch_mp/maps/mp/gametypes/gun.gsc index 1ef6edb..e853a68 100644 --- a/patch_mp/maps/mp/gametypes/gun.gsc +++ b/patch_mp/maps/mp/gametypes/gun.gsc @@ -10,6 +10,7 @@ #include maps/mp/gametypes/_globallogic; #include maps/mp/gametypes/_hud_util; #include maps/mp/_utility; +#include common_scripts/utility; main() //checked matches cerberus output { @@ -154,7 +155,7 @@ givecustomloadout( takeallweapons, alreadyspawned ) //checked matches cerberus o { self setspawnweapon( currentweapon ); } - if ( isDefined( takeallweapons ) && !takeallweapons ) + if ( !is_true( takeallweapons ) ) { self thread takeoldweapons( currentweapon ); } diff --git a/patch_mp/maps/mp/gametypes/oic.gsc b/patch_mp/maps/mp/gametypes/oic.gsc index 09cfafd..4143eb8 100644 --- a/patch_mp/maps/mp/gametypes/oic.gsc +++ b/patch_mp/maps/mp/gametypes/oic.gsc @@ -192,7 +192,7 @@ saveoffallplayersammo() //checked partially changed to match cerberus output //d isplayereliminated( player ) //checked changed at own discretion { - if ( isDefined( player.pers[ "eliminated" ] ) && player.pers[ "eliminated" ] ) + if ( is_true( player.pers[ "eliminated" ] ) ) { return 1; } diff --git a/patch_mp/maps/mp/gametypes/oneflag.gsc b/patch_mp/maps/mp/gametypes/oneflag.gsc index 7edd494..a9db045 100644 --- a/patch_mp/maps/mp/gametypes/oneflag.gsc +++ b/patch_mp/maps/mp/gametypes/oneflag.gsc @@ -17,6 +17,7 @@ #include maps/mp/gametypes/_globallogic; #include maps/mp/gametypes/_hud_util; #include maps/mp/_utility; +#include common_scripts/utility; main() //checked matches cerberus output { @@ -1072,7 +1073,7 @@ onplayerkilled( einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, shi attacker.pers[ "defends" ]++; attacker.defends = attacker.pers[ "defends" ]; attacker addplayerstatwithgametype( "DEFENDS", 1 ); - if ( isDefined( self.isflagcarrier ) && self.isflagcarrier ) + if ( is_true( self.isflagcarrier ) ) { maps/mp/_scoreevents::processscoreevent( "kill_flag_carrier", attacker, undefined, sweapon ); } @@ -1316,7 +1317,7 @@ ctf_gamemodespawndvars( reset_dvars ) //checked matches cerberus output ctf_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked matches cerberus output { teamkill_penalty = maps/mp/gametypes/_globallogic_defaults::default_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ); - if ( isDefined( self.isflagcarrier ) && self.isflagcarrier ) + if ( is_true( self.isflagcarrier ) ) { teamkill_penalty *= level.teamkillpenaltymultiplier; } @@ -1326,7 +1327,7 @@ ctf_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked ctf_getteamkillscore( einflictor, attacker, smeansofdeath, sweapon ) //checked matches cerberus output { teamkill_score = maps/mp/gametypes/_rank::getscoreinfovalue( "kill" ); - if ( isDefined( self.isflagcarrier ) && self.isflagcarrier ) + if ( is_true( self.isflagcarrier ) ) { teamkill_score *= level.teamkillscoremultiplier; } diff --git a/patch_mp/maps/mp/gametypes/sd.gsc b/patch_mp/maps/mp/gametypes/sd.gsc index 7ca9085..a6d9f26 100644 --- a/patch_mp/maps/mp/gametypes/sd.gsc +++ b/patch_mp/maps/mp/gametypes/sd.gsc @@ -107,7 +107,7 @@ onprecachegametype() //checked matches cerberus output sd_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked changed to match cerberus output { teamkill_penalty = maps/mp/gametypes/_globallogic_defaults::default_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ); - if ( isDefined( self.isdefusing ) && self.isdefusing || isDefined( self.isplanting ) && self.isplanting ) + if ( is_true( self.isdefusing ) || is_true( self.isplanting ) ) { teamkill_penalty *= level.teamkillpenaltymultiplier; } @@ -117,7 +117,7 @@ sd_getteamkillpenalty( einflictor, attacker, smeansofdeath, sweapon ) //checked sd_getteamkillscore( einflictor, attacker, smeansofdeath, sweapon ) //checked changed to match cerberus output { teamkill_score = maps/mp/gametypes/_rank::getscoreinfovalue( "team_kill" ); - if ( isDefined( self.isdefusing ) && self.isdefusing || isDefined( self.isplanting ) && self.isplanting ) + if ( is_true( self.isdefusing ) || is_true( self.isplanting ) ) { teamkill_score *= level.teamkillscoremultiplier; }