From 590d5091fabc1b07c184105c8baee8b6d15f9929 Mon Sep 17 00:00:00 2001 From: ineedbots Date: Fri, 26 Nov 2021 23:58:03 -0600 Subject: [PATCH] fix --- userraw/maps/mp/gametypes/_damage.gsc | 490 +++++++++++++------------- 1 file changed, 245 insertions(+), 245 deletions(-) diff --git a/userraw/maps/mp/gametypes/_damage.gsc b/userraw/maps/mp/gametypes/_damage.gsc index 9034ad6..6f4d824 100644 --- a/userraw/maps/mp/gametypes/_damage.gsc +++ b/userraw/maps/mp/gametypes/_damage.gsc @@ -3,7 +3,7 @@ Author: INeedGames Date: 09/22/2020 Adds force final killcam, extra hitmarkers, etc. - + Thanks: banz, 23Furious */ @@ -35,19 +35,19 @@ isFriendlyFire( victim, attacker ) { if ( !level.teamBased ) return false; - + if ( !isDefined( attacker ) ) return false; - + if ( !isPlayer( attacker ) && !isDefined( attacker.team ) ) return false; - + if ( victim.team != attacker.team ) return false; - + if ( victim == attacker ) return false; - + return true; } @@ -65,7 +65,7 @@ killedSelf( attacker ) isHeadShot( sWeapon, sHitLoc, sMeansOfDeath, attacker ) -{ +{ if ( isDefined( attacker ) ) { if ( attacker.code_classname == "script_vehicle" && isDefined( attacker.owner ) ) @@ -75,7 +75,7 @@ isHeadShot( sWeapon, sHitLoc, sMeansOfDeath, attacker ) if ( attacker.code_classname == "script_model" && isDefined( attacker.owner ) ) return false; } - + return( sHitLoc == "head" || sHitLoc == "helmet" ) && sMeansOfDeath != "MOD_MELEE" && sMeansOfDeath != "MOD_IMPACT" && !isMG( sWeapon ); } @@ -103,11 +103,11 @@ handleWorldDeath( attacker, lifeId, sMeansOfDeath, sHitLoc ) return; if ( !isDefined( attacker.team ) ) - { + { handleSuicideDeath( sMeansOfDeath, sHitLoc ); return; } - + assert( attacker.team == "axis" || attacker.team == "allies" ); if ( level.teamBased && attacker.team != self.team ) @@ -126,7 +126,7 @@ handleSuicideDeath( sMeansOfDeath, sHitLoc ) self thread [[ level.onXPEvent ]]( "suicide" ); self incPersStat( "suicides", 1 ); self.suicides = self getPersStat( "suicides" ); - + if ( !matchMakingGame() ) self incPlayerStat( "suicides", 1 ); @@ -236,14 +236,14 @@ handleNormalDeath( lifeId, attacker, eInflictor, sWeapon, sMeansOfDeath ) self incPlayerStat( "flankdeaths", 1 ); } - + lastKillStreak = attacker.pers["cur_kill_streak"]; self.pers["copyCatLoadout"] = undefined; if ( self _hasPerk( "specialty_copycat" ) ) self.pers["copyCatLoadout"] = attacker maps\mp\gametypes\_class::cloneLoadout(); - + if ( isAlive( attacker ) && !level.scriptIncKillstreak ) { // killstreaks only advance from kills earned this life @@ -289,7 +289,7 @@ handleNormalDeath( lifeId, attacker, eInflictor, sWeapon, sMeansOfDeath ) killstreakLifeId = eInflictor.lifeId; else killstreakLifeId = attacker.lifeId; - + if ( killstreakLifeId == toLifeId && (level.nukeIncreasesStreak || sWeapon != "nuke_mp") ) attacker.pers["cur_kill_streak"]++; break; @@ -334,7 +334,7 @@ handleNormalDeath( lifeId, attacker, eInflictor, sWeapon, sMeansOfDeath ) //if ( lastKillStreak != attacker.pers["cur_kill_streak"] ) level notify ( "player_got_killstreak_" + attacker.pers["cur_kill_streak"], attacker ); - + if ( isAlive( attacker ) ) attacker thread maps\mp\killstreaks\_killstreaks::checkKillstreakReward( attacker.pers["cur_kill_streak"] ); @@ -348,12 +348,12 @@ handleNormalDeath( lifeId, attacker, eInflictor, sWeapon, sMeansOfDeath ) if ( isDefined( level.onNormalDeath ) && attacker.pers[ "team" ] != "spectator" ) [[ level.onNormalDeath ]]( self, attacker, lifeId ); - + if ( isDefined( level.onNormalDeath2 ) && attacker.pers[ "team" ] != "spectator" ) [[ level.onNormalDeath2 ]]( self, attacker, sMeansOfDeath ); - level thread maps\mp\gametypes\_battlechatter_mp::sayLocalSoundDelayed( attacker, "kill", 0.75 ); - + level thread maps\mp\gametypes\_battlechatter_mp::sayLocalSoundDelayed( attacker, "kill", 0.75 ); + if ( isDefined( self.lastAttackedShieldPlayer ) && isDefined( self.lastAttackedShieldTime ) && self.lastAttackedShieldPlayer != attacker ) { if ( getTime() - self.lastAttackedShieldTime < 2500 ) @@ -364,7 +364,7 @@ handleNormalDeath( lifeId, attacker, eInflictor, sWeapon, sMeansOfDeath ) { forwardVec = vectorNormalize( anglesToForward( self.angles ) ); shieldVec = vectorNormalize( self.lastAttackedShieldPlayer.origin - self.origin ); - + if ( vectorDot( shieldVec, forwardVec ) > 0.925 ) self.lastAttackedShieldPlayer thread maps\mp\gametypes\_gamescore::processShieldAssist( self ); } @@ -390,13 +390,13 @@ isPlayerWeapon( weaponName ) { if ( weaponClass( weaponName ) == "non-player" ) return false; - + if ( weaponClass( weaponName ) == "turret" ) return false; if ( weaponInventoryType( weaponName ) == "primary" || weaponInventoryType( weaponName ) == "altmode" ) return true; - + return false; } @@ -440,7 +440,7 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe { prof_begin( "PlayerKilled" ); //prof_begin( " PlayerKilled_1" ); - + victim endon( "spawned" ); victim notify( "killed_player" ); @@ -465,7 +465,7 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe if ( victim.hasRiotShieldEquipped ) victim LaunchShield( iDamage, sMeansofDeath ); - + //victim thread checkForceBleedOut(); if ( !isFauxDeath ) @@ -522,40 +522,40 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe deathTimeOffset = ( gettime() - victim.lastStandParams.lastStandStartTime ) / 1000; victim.lastStandParams = undefined; } - + //prof_end( " PlayerKilled_1" ); //prof_begin( " PlayerKilled_2" ); - + //used for endgame perk and assisted suicide. if ( (!isDefined( attacker ) || attacker.classname == "trigger_hurt" || attacker.classname == "worldspawn" || attacker == victim ) && isDefined( self.attackers ) ) { bestPlayer = undefined; - + foreach ( player in self.attackers ) { if ( !isDefined( player ) ) continue; - + if (! isDefined( victim.attackerData[ player.guid ].damage ) ) continue; - + if ( player == victim || (level.teamBased && player.team == victim.team ) ) continue; - + if ( victim.attackerData[ player.guid ].lasttimedamaged + 2500 < getTime() ) - continue; - + continue; + if ( victim.attackerData[ player.guid ].damage > 1 && ! isDefined( bestPlayer ) ) bestPlayer = player; else if ( isDefined( bestPlayer ) && victim.attackerData[ player.guid ].damage > victim.attackerData[ bestPlayer.guid ].damage ) - bestPlayer = player; + bestPlayer = player; } - + if ( isDefined( bestPlayer ) ) { attacker = bestPlayer; attacker.assistedSuicide = true; - sWeapon = victim.attackerData[ bestPlayer.guid ].weapon; + sWeapon = victim.attackerData[ bestPlayer.guid ].weapon; vDir = victim.attackerData[ bestPlayer.guid ].vDir; sHitLoc = victim.attackerData[ bestPlayer.guid ].sHitLoc; psOffsetTime = victim.attackerData[ bestPlayer.guid ].psOffsetTime; @@ -568,7 +568,7 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe else { if ( isDefined( attacker ) ) - attacker.assistedSuicide = undefined; + attacker.assistedSuicide = undefined; } // override MOD @@ -580,38 +580,38 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe } else if ( sMeansOfDeath != "MOD_MELEE" && !isDefined( victim.nuked ) ) victim playDeathSound(); - + friendlyFire = isFriendlyFire( victim, attacker ); - + if ( isDefined( attacker ) ) { - // override attacker if it's a vehicle + // override attacker if it's a vehicle if ( attacker.code_classname == "script_vehicle" && isDefined( attacker.owner ) ) attacker = attacker.owner; - // override attacker if it's a sentry + // override attacker if it's a sentry if ( attacker.code_classname == "misc_turret" && isDefined( attacker.owner ) ) attacker = attacker.owner; - // override attacker if it's a crate + // override attacker if it's a crate if ( attacker.code_classname == "script_model" && isDefined( attacker.owner ) ) { attacker = attacker.owner; - + if ( !isFriendlyFire( victim, attacker ) && attacker != victim ) attacker notify( "crushed_enemy" ); } } - + //prof_end( " PlayerKilled_2" ); //prof_begin( " PlayerKilled_3" ); - + //prof_begin( " PlayerKilled_3_drop" ); // drop weapons from killed player victim maps\mp\gametypes\_weapons::dropScavengerForDeath( attacker ); // must be done before dropWeaponForDeath, since we use some weapon information victim maps\mp\gametypes\_weapons::dropWeaponForDeath( attacker ); //prof_end( " PlayerKilled_3_drop" ); - + if ( !isFauxDeath ) { victim.sessionstate = "dead"; @@ -620,7 +620,7 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe // UTS update aliveCount victim maps\mp\gametypes\_playerlogic::removeFromAliveCount(); - + if ( !isDefined( victim.switching_teams ) ) { // update our various stats @@ -633,34 +633,34 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe if ( isDefined( attacker ) ) attacker checkKillSteal( victim ); - + // obituary obituary( victim, attacker, sWeapon, sMeansOfDeath ); doKillcam = false; lifeId = getNextLifeId(); - + victim logPrintPlayerDeath( lifeId, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc ); victim maps\mp\_matchdata::logPlayerLife( lifeId ); victim maps\mp\_matchdata::logPlayerDeath( lifeId, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc ); - + if ( (sMeansOfDeath == "MOD_MELEE") ) { if ( IsSubStr( sWeapon, "riotshield" ) ) { attacker incPlayerStat( "shieldkills", 1 ); - + if ( !matchMakingGame() ) victim incPlayerStat( "shielddeaths", 1 ); } else attacker incPlayerStat( "knifekills", 1 ); } - + //prof_end( " PlayerKilled_3" ); //prof_begin( " PlayerKilled_4" ); - + if ( victim isSwitchingTeams() ) { handleTeamChangeDeath(); @@ -694,16 +694,16 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe doKillcam = true; handleNormalDeath( lifeId, attacker, eInflictor, sWeapon, sMeansOfDeath ); victim thread maps\mp\gametypes\_missions::playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, attacker.modifiers ); - + victim.pers["cur_death_streak"]++; - + if ( !getGametypeNumLives() && !matchMakingGame() ) victim setPlayerStatIfGreater( "deathstreak", victim.pers["cur_death_streak"] ); } - + //prof_end( " PlayerKilled_4" ); //prof_begin( " PlayerKilled_5" ); - + // clear any per life variables victim resetPlayerVariables(); victim.lastAttacker = attacker; @@ -732,9 +732,9 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe thread delayStartRagdoll( victim.body, sHitLoc, vDir, sWeapon, eInflictor, sMeansOfDeath ); - // allow per gametype death handling + // allow per gametype death handling victim thread [[ level.onPlayerKilled ]]( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration, lifeId ); - + if ( isPlayer( attacker ) ) attackerNum = attacker getEntityNumber(); else if ( (sMeansOfDeath == "MOD_FALLING" || eInflictor.classname == "trigger_hurt") && level.failCam )//banz @@ -752,24 +752,24 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe if ( !isdefined( killcamentitystarttime ) ) killcamentitystarttime = 0; } - + /# if ( getDvarInt( "scr_forcekillcam" ) != 0 ) doKillcam = true; #/ - + // record the kill cam values for the final kill cam if ( level.forceFinalKillcam && doKillcam ) maps\mp\gametypes\_gamelogic::recordFinalKillCam( 5.0, victim, attacker, attackerNum, killcamentityindex, killcamentitystarttime, sWeapon, deathTimeOffset, psOffsetTime ); - + if ( !level.forceFinalKillcam && level.allowFinalKillcam ) { if ( isDefined( attacker.finalKill ) ) maps\mp\_awards::addAwardWinner( "finalkill", attacker.clientid ); - + //prof_end( " PlayerKilled_5" ); //prof_begin( " PlayerKilled_6" ); - + if ( isDefined( attacker.finalKill ) && doKillcam && !isDefined( level.nukeDetonated ) ) { level thread doFinalKillcam( 5.0, victim, attacker, attackerNum, killcamentityindex, killcamentitystarttime, sWeapon, deathTimeOffset, psOffsetTime ); @@ -778,7 +778,7 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe wait ( 1.0 ); } } - + if ( !isFauxDeath ) { if ( !level.showingFinalKillcam && !level.killcam && doKillcam ) @@ -789,18 +789,18 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe wait ( 1.0 ); } } - + // let the player watch themselves die wait( 0.25 * level.postDeathDelayMod ); victim thread maps\mp\gametypes\_killcam::cancelKillCamOnUse(); wait( 0.25 * level.postDeathDelayMod ); - + self.respawnTimerStartTime = gettime() + 1000; timeUntilSpawn = maps\mp\gametypes\_playerlogic::TimeUntilSpawn( true ); if ( timeUntilSpawn < 1 ) timeUntilSpawn = 1; victim thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( timeUntilSpawn ); - + wait( 1.0 * level.postDeathDelayMod ); victim notify( "death_delay_finished" ); } @@ -813,16 +813,16 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe livesLeft = !( getGametypeNumLives() && !victim.pers[ "lives" ] ); timeUntilSpawn = maps\mp\gametypes\_playerlogic::TimeUntilSpawn( true ); willRespawnImmediately = livesLeft && ( timeUntilSpawn <= 0 ); - + if ( !livesLeft ) timeUntilSpawn = -1; victim maps\mp\gametypes\_killcam::killcam( attackerNum, killcamentityindex, killcamentitystarttime, sWeapon, postDeathDelay + deathTimeOffset, psOffsetTime, timeUntilSpawn, maps\mp\gametypes\_gamelogic::timeUntilRoundEnd(), attacker, victim ); } - + //prof_end( " PlayerKilled_6" ); //prof_begin( " PlayerKilled_7" ); - + //self openMenu( "killedby_card_hide" ); if ( game[ "state" ] != "playing" ) @@ -832,7 +832,7 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe victim.sessionstate = "dead"; victim ClearKillcamState(); } - + //prof_end( " PlayerKilled_7" ); prof_end( "PlayerKilled" ); return; @@ -843,7 +843,7 @@ PlayerKilled_internal( eInflictor, attacker, victim, iDamage, sMeansOfDeath, sWe { victim thread maps\mp\gametypes\_playerlogic::spawnClient(); } - + //prof_end( " PlayerKilled_7" ); prof_end( "PlayerKilled" ); } @@ -852,62 +852,62 @@ checkForceBleedout() { if ( level.dieHardMode != 1 ) return false; - + if ( !getGametypeNumLives() ) return false; - + if ( level.livesCount[self.team] > 0 ) return false; - + foreach ( player in level.players ) { if ( !isAlive( player ) ) continue; - + if ( player.team != self.team ) continue; - + if ( player == self ) continue; - + if ( !player.inLastStand ) return false; } - + foreach ( player in level.players ) { if ( !isAlive( player ) ) continue; - + if ( player.team != self.team ) continue; - + if ( player.inLastStand && player != self ) - player lastStandBleedOut(false); + player lastStandBleedOut(false); } - - return true; + + return true; } checkKillSteal( vic ) { if ( matchMakingGame() ) return; - + greatestDamage = 0; greatestAttacker = undefined; - - if ( isDefined( vic.attackerdata ) && vic.attackerdata.size > 1 ) + + if ( isDefined( vic.attackerdata ) && vic.attackerdata.size > 1 ) { foreach ( attacker in vic.attackerdata ) { if ( attacker.damage > greatestDamage ) { greatestDamage = attacker.damage; - greatestAttacker = attacker.attackerEnt; + greatestAttacker = attacker.attackerEnt; } } - + if ( isDefined( greatestAttacker ) && greatestAttacker != self ) self incPlayerStat( "killsteals", 1 ); } @@ -926,17 +926,17 @@ doFinalKillcam( delay, victim, attacker, attackerNum, killcamentityindex, killca } postDeathDelay = (( getTime() - victim.deathTime ) / 1000); - + foreach ( player in level.players ) { player closePopupMenu(); player closeInGameMenu(); player VisionSetNakedForPlayer( getMapVision(), 0 ); player.killcamentitylookat = victim getEntityNumber(); - + if ( (player != victim || (!isRoundBased() || isLastRound())) && player _hasPerk( "specialty_copycat" ) ) player _unsetPerk( "specialty_copycat" ); - + player thread maps\mp\gametypes\_killcam::killcam( attackerNum, killcamentityindex, killcamentitystarttime, sWeapon, postDeathDelay + deathTimeOffset, psOffsetTime, 0, 10000, attacker, victim ); } @@ -944,7 +944,7 @@ doFinalKillcam( delay, victim, attacker, attackerNum, killcamentityindex, killca while ( anyPlayersInKillcam() ) wait( 0.05 ); - + level.showingFinalKillcam = false; } @@ -956,7 +956,7 @@ anyPlayersInKillcam() if ( isDefined( player.killcam ) ) return true; } - + return false; } @@ -978,33 +978,33 @@ getKillcamEntity( attacker, eInflictor, sWeapon, sMeansOfDeath ) { if ( !isDefined( eInflictor ) ) return undefined; - + if( (sMeansOfDeath == "MOD_FALLING" || eInflictor.classname == "trigger_hurt") && level.failCam ) return attacker; - + if ( eInflictor == attacker ) return undefined; - + if ( isSubStr( sWeapon, "ac130_" ) ) return undefined; if ( sWeapon == "cobra_player_minigun_mp" ) return undefined; - + if ( sWeapon == "artillery_mp" || sWeapon == "stealth_bomb_mp" || sWeapon == "pavelow_minigun_mp" ) return eInflictor.killCamEnt; - + if ( isDefined( eInflictor.script_gameobjectname ) && eInflictor.script_gameobjectname == "bombzone" ) return eInflictor.killCamEnt; - + if ( eInflictor.classname == "script_origin" || eInflictor.classname == "script_model" || eInflictor.classname == "script_brushmodel" ) return undefined; // probably a barrel or a car... code does airstrike cam for these things which looks bad - + if ( issubstr( sWeapon, "remotemissile_" ) ) return undefined; if ( issubstr( sWeapon, "ac130_" ) ) return undefined; - + return eInflictor; } @@ -1090,50 +1090,50 @@ giveRecentShieldXP() { self endon ( "death" ); self endon ( "disconnect" ); - + self notify ( "giveRecentShieldXP" ); self endon ( "giveRecentShieldXP" ); - + self.recentShieldXP++; - + wait ( 20.0 ); - + self.recentShieldXP = 0; } Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime ) -{ +{ if( level.disableKnife && sMeansOfDeath == "MOD_MELEE" && sWeapon != "riotshield_mp" ) return; - + if( level.disableTurret && sWeapon == "turret_minigun_mp" ) return; - + if ( !isReallyAlive( victim ) ) return; - + if ( isDefined( eAttacker ) && eAttacker.classname == "script_origin" && isDefined( eAttacker.type ) && eAttacker.type == "soft_landing" ) return; - + if ( isDefined( level.hostMigrationTimer ) ) return; - + if ( sMeansOfDeath == "MOD_FALLING" ) victim thread emitFallDamage( iDamage ); - + if ( sMeansOfDeath == "MOD_EXPLOSIVE_BULLET" && iDamage != 1 ) { - iDamage *= getDvarFloat( "scr_explBulletMod" ); + iDamage *= getDvarFloat( "scr_explBulletMod" ); iDamage = int( iDamage ); } if ( isDefined( eAttacker ) && eAttacker.classname == "worldspawn" ) eAttacker = undefined; - + if ( isDefined( eAttacker ) && isDefined( eAttacker.gunner ) ) eAttacker = eAttacker.gunner; - + attackerIsNPC = isDefined( eAttacker ) && !isDefined( eAttacker.gunner ) && (eAttacker.classname == "script_vehicle" || eAttacker.classname == "misc_turret" || eAttacker.classname == "script_model"); attackerIsHittingTeammate = level.teamBased && isDefined( eAttacker ) && ( victim != eAttacker ) && isDefined( eAttacker.team ) && ( victim.pers[ "team" ] == eAttacker.team ); @@ -1149,7 +1149,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, { if ( attackerIsHittingTeammate && level.friendlyfire == 0 ) return; - + if ( sMeansOfDeath == "MOD_PISTOL_BULLET" || sMeansOfDeath == "MOD_RIFLE_BULLET" || sMeansOfDeath == "MOD_EXPLOSIVE_BULLET" && !attackerIsHittingTeammate ) { if ( isPlayer( eAttacker ) ) @@ -1164,7 +1164,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, shieldDamage = 25; else shieldDamage = maps\mp\perks\_perks::cac_modified_damage( victim, eAttacker, iDamage, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc ); - + victim.shieldDamage += shieldDamage; // fix turret + shield challenge exploits @@ -1177,16 +1177,16 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, xpVal = int( 50 / self.recentShieldXP ); else xpVal = 50; - + printLn( xpVal ); - + victim thread maps\mp\gametypes\_rank::giveRankXP( "shield_damage", xpVal ); victim thread giveRecentShieldXP(); - + victim thread maps\mp\gametypes\_missions::genericChallenge( "shield_damage", victim.shieldDamage ); victim thread maps\mp\gametypes\_missions::genericChallenge( "shield_bullet_hits", victim.shieldBulletHits ); - + victim.shieldDamage = 0; victim.shieldBulletHits = 0; } @@ -1205,7 +1205,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, { if ( isDefined( eInflictor ) && isDefined( eInflictor.stuckEnemyEntity ) && eInflictor.stuckEnemyEntity == victim ) //does enough damage to shield carrier to ensure death iDamage = 101; - + victim thread maps\mp\gametypes\_missions::genericChallenge( "shield_explosive_hits", 1 ); sHitLoc = "none"; // code ignores any damage to a "shield" bodypart. } @@ -1225,10 +1225,10 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, if ( !attackerIsHittingTeammate ) iDamage = maps\mp\perks\_perks::cac_modified_damage( victim, eAttacker, iDamage, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc ); - + if ( !iDamage ) return false; - + victim.iDFlags = iDFlags; victim.iDFlagsTime = getTime(); @@ -1249,7 +1249,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, victim _suicide(); return; } - + if ( !level.friendlyfire ) return; } @@ -1344,11 +1344,11 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, victim.explosiveInfo[ "cookedKill" ] = isDefined( eInflictor.isCooked ); victim.explosiveInfo[ "throwbackKill" ] = isDefined( eInflictor.threwBack ); } - + victim.explosiveInfo[ "stickKill" ] = isDefined( eInflictor.isStuck ) && eInflictor.isStuck == "enemy"; victim.explosiveInfo[ "stickFriendlyKill" ] = isDefined( eInflictor.isStuck ) && eInflictor.isStuck == "friendly"; } - + if ( isPlayer( eAttacker ) ) eAttacker.pers[ "participation" ]++ ; @@ -1358,7 +1358,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, { if ( !matchMakingGame() && isPlayer(eAttacker) ) eAttacker incPlayerStat( "mostff", 1 ); - + prof_begin( "PlayerDamage player" );// profs automatically end when the function returns if ( level.friendlyfire == 0 || ( !isPlayer(eAttacker) && level.friendlyfire != 1 ) )// no one takes damage { @@ -1406,7 +1406,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, } friendly = true; - + } else// not hitting teammate { @@ -1417,7 +1417,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, if ( isDefined( eAttacker ) && isPlayer( eAttacker ) ) addAttacker( victim, eAttacker, eInflictor, sWeapon, iDamage, vPoint, vDir, sHitLoc, psOffsetTime, sMeansOfDeath ); - + if ( sMeansOfDeath == "MOD_EXPLOSIVE" || sMeansOfDeath == "MOD_GRENADE_SPLASH" && iDamage < victim.health ) victim notify( "survived_explosion" ); @@ -1455,7 +1455,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, victim thread maps\mp\gametypes\_missions::playerDamaged( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc ); prof_end( "PlayerDamage world" ); - + } if ( attackerIsNPC && isDefined( eAttacker.gunner ) ) @@ -1475,7 +1475,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, typeHit = "hitEndGame"; else typeHit = "standard"; - + damager thread maps\mp\gametypes\_damagefeedback::updateDamageFeedback( typeHit ); } @@ -1528,7 +1528,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, { if ( isPlayer( eAttacker ) ) eAttacker incPlayerStat( "damagedone", iDamage ); - + victim incPlayerStat( "damagetaken", iDamage ); }*/ @@ -1540,7 +1540,7 @@ addAttacker( victim, eAttacker, eInflictor, sWeapon, iDamage, vPoint, vDir, sHit { if ( !isDefined( victim.attackerData ) ) victim.attackerData = []; - + if ( !isDefined( victim.attackerData[ eAttacker.guid ] ) ) { victim.attackers[ eAttacker.guid ] = eAttacker; @@ -1548,13 +1548,13 @@ addAttacker( victim, eAttacker, eInflictor, sWeapon, iDamage, vPoint, vDir, sHit // if they're already one of the existing attackers in the above if(). // we store in this array data that is useful for other things, like challenges victim.attackerData[ eAttacker.guid ] = SpawnStruct(); - victim.attackerData[ eAttacker.guid ].damage = 0; + victim.attackerData[ eAttacker.guid ].damage = 0; victim.attackerData[ eAttacker.guid ].attackerEnt = eAttacker; - victim.attackerData[ eAttacker.guid ].firstTimeDamaged = getTime(); + victim.attackerData[ eAttacker.guid ].firstTimeDamaged = getTime(); } if ( maps\mp\gametypes\_weapons::isPrimaryWeapon( sWeapon ) && ! maps\mp\gametypes\_weapons::isSideArm( sWeapon ) ) victim.attackerData[ eAttacker.guid ].isPrimary = true; - + victim.attackerData[ eAttacker.guid ].damage += iDamage; victim.attackerData[ eAttacker.guid ].weapon = sWeapon; victim.attackerData[ eAttacker.guid ].vPoint = vPoint; @@ -1564,7 +1564,7 @@ addAttacker( victim, eAttacker, eInflictor, sWeapon, iDamage, vPoint, vDir, sHit victim.attackerData[ eAttacker.guid ].sMeansOfDeath = sMeansOfDeath; victim.attackerData[ eAttacker.guid ].attackerEnt = eAttacker; victim.attackerData[ eAttacker.guid ].lasttimeDamaged = getTime(); - + if ( isDefined( eInflictor ) && !isPlayer( eInflictor ) && isDefined( eInflictor.primaryWeapon ) ) victim.attackerData[ eAttacker.guid ].sPrimaryWeapon = eInflictor.primaryWeapon; else if ( isDefined( eAttacker ) && isPlayer( eAttacker ) && eAttacker getCurrentPrimaryWeapon() != "none" ) @@ -1578,9 +1578,9 @@ resetAttackerList() self endon( "disconnect" ); self endon( "death" ); level endon( "game_ended" ); - + //wait is to offset premature calling in _healthOverlay - wait( 1.75 ); + wait( 1.75 ); self.attackers = []; self.attackerData = []; } @@ -1622,7 +1622,7 @@ doPrintDamage(dmg, hitloc, flags) val = 1; if (cointoss()) val = -1; - + huddamage.y = 235 + randomIntRange(25, 70) * val; wait 1; @@ -1638,7 +1638,7 @@ finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeat { if ( !isDefined( eAttacker ) ) { - if ( !isDefined( eInflictor ) ) + if ( !isDefined( eInflictor ) && self.printDamage ) self thread doPrintDamage( iDamage, sHitLoc, iDFlags ); } else if ( isPlayer( eAttacker ) && eAttacker.printDamage ) @@ -1646,7 +1646,7 @@ finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeat else if( isDefined( eAttacker.owner ) && isPlayer( eAttacker.owner ) && eAttacker.owner.printDamage ) eAttacker.owner thread doPrintDamage( iDamage, sHitLoc, iDFlags ); } - + if( isDefined( eAttacker ) && level.extraDamageFeedback ) { if( sWeapon == "nuke_mp" ) @@ -1657,7 +1657,7 @@ finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeat typeHit = "hitEndGame"; else typeHit = "standard"; - + eAttacker thread maps\mp\gametypes\_damagefeedback::updateDamageFeedback( typeHit ); } @@ -1669,7 +1669,7 @@ finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeat eAttacker.owner playLocalSound( "bullet_impact_headshot_2" ); } } - + if ( (self isUsingRemote() ) && (iDamage >= self.health) && !(iDFlags & level.iDFLAGS_STUN) ) { if ( !isDefined( vDir ) ) @@ -1680,7 +1680,7 @@ finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeat eAttacker = self; eInflictor = eAttacker; } - + assert( isDefined( eAttacker ) ); assert( isDefined( eInflictor ) ); @@ -1702,8 +1702,8 @@ finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeat Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration ) -{ - +{ + lastStandParams = spawnStruct(); lastStandParams.eInflictor = eInflictor; lastStandParams.attacker = attacker; @@ -1713,7 +1713,7 @@ Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, lastStandParams.sMeansOfDeath = "MOD_SUICIDE"; else lastStandParams.sMeansOfDeath = sMeansOfDeath; - + lastStandParams.sWeapon = sWeapon; if ( isDefined( attacker ) && isPlayer( attacker ) && attacker getCurrentPrimaryWeapon() != "none" ) lastStandParams.sPrimaryWeapon = attacker getCurrentPrimaryWeapon(); @@ -1724,13 +1724,13 @@ Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, lastStandParams.lastStandStartTime = getTime(); mayDoLastStand = mayDoLastStand( sWeapon, sMeansOfDeath, sHitLoc ); - + //if ( mayDoLastStand ) // mayDoLastStand = !self checkForceBleedOut(); - + if ( isDefined( self.endGame ) ) mayDoLastStand = false; - + if ( level.teamBased && isDefined( attacker.team ) && attacker.team == self.team ) mayDoLastStand = false; @@ -1738,7 +1738,7 @@ Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, if ( getdvar( "scr_forcelaststand" ) == "1" ) mayDoLastStand = true; #/ - + if ( !mayDoLastStand ) { self.lastStandParams = lastStandParams; @@ -1746,7 +1746,7 @@ Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, self _suicide(); return; } - + self.inLastStand = true; notifyData = spawnStruct(); @@ -1772,20 +1772,20 @@ Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, if ( isDefined( level.ac130player ) && isDefined( attacker ) && level.ac130player == attacker ) level notify( "ai_crawling", self ); - + if ( self _hasPerk( "specialty_finalstand" ) ) { self.lastStandParams = lastStandParams; self.inFinalStand = true; - + weaponList = self GetWeaponsListExclusives(); foreach ( weapon in weaponList ) self takeWeapon( weapon ); - + self _disableUsability(); self thread enableLastStandWeapons(); - self thread lastStandTimer( 20, true ); + self thread lastStandTimer( 20, true ); } /* else if ( self _hasPerk( "specialty_c4death" ) ) @@ -1797,15 +1797,15 @@ Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, self switchToWeapon( "c4Death_mp" ); self _disableUsability(); self.inC4Death = true; - + //self thread dieAfterTime( 7 ); - self thread lastStandTimer( 10, false ); + self thread lastStandTimer( 10, false ); self thread detonateOnUse(); - //self thread detonateOnDeath(); + //self thread detonateOnDeath(); } */ else if ( level.dieHardMode ) - { + { self.lastStandParams = lastStandParams; self thread enableLastStandWeapons(); self thread lastStandTimer( 20, false ); @@ -1814,31 +1814,31 @@ Callback_PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, else // normal last stand { self.lastStandParams = lastStandParams; - + pistolWeapon = undefined; - + weaponsList = self GetWeaponsListPrimaries(); foreach ( weapon in weaponsList ) { if ( maps\mp\gametypes\_weapons::isSideArm( weapon ) ) - pistolWeapon = weapon; + pistolWeapon = weapon; } - + if ( !isDefined( pistolWeapon ) ) { pistolWeapon = "beretta_mp"; self _giveWeapon( pistolWeapon ); } - + self giveMaxAmmo( pistolWeapon ); self DisableWeaponSwitch(); self _disableUsability(); - + if ( !self _hasPerk("specialty_laststandoffhand") ) self DisableOffhandWeapons(); - + self switchToWeapon( pistolWeapon ); - + self thread lastStandTimer( 10, false ); } } @@ -1849,7 +1849,7 @@ dieAfterTime( time ) self endon( "disconnect" ); self endon( "joined_team" ); level endon( "game_ended" ); - + wait ( time ); self.useLastStandParams = true; self _suicide(); @@ -1861,7 +1861,7 @@ detonateOnUse() self endon( "disconnect" ); self endon( "joined_team" ); level endon( "game_ended" ); - + self waittill( "detonate" ); self.useLastStandParams = true; self c4DeathDetonate(); @@ -1873,7 +1873,7 @@ detonateOnDeath() self endon( "disconnect" ); self endon( "joined_team" ); level endon( "game_ended" ); - + self waittill( "death" ); self c4DeathDetonate(); } @@ -1883,7 +1883,7 @@ c4DeathDetonate() self playSound( "detpack_explo_default" ); self.c4DeathEffect = playFX( level.c4Death, self.origin ); RadiusDamage( self.origin, 400, 100, 100, self ); - + if ( isAlive( self ) ) self _suicide(); } @@ -1896,7 +1896,7 @@ enableLastStandWeapons() self freezeControlsWrapper( true ); wait .30; - + self freezeControlsWrapper( false ); } @@ -1906,20 +1906,20 @@ lastStandTimer( delay, isFinalStand ) self endon( "disconnect" ); self endon( "revive"); level endon( "game_ended" ); - + level notify ( "player_last_stand" ); - + self thread lastStandWaittillDeath(); - + self.lastStand = true; - + if ( !isFinalStand && !level.dieHardMode && ( !isDefined( self.inC4Death ) || !self.inC4Death ) ) { self thread lastStandAllowSuicide(); self setLowerMessage( "last_stand", &"PLATFORM_COWARDS_WAY_OUT" ); self thread lastStandKeepOverlay(); } - + if ( level.dieHardMode == 1 && level.dieHardMode != 2 ) { reviveEnt = spawn( "script_model", self.origin ); @@ -1938,15 +1938,15 @@ lastStandTimer( delay, isFinalStand ) reviveIcon.color = (0.33, 0.75, 0.24); self playDeathSound(); - + if ( isFinalStand ) { wait( delay ); - + if ( self.inFinalStand ) self thread lastStandBleedOut( isFinalStand, reviveEnt ); } - + return; } else if( level.dieHardMode == 2 ) @@ -1968,22 +1968,22 @@ lastStandTimer( delay, isFinalStand ) reviveIcon.color = (0.33, 0.75, 0.24); self playDeathSound(); - + if ( isFinalStand ) { wait( delay ); - + if ( self.inFinalStand ) self thread lastStandBleedOut( isFinalStand, reviveEnt ); } - + wait delay / 3; reviveIcon.color = (1.0, 0.64, 0.0); - + while ( reviveEnt.inUse ) wait ( 0.05 ); - - self playDeathSound(); + + self playDeathSound(); wait delay / 3; reviveIcon.color = (1.0, 0.0, 0.0); @@ -1991,16 +1991,16 @@ lastStandTimer( delay, isFinalStand ) wait ( 0.05 ); self playDeathSound(); - wait delay / 3; + wait delay / 3; while ( reviveEnt.inUse ) wait ( 0.05 ); - - wait( 0.05 ); + + wait( 0.05 ); self thread lastStandBleedOut( isFinalStand ); return; } - + wait( delay ); self thread lastStandBleedout( isFinalStand ); @@ -2011,7 +2011,7 @@ maxHealthOverlay( maxHealth, refresh ) self endon( "stop_maxHealthOverlay" ); self endon( "revive" ); self endon( "death" ); - + for( ;; ) { self.health -= 1; @@ -2019,9 +2019,9 @@ maxHealthOverlay( maxHealth, refresh ) wait( .05 ); self.maxHealth = 50; self.health += 1; - + wait ( .50 ); - } + } } lastStandBleedOut( reviveOnBleedOut, reviveEnt ) @@ -2032,7 +2032,7 @@ lastStandBleedOut( reviveOnBleedOut, reviveEnt ) self.inFinalStand = false; self clearLowerMessage( "last_stand" ); maps\mp\gametypes\_playerlogic::lastStandRespawnPlayer(); - + if( isDefined( reviveEnt ) ) reviveEnt Delete(); } @@ -2087,7 +2087,7 @@ lastStandKeepOverlay() self.health = 1; wait .5; } - + self.health = self.maxhealth; } @@ -2108,19 +2108,19 @@ mayDoLastStand( sWeapon, sMeansOfDeath, sHitLoc ) { if ( sMeansOfDeath == "MOD_TRIGGER_HURT" ) return false; - + if ( sMeansOfDeath != "MOD_PISTOL_BULLET" && sMeansOfDeath != "MOD_RIFLE_BULLET" && sMeansOfDeath != "MOD_FALLING" && sMeansOfDeath != "MOD_EXPLOSIVE_BULLET" ) return false; if ( sMeansOfDeath == "MOD_IMPACT" && sWeapon == "throwingknife_mp" ) return false; - + if ( sMeansOfDeath == "MOD_IMPACT" && ( sWeapon == "m79_mp" || isSubStr(sWeapon, "gl_") ) ) return false; if ( isHeadShot( sWeapon, sHitLoc, sMeansOfDeath ) ) return false; - + if ( self isUsingRemote() ) return false; @@ -2257,7 +2257,7 @@ damageShellshockAndRumble( eInflictor, sWeapon, sMeansOfDeath, iDamage, iDFlags, reviveSetup( owner ) { team = owner.team; - + self linkTo( owner, "tag_origin" ); self.owner = owner; @@ -2265,9 +2265,9 @@ reviveSetup( owner ) self makeUsable(); self updateUsableByTeam( team ); self thread trackTeamChanges( team ); - + self thread reviveTriggerThink( team ); - + self thread deleteOnReviveOrDeathOrDisconnect(); } @@ -2275,9 +2275,9 @@ reviveSetup( owner ) deleteOnReviveOrDeathOrDisconnect() { self endon ( "death" ); - + self.owner waittill_any ( "death", "disconnect" ); - + self delete(); } @@ -2287,21 +2287,21 @@ updateUsableByTeam( team ) foreach (player in level.players) { if ( team == player.team && player != self.owner ) - self enablePlayerUse( player ); + self enablePlayerUse( player ); else - self disablePlayerUse( player ); - } + self disablePlayerUse( player ); + } } trackTeamChanges( team ) { self endon ( "death" ); - + while ( true ) { level waittill ( "joined_team" ); - + self updateUsableByTeam( team ); } } @@ -2310,11 +2310,11 @@ trackTeamChanges( team ) trackLastStandChanges( team ) { self endon ( "death" ); - + while ( true ) { level waittill ( "player_last_stand" ); - + self updateUsableByTeam( team ); } } @@ -2324,7 +2324,7 @@ reviveTriggerThink( team ) { self endon ( "death" ); level endon ( "game_ended" ); - + for ( ;; ) { self waittill ( "trigger", player ); @@ -2335,21 +2335,21 @@ reviveTriggerThink( team ) self.owner.beingRevived = false; continue; } - + self makeUnUsable(); self.owner freezeControlsWrapper( true ); revived = self useHoldThink( player ); self.owner.beingRevived = false; - + if ( !isAlive( self.owner ) ) - { + { self delete(); return; } self.owner freezeControlsWrapper( false ); - + if ( revived ) { player thread maps\mp\gametypes\_hud_message::SplashNotifyDelayed( "reviver", 200 ); @@ -2357,24 +2357,24 @@ reviveTriggerThink( team ) self.owner.lastStand = undefined; self.owner clearLowerMessage( "last_stand" ); - + if ( self.owner _hasPerk( "specialty_lightweight" ) ) self.owner.moveSpeedScaler = 1.07; else self.owner.moveSpeedScaler = 1; - + self.owner.maxHealth = 100; - + self.owner maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" ); self.owner maps\mp\gametypes\_playerlogic::lastStandRespawnPlayer(); self.owner setPerk( "specialty_pistoldeath", true ); self.owner.beingRevived = false; - + self delete(); return; } - + self makeUsable(); self updateUsableByTeam( team ); } @@ -2393,21 +2393,21 @@ Returns true if the player sucessfully fills the use bar useHoldThink( player ) { reviveSpot = spawn( "script_origin", self.origin ); - reviveSpot hide(); - player playerLinkTo( reviveSpot ); + reviveSpot hide(); + player playerLinkTo( reviveSpot ); player PlayerLinkedOffsetEnable(); - + player _disableWeapon(); - + self.curProgress = 0; self.inUse = true; self.useRate = 0; self.useTime = 3000; - + player thread personalUseBar( self ); - + result = useHoldThinkLoop( player ); - + if ( isDefined( player ) && isReallyAlive( player ) ) { player Unlink(); @@ -2420,9 +2420,9 @@ useHoldThink( player ) self.owner.inlaststand = false; return true; } - + self.inUse = false; - reviveSpot Delete(); + reviveSpot Delete(); return false; } @@ -2444,7 +2444,7 @@ personalUseBar( object ) { if( object.curProgress > object.useTime) object.curProgress = object.useTime; - + useBar updateBar( object.curProgress / object.useTime, (1000 / object.useTime) * object.useRate ); objUseBar updateBar( object.curProgress / object.useTime, (1000 / object.useTime) * object.useRate ); @@ -2464,11 +2464,11 @@ personalUseBar( object ) objUseBar showElem(); objUseBarText showElem(); } - } + } lastRate = object.useRate; wait ( 0.05 ); } - + // when the players disconnect the hudElems are destroyed automatically if ( isDefined( useBar ) ) useBar destroyElem(); @@ -2496,13 +2496,13 @@ useHoldThinkLoop( player ) if ( self.curProgress >= self.useTime ) { self.inUse = false; - + return isReallyAlive( player ); } - + wait 0.05; } - + return false; } @@ -2515,7 +2515,7 @@ Callback_KillingBlow( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sW self _setPerk( "specialty_endgame" ); return false; } - + return true; } @@ -2523,7 +2523,7 @@ Callback_KillingBlow( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sW emitFallDamage( iDamage ) { PhysicsExplosionSphere( self.origin, 64, 64, 1 ); - + // get the entities we landed on damageEnts = []; for ( testAngle = 0; testAngle < 360; testAngle += 30 ) @@ -2533,7 +2533,7 @@ emitFallDamage( iDamage ) traceData = bulletTrace( self.origin + (xOffset, yOffset, 4), self.origin + (xOffset,yOffset,-6), true, self ); //thread drawLine( self.origin + (xOffset, yOffset, 4), self.origin + (xOffset,yOffset,-6), 10.0 ); - + if ( isDefined( traceData["entity"] ) && isDefined( traceData["entity"].targetname ) && (traceData["entity"].targetname == "destructible_vehicle" || traceData["entity"].targetname == "destructible_toy") ) damageEnts[damageEnts.size] = traceData["entity"]; } @@ -2546,7 +2546,7 @@ emitFallDamage( iDamage ) damageOwner.destructibles = damageEnts; radiusDamage( self.origin, 64, 100, 100, damageOwner ); - wait ( 0.1 ); + wait ( 0.1 ); damageOwner delete(); } } @@ -2568,7 +2568,7 @@ isFlankKill( victim, attacker ) victimForward = VectorNormalize( victimForward ); attackDirection = victim.origin - attacker.origin; - attackDirection = ( attackDirection[0], attackDirection[1], 0 ); + attackDirection = ( attackDirection[0], attackDirection[1], 0 ); attackDirection = VectorNormalize( attackDirection ); dotProduct = VectorDot( victimForward, attackDirection ); @@ -2581,7 +2581,7 @@ isFlankKill( victim, attacker ) _obituary( victim, attacker, sWeapon, sMeansOfDeath ) { victimTeam = victim.team; - + foreach ( player in level.players ) { playerTeam = player.team; @@ -2627,6 +2627,6 @@ logPrintPlayerDeath( lifeId, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimary destroyOnReviveEntDeath( reviveEnt ) { reviveEnt waittill ( "death" ); - + self destroy(); }