Moderator: Forum Guards
~Cozmo~ wrote:So it can kill invincible stuff as well? And that boomy effect.
exec function Tantalus()
{
local Actor hitActor;
local Vector hitLocation, hitNormal;
local Vector position, line;
local ScriptedPawn hitPawn;
local DeusExMover hitMover;
local DeusExDecoration hitDecoration;
local bool bTakeDamage;
local int damage;
if (!bCheatsEnabled)
return;
bTakeDamage = false;
damage = 1;
position = Location;
position.Z += BaseEyeHeight;
line = Vector(ViewRotation) * 4000;
hitActor = Trace(hitLocation, hitNormal, position+line, position, true);
if (hitActor != None)
{
hitMover = DeusExMover(hitActor);
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
if (hitMover != None)
{
if (hitMover.bBreakable)
{
hitMover.doorStrength = 0;
bTakeDamage = true;
}
}
else if (hitPawn != None)
{
if (!hitPawn.bInvincible)
{
hitPawn.HealthHead = 0;
hitPawn.HealthTorso = 0;
hitPawn.HealthLegLeft = 0;
hitPawn.HealthLegRight = 0;
hitPawn.HealthArmLeft = 0;
hitPawn.HealthArmRight = 0;
hitPawn.Health = 0;
bTakeDamage = true;
}
}
else if (hitDecoration != None)
{
if (!hitDecoration.bInvincible)
{
hitDecoration.HitPoints = 0;
bTakeDamage = true;
}
}
else if (hitActor != Level)
{
damage = 5000;
bTakeDamage = true;
}
}
if (bTakeDamage)
hitActor.TakeDamage(damage, self, hitLocation, line, 'Tantalus');
}
hitMover = DeusExMover(hitActor);
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
if (hitMover != None)
{
if (hitMover.bBreakable)
{
hitMover.doorStrength = 0;
bTakeDamage = true;
}
}
else if (hitPawn != None)
{
if (!hitPawn.bInvincible)
{
hitPawn.HealthHead = 0;
hitPawn.HealthTorso = 0;
hitPawn.HealthLegLeft = 0;
hitPawn.HealthLegRight = 0;
hitPawn.HealthArmLeft = 0;
hitPawn.HealthArmRight = 0;
hitPawn.Health = 0;
bTakeDamage = true;
}
}
else if (hitDecoration != None)
{
if (!hitDecoration.bInvincible)
{
hitDecoration.HitPoints = 0;
bTakeDamage = true;
}
}
else if (hitActor != Level)
{
damage = 5000;
bTakeDamage = true;
}
}
if (bTakeDamage)
hitActor.TakeDamage(damage, self, hitLocation, line, 'Tantalus');
simulated function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
local float mult;
local name damageType;
local DeusExPlayer dxPlayer;
if (Other != None)
{
// AugCombat increases our damage if hand to hand
mult = 1.0;
if (bHandToHand && (DeusExPlayer(Owner) != None))
{
mult = DeusExPlayer(Owner).AugmentationSystem.GetAugLevelValue(class'AugCombat');
if (mult == -1.0)
mult = 1.0;
}
// skill also affects our damage
// GetWeaponSkill returns 0.0 to -0.7 (max skill/aug)
mult += -2.0 * GetWeaponSkill();
// Determine damage type
damageType = WeaponDamageType();
if (Other != None)
{
if (Other.bOwned)
{
dxPlayer = DeusExPlayer(Owner);
if (dxPlayer != None)
dxPlayer.AISendEvent('Futz', EAITYPE_Visual);
}
}
if ((Other == Level) || (Other.IsA('Mover')))
{
if ( Role == ROLE_Authority )
Other.TakeDamage(HitDamage * mult, Pawn(Owner), HitLocation, 1000.0*X, damageType);
SelectiveSpawnEffects( HitLocation, HitNormal, Other, HitDamage * mult);
}
else if ((Other != self) && (Other != Owner))
{
if ( Role == ROLE_Authority )
Other.TakeDamage(HitDamage * mult, Pawn(Owner), HitLocation, 1000.0*X, damageType);
if (bHandToHand)
SelectiveSpawnEffects( HitLocation, HitNormal, Other, HitDamage * mult);
if (bPenetrating && Other.IsA('Pawn') && !Other.IsA('Robot'))
SpawnBlood(HitLocation, HitNormal);
}
}
if (DeusExMPGame(Level.Game) != None)
{
if (DeusExPlayer(Other) != None)
DeusExMPGame(Level.Game).TrackWeapon(self,HitDamage * mult);
else
DeusExMPGame(Level.Game).TrackWeapon(self,0);
}
}
if ((Other == Level) || (Other.IsA('Mover')))
{
if ( Role == ROLE_Authority )
Other.TakeDamage(HitDamage * mult, Pawn(Owner), HitLocation, 1000.0*X, damageType);
SelectiveSpawnEffects( HitLocation, HitNormal, Other, HitDamage * mult);
}
else if ((Other != self) && (Other != Owner))
{
if ( Role == ROLE_Authority )
Other.TakeDamage(HitDamage * mult, Pawn(Owner), HitLocation, 1000.0*X, damageType);
if (bHandToHand)
SelectiveSpawnEffects( HitLocation, HitNormal, Other, HitDamage * mult);
if (bPenetrating && Other.IsA('Pawn') && !Other.IsA('Robot'))
SpawnBlood(HitLocation, HitNormal);
}
simulated function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
local float mult;
local name damageType;
local DeusExPlayer dxPlayer;
local ScriptedPawn hitPawn;
local DeusExMover hitMover;
local DeusExDecoration hitDecoration;
local bool bTakeDamage;
if (Other != None)
{
if (Other != Self)
{
//MM: ADDED===
hitMover = DeusExMover(hitActor);
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
//=======
if (Other.bOwned)
{
dxPlayer = DeusExPlayer(Owner);
if (dxPlayer != None)
dxPlayer.AISendEvent('Futz', EAITYPE_Visual);
}
}
//MM: ADDED=======
if (hitMover != None)
{
if (hitMover.bBreakable)
{
hitMover.doorStrength = 0;
bTakeDamage = true;
}
SelectiveSpawnEffects( HitLocation, HitNormal, Other, 5000);
}
//==========
//MM: ADDED=======
else if ( (hitPawn != None) && (hitPawn != Pawn(Owner) )
{
if (!hitPawn.bInvincible)
{
hitPawn.HealthHead = 0;
hitPawn.HealthTorso = 0;
hitPawn.HealthLegLeft = 0;
hitPawn.HealthLegRight = 0;
hitPawn.HealthArmLeft = 0;
hitPawn.HealthArmRight = 0;
hitPawn.Health = 0;
bTakeDamage = true;
}
if (bHandToHand)
SelectiveSpawnEffects( HitLocation, HitNormal, Other, 5000);
SpawnBlood(HitLocation, HitNormal);
}
//===========
//MM: ADDED=======
else if (hitDecoration != None)
{
if (!hitDecoration.bInvincible)
{
hitDecoration.HitPoints = 0;
bTakeDamage = true;
}
}
//=======
//MM: ADDED=======
if (bTakeDamage)
{
//MM: Take Damage must be called on the server (that's what Role_authority means)
if(Role == ROLE_Authority)
{
Other.TakeDamage(5000, self, hitLocation, line, 'Tantalus');
}
}
//======
}
if (DeusExMPGame(Level.Game) != None)
{
if (DeusExPlayer(Other) != None)
DeusExMPGame(Level.Game).TrackWeapon(self,5000);
else
DeusExMPGame(Level.Game).TrackWeapon(self,0);
}
}
Longc[A]t wrote:I still think Dae is a russian spambot.
~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
Longc[A]t wrote:I still think Dae is a russian spambot.
~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
~[A]Nobody~ wrote:Because he is not that experienced at coding. He cannot use the code without knowing the basics.
Longc[A]t wrote:I still think Dae is a russian spambot.
~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
~[A]Nobody~ wrote:Because he is not that experienced at coding. He cannot use the code without knowing the basics.
ICE wrote:~[A]Nobody~ wrote:Because he is not that experienced at coding. He cannot use the code without knowing the basics.
heh i know abit |:
Spiderf[A]g01 wrote:Make me a gun that flys around and tries to tantalus me and I will truly be impressed.