Показать сообщение отдельно
Старый 21.04.2012, 15:21   #131
Malinovskiy
RO Admin
 
Аватар для Malinovskiy
 
Регистрация: 13.02.2007
Адрес: Москва
Сообщений: 4,789
Сказал cпасибо: 1,000
Поблагодарили 2,559 раз в 1,229 сообщениях
Осторожно! Много букавок!

Характеристики пули ПТРС


class PTRS1941Bullet_AP extends ROAntiVehicleProjectile;
defaultproperties
{
BallisticCoefficient=0.80
Speed=50500 //1010 m/s
MaxSpeed=50500
ImpactDamage=125
DamageRadius=0//50
MomentumTransfer=5000
Damage=200

Caliber=14.5
ActualRHA=36
TestPlateHardness=300
SlopeEffect=0.47989
ShatterNumber=1.1
ShatterTd=1.0
ShatteredPenEffectiveness=0.9

PenetrateShrapnelLength=75 // 1.5 meters
SpallShrapnelLength=50 // 1 Meter
PenetrateShrapnelChance=0.15 // 15% chance
SpallShrapnelChance=0.1 // 10% chance
}
[свернуть]

Характеристики пули PzB784


class PzB784rBullet_AP extends PTRS1941Bullet_AP;

defaultproperties
{
ActualRHA=55//45
TestPlateHardness=450
}
[свернуть]

Схема бронирования Pz4


ArmorPlates(0)=(PlateName=FRONTLOWER,ArmorZoneType=AZT_Front,PlateThickness=50,OverallHardness=357,bHighHardness=false)
ArmorPlates(1)=(PlateName=FRONTGLACIS,ArmorZoneType=AZT_Front,PlateThickness=25,OverallHardness=347,bHighHardness=false)
ArmorPlates(2)=(PlateName=FRONTUPPER,ArmorZoneType=AZT_Front,PlateThickness=50,OverallHardness=357,bHighHardness=false)
ArmorPlates(3)=(PlateName=LEFTFRONT,ArmorZoneType=AZT_Left,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(4)=(PlateName=LEFTLOWER,ArmorZoneType=AZT_Left,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(5)=(PlateName=LEFTUPPER,ArmorZoneType=AZT_Left,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(6)=(PlateName=LEFTUPPERCENTER,ArmorZoneType=AZT_Left,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(7)=(PlateName=LEFTUPPERREAR,ArmorZoneType=AZT_Left,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(8)=(PlateName=LEFTLOWERREAR,ArmorZoneType=AZT_Left,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(9)=(PlateName=LEFTFRONTOVERHANG,ArmorZoneType=AZT_Left,PlateThickness=10,OverallHardness=450,bHighHardness=true)
ArmorPlates(10)=(PlateName=LEFTREAROVERHANG,ArmorZoneType=AZT_Left,PlateThickness=10,OverallHardness=450,bHighHardness=true)
ArmorPlates(11)=(PlateName=ROOFREAR,ArmorZoneType=AZT_Roof,PlateThickness=10,OverallHardness=450,bHighHardness=true)
ArmorPlates(12)=(PlateName=ROOFFRONT,ArmorZoneType=AZT_Roof,PlateThickness=10,OverallHardness=450,bHighHardness=true)
ArmorPlates(13)=(PlateName=FLOOR,ArmorZoneType=AZT_Floor,PlateThickness=10,OverallHardness=450,bHighHardness=true)
ArmorPlates(14)=(PlateName=REARLOWER,ArmorZoneType=AZT_Back,PlateThickness=20,OverallHardness=347,bHighHardness=false)
ArmorPlates(15)=(PlateName=REARUPPER,ArmorZoneType=AZT_Back,PlateThickness=20,OverallHardness=347,bHighHardness=false)
ArmorPlates(16)=(PlateName=RIGHTFRONT,ArmorZoneType=AZT_Right,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(17)=(PlateName=RIGHTLOWER,ArmorZoneType=AZT_Right,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(18)=(PlateName=RIGHTUPPER,ArmorZoneType=AZT_Right,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(19)=(PlateName=RIGHTUPPERCENTER,ArmorZoneType=AZT_Right,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(20)=(PlateName=RIGHTUPPERREAR,ArmorZoneType=AZT_Right,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(21)=(PlateName=RIGHTLOWERREAR,ArmorZoneType=AZT_Right,PlateThickness=30,OverallHardness=388,bHighHardness=false)
ArmorPlates(22)=(PlateName=RIGHTFRONTOVERHANG,ArmorZoneType=AZT_Right,PlateThickness=10,OverallHardness=450,bHighHardness=true)
ArmorPlates(23)=(PlateName=RIGHTREAROVERHANG,ArmorZoneType=AZT_Right,PlateThickness=10,OverallHardness=450,bHighHardness=true)
ArmorPlates(24)=(PlateName=TURRETFRONT,ArmorZoneType=AZT_TurretFront,PlateThickness=50,OverallHardness=357,bHighHardness=false)
ArmorPlates(25)=(PlateName=TURRETLEFTFRONT,ArmorZoneType=AZT_TurretLeft,PlateThickness=30,OverallHardness=347,bHighHardness=false)
ArmorPlates(26)=(PlateName=TURRETLEFTREAR,ArmorZoneType=AZT_TurretLeft,PlateThickness=30,OverallHardness=347,bHighHardness=false)
ArmorPlates(27)=(PlateName=TURRETREAR,ArmorZoneType=AZT_TurretBack,PlateThickness=30,OverallHardness=347,bHighHardness=false)
ArmorPlates(28)=(PlateName=TURRETRIGHTREAR,ArmorZoneType=AZT_TurretRight,PlateThickness=30,OverallHardness=347,bHighHardness=false)
ArmorPlates(29)=(PlateName=TURRETRIGHTFRONT,ArmorZoneType=AZT_TurretRight,PlateThickness=30,OverallHardness=347,bHighHardness=false)
ArmorPlates(30)=(PlateName=TURRETROOF,ArmorZoneType=AZT_TurretRoof,PlateThickness=20,OverallHardness=347,bHighHardness=false)
ArmorPlates(31)=(PlateName=CUPPOLA,ArmorZoneType=AZT_Cuppola,PlateThickness=50,OverallHardness=331,bHighHardness=false)
ArmorPlates(32)=(PlateName=CUPPOLAROOF,ArmorZoneType=AZT_Cuppola,PlateThickness=9,OverallHardness=450,bHighHardness=true)
ArmorPlates(33)=(PlateName=CANNONGLACIS,ArmorZoneType=AZT_TurretFront,PlateThickness=50,OverallHardness=357,bHighHardness=false)
ArmorPlates(34)=(PlateName=DRIVERFRONTVISIONSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=80,OverallHardness=150,bHighHardness=false)
ArmorPlates(35)=(PlateName=DRIVERSIDEVISIONSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(36)=(PlateName=HULLMGSIDEVISIONSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(37)=(PlateName=GUNNERFRONTVISIONSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(38)=(PlateName=GUNNERREARVISIONSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(39)=(PlateName=LOADERFRONTVISIONSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(40)=(PlateName=LOADERREARVISIONSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(41)=(PlateName=CUPPOLAVIEWSLITONE,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(42)=(PlateName=CUPPOLAVIEWSLITTWO,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(43)=(PlateName=CUPPOLAVIEWSLITTHREE,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(44)=(PlateName=CUPPOLAVIEWSLITFOUR,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(45)=(PlateName=CUPPOLAVIEWSLITFIVE,ArmorZoneType=AZT_WeakSpots,PlateThickness=70,OverallHardness=150,bHighHardness=false)
ArmorPlates(46)=(PlateName=RIGHTENGINEDECKGRATING,ArmorZoneType=AZT_WeakSpots,PlateThickness=10,OverallHardness=150,bHighHardness=false)
ArmorPlates(47)=(PlateName=LEFTENGINEDECKGRATING,ArmorZoneType=AZT_WeakSpots,PlateThickness=10,OverallHardness=150,bHighHardness=false)
[свернуть]

Схема бронирования Т34

ArmorPlates(0)=(PlateName=FRONTGLACIS,ArmorZoneType=AZT_Front,PlateThickness=45,OverallHardness=400,bHighHardness=true)
ArmorPlates(1)=(PlateName=FRONTLOWER,ArmorZoneType=AZT_Front,PlateThickness=45,OverallHardness=400,bHighHardness=true)
ArmorPlates(2)=(PlateName=LEFTLOWER,ArmorZoneType=AZT_Left,PlateThickness=45,OverallHardness=400,bHighHardness=true)
ArmorPlates(3)=(PlateName=LEFTUPPER,ArmorZoneType=AZT_Left,PlateThickness=40,OverallHardness=400,bHighHardness=true)
ArmorPlates(4)=(PlateName=LEFTOVERHANG,ArmorZoneType=AZT_Left,PlateThickness=16,OverallHardness=400,bHighHardness=true)
ArmorPlates(5)=(PlateName=REARUPPER,ArmorZoneType=AZT_Back,PlateThickness=40,OverallHardness=400,bHighHardness=true)
ArmorPlates(6)=(PlateName=REARLOWER,ArmorZoneType=AZT_Back,PlateThickness=40,OverallHardness=400,bHighHardness=true)
ArmorPlates(7)=(PlateName=ROOFFRONT,ArmorZoneType=AZT_Roof,PlateThickness=20,OverallHardness=400,bHighHardness=true)
ArmorPlates(8)=(PlateName=ENGINEDECK,ArmorZoneType=AZT_Roof,PlateThickness=20,OverallHardness=400,bHighHardness=true)
ArmorPlates(9)=(PlateName=FLOOR,ArmorZoneType=AZT_Floor,PlateThickness=16,OverallHardness=400,bHighHardness=true)
ArmorPlates(10)=(PlateName=RIGHTLOWER,ArmorZoneType=AZT_Right,PlateThickness=45,OverallHardness=400,bHighHardness=true)
ArmorPlates(11)=(PlateName=RIGHTOVERHANG,ArmorZoneType=AZT_Right,PlateThickness=16,OverallHardness=400,bHighHardness=true)
ArmorPlates(12)=(PlateName=RIGHTUPPER,ArmorZoneType=AZT_Right,PlateThickness=40,OverallHardness=400,bHighHardness=true)
ArmorPlates(13)=(PlateName=TURRETGLACIS,ArmorZoneType=AZT_TurretFront,PlateThickness=45,OverallHardness=400,bHighHardness=false)
ArmorPlates(14)=(PlateName=TURRETFRONT,ArmorZoneType=AZT_TurretFront,PlateThickness=52,OverallHardness=430,bHighHardness=true)
ArmorPlates(15)=(PlateName=TURRETRIGHTFRONT,ArmorZoneType=AZT_TurretRight,PlateThickness=52,OverallHardness=430,bHighHardness=true)
ArmorPlates(16)=(PlateName=TURRETRIGHTREAR,ArmorZoneType=AZT_TurretRight,PlateThickness=52,OverallHardness=430,bHighHardness=true)
ArmorPlates(17)=(PlateName=TURRETLEFTFRONT,ArmorZoneType=AZT_TurretLeft,PlateThickness=52,OverallHardness=430,bHighHardness=true)
ArmorPlates(18)=(PlateName=TURRETLEFTREAR,ArmorZoneType=AZT_TurretLeft,PlateThickness=52,OverallHardness=430,bHighHardness=true)
ArmorPlates(19)=(PlateName=TURRETREAR,ArmorZoneType=AZT_TurretBack,PlateThickness=52,OverallHardness=430,bHighHardness=true)
ArmorPlates(20)=(PlateName=TURRETROOF,ArmorZoneType=AZT_TurretRoof,PlateThickness=20,OverallHardness=400,bHighHardness=true)
ArmorPlates(21)=(PlateName=DRIVERHATCH,ArmorZoneType=AZT_Front,PlateThickness=72,OverallHardness=340,bHighHardness=false)
ArmorPlates(22)=(PlateName=LEFTTURRETVIEWSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=36,OverallHardness=150,bHighHardness=false)
ArmorPlates(23)=(PlateName=RIGHTTURRETVIEWSLIT,ArmorZoneType=AZT_WeakSpots,PlateThickness=36,OverallHardness=150,bHighHardness=false)
ArmorPlates(24)=(PlateName=ENGINEDECKGRILL,ArmorZoneType=AZT_WeakSpots,PlateThickness=10,OverallHardness=150,bHighHardness=false)
[свернуть]

Функция просчета попадания


if( NewHitInfos.Length > 0 )
{
for (i = 0; i < NewHitInfos.Length; i++)
{
HitIndex = ArmorHitZones.Find('ZoneName',NewHitInfos[i].HitInfo.BoneName);
if( HitIndex >= 0 && FirstArmorIndex < 0 )
{
FirstArmorIndex = HitIndex;

// Don't need to do a penetration calc for an insta penetrate zone
if( !ArmorHitZones[HitIndex].bInstaPenetrateZone )
{
PlateIndex = ArmorPlates.Find('PlateName',ArmorHitZones[HitIndex].ArmorPlateName);

// calc the armor penetration props we need
if( !ShellProjectile.bProjectileIsHEAT )
{
Td = ArmorPlates[PlateIndex].PlateThickness/ShellProjectile.Caliber;
SlopeCoefficient = Td + ShellProjectile.SlopeEffect; // Slope_c
}
WeakenedPlateResistance = ArmorPlates[PlateIndex].PlateThickness * ArmorPlates[PlateIndex].PlateStrength; // Weak_R

if( !ShellProjectile.bProjectileIsHEAT )
{
if( ArmorPlates[PlateIndex].bHighHardness )
{
BaseResistanceOne = WeakenedPlateResistance * ((0.2 * Td) + 0.6); // Base_R1
}
else
{
BaseResistanceOne = WeakenedPlateResistance; // Base_R1
}
BaseResistanceTwo = BaseResistanceOne * (1 - ((ShellProjectile.TestPlateHardness - ArmorPlates[PlateIndex].OverallHardness)/500)); // Base_R2
if( Td > ShellProjectile.ShatterTd )
{
bMayShatter = true;
}
MuzzleVelocityPercent = VSize(ShellProjectile.Velocity)/ShellProjectile.default.Speed;
PenetrationAmount = ShellProjectile.ActualRHA * MuzzleVelocityPercent;
}
else
{
PenetrationAmount = ShellProjectile.ActualRHA;
}

AOI = GetArmorAngleForShot(ArmorHitZones[HitIndex].PhysBodyBoneName, ArmorHitZones[HitIndex].ZoneName, ShotDirection, HitLocation, ArmorNormal);

// If less than 90 degrees
if( AOI < 1.570796326794888 )
{
if( !ShellProjectile.bProjectileIsHEAT )
{
Resistance = BaseResistanceTwo * ((1 / Cos(AOI)) ** SlopeCoefficient );
}
else
{
Resistance = WeakenedPlateResistance * ((1 / Cos(AOI)));
}
PRRatio = PenetrationAmount/Resistance;// PR
if( bMayShatter && PRRatio > ShellProjectile.ShatterNumber && !ShellProjectile.bProjectileIsHEAT )
{
bShattered = true;
FinalPRRatio = PRRatio * ShellProjectile.ShatteredPenEffectiveness;// PR_Final
}
else
{
FinalPRRatio = PRRatio;// PR_Final
}

if( FinalPRRatio < 0.89 )
{
// undermatch, no penetration chance at all, just a deflection
bUndermatched = true;
}
else if( FinalPRRatio > 1.12 )
{
// overmatch, guaranteed penetration
bOvermatched = true;
PenetrationProbability = 1.0;
}
else
{
PenetrationProbability = (1 + Sin((13.09*FinalPRRatio) - 13.046))/2;// Pen_Prob
}

if( bOvermatched || FRand() < PenetrationProbability )
{
bGotPenetration = true;
// Penetration
}
// Spalling calcs
else if( !bShattered && (FRand() < (PenetrationProbability/2)) &&
!ShellProjectile.bProjectileIsHEAT )
{
bSpalled = true;
}
}
// Greater than 90 degrees which means the shell basically hit
// the armor almost side on. Consider that an undermatch for now
else
{
// undermatch, no penetration chance at all, just a deflection
bUndermatched = true;
}

// Damage the plate
if( bGotPenetration || (!bShattered && !bUndermatched) )
{
if( ArmorPlates[PlateIndex].PlateStrength > 0 )
{
// Calc armor damage
Damage = (PenetrationProbability/2);
// No more damage than this zone has health, and never negative
ActualDamage = FMin(Damage, FMax(ArmorPlates[PlateIndex].PlateStrength, 0));
ArmorPlates[PlateIndex].PlateStrength -= ActualDamage;


// Set the values for displaying general armor damage
// to the player and replicating it to the clients.
// These values aren't used for penetration calcs, but
// rather abstract the damage into something the player
// can comprehend.
if( ActualDamage > 0 && Role == ROLE_Authority )
{
ArmorPlateZoneHealths[ArmorPlates[PlateIndex].ArmorZoneType] = ArmorPlates[PlateIndex].PlateStrength * 100;

// Call this directily on the server. Gets called on clients when
// ArmorPlateZoneHealthsCompressed is replicated which happens when PackArmorPlateZoneDamage
// changes the values on the server
ArmorZoneHealthUpdated( ArmorPlates[PlateIndex].ArmorZoneType );

// Pack this Hit Zone's new Health into the replicated array
PackArmorPlateZoneDamage(ArmorPlates[PlateIndex].ArmorZoneType);
}
}
}


if( bGotPenetration )
{
ShrapnelDamageCrew(ShotDirection, HitInfos, NewHitInfos[i], ShellProjectile.PenetrateShrapnelLength, ShellProjectile.PenetrateShrapnelChance);
if( bDebugPenetration )
{
DrawDebugSphere(HitLocation,4,12,0,255,0,true);// green = penetrate
`log("Shot penetrated Plate "$ArmorHitZones[HitIndex].ArmorPlateName$" ArmorHitZone Name "$NewHitInfos[i].HitInfo.BoneName);
}
}
else
{
if( bSpalled )
{
if( bDebugPenetration )
{
`log("Shot spalled Plate "$ArmorHitZones[HitIndex].ArmorPlateName$" ArmorHitZone Name "$NewHitInfos[i].HitInfo.BoneName);
}
ShrapnelDamageCrew(ShotDirection, HitInfos, NewHitInfos[i], ShellProjectile.SpallShrapnelLength, ShellProjectile.SpallShrapnelChance);
}

DeflectedVelocity = ShellProjectile.Velocity * (1 - Cos(AOI));

if(!IsZero(DeflectedVelocity))
{
ShellProjectile.Velocity = DeflectedVelocity;
}
else
{
ShellProjectile.Velocity = Normal(ShellProjectile.Velocity);
}
return false;
}
}
// Insta penetration zone
else
{
bGotPenetration = true;

if( bDebugPenetration )
{
DrawDebugSphere(HitLocation,4,12,0,255,0,true);// green = penetrate
`log("Shot penetrated insta penetrate zone ArmorHitZone Name "$NewHitInfos[i].HitInfo.BoneName);
}
}
}
NewHitInfos[i].RayDir = CurrentImpact.RayDir;
HitInfos[HitInfos.Length] = NewHitInfos[i];
}
}
// If we decide we want to do general vehicle damage again instead
// of only locational damage, then this is the place to do it.
else
{
//Other.TakeDamage(ImpactDamage,InstigatorController,HitLocation,MomentumTransfer * CurrentImpact.RayDir, ImpactDamageType,, self);
}

if( FirstArmorIndex >= 0 )
{
if( bGotPenetration )
{
return true;
}
// TODO: Don't think we can get here anymore. Clean this up - Ramm
else
{
DeflectedVelocity = ShellProjectile.Velocity * (1 - Cos(AOI));

if(!IsZero(DeflectedVelocity))
{
ShellProjectile.Velocity = DeflectedVelocity;
}
else
{
ShellProjectile.Velocity = Normal(ShellProjectile.Velocity);
}
return false;
}
}
else
{
return false;
}
}
[свернуть]


Считай, Сеня.
Malinovskiy вне форума   Ответить с цитированием
Сказал спасибо (1):
FOXBAT (21.04.2012)