Unified MA

mask types
This commit is contained in:
ChocoTaco1 2021-04-28 01:17:44 -04:00
parent 1b19f9b485
commit d1cf884bdf
3 changed files with 57 additions and 60 deletions

13
Classic/scripts/autoexec/EvoStats.cs Normal file → Executable file
View file

@ -276,11 +276,12 @@ function handleMAStat(%data, %projectile, %targetObject, %modifier, %position, %
// Eolk - changes to MA code // Eolk - changes to MA code
%position = %targetObject.getPosition(); %position = %targetObject.getPosition();
%raycast = containerRaycast(%position, vectorAdd(%position, "0 0 -10"), $TypeMasks::ForceFieldObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StaticObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::VehicleObjectType, %targetObject); %raycast = containerRaycast(%position, vectorAdd(%position, "0 0 -10"), $TypeMasks::ForceFieldObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticObjectType | $TypeMasks::TerrainObjectType, %targetObject);
if(!isObject(firstWord(%raycast))) // We've got something... if(!isObject(firstWord(%raycast))) // We've got something...
{ {
if(%projectileType $= "DiscProjectile") switch$(%projectileType)
{ {
case DiscProjectile:
%killer.midairs++; %killer.midairs++;
if( ( %killer.showMA $= "" ) || ( %killer.showMA == 1 ) ) if( ( %killer.showMA $= "" ) || ( %killer.showMA == 1 ) )
@ -301,9 +302,7 @@ function handleMAStat(%data, %projectile, %targetObject, %modifier, %position, %
$stats::ma_maxdistance = %distance; $stats::ma_maxdistance = %distance;
$stats::ma_maxdistanceclient = getTaggedString(%killer.name); $stats::ma_maxdistanceclient = getTaggedString(%killer.name);
} }
} case PlasmaBolt:
else if(%projectileType $= "PlasmaBolt")
{
%killer.PlaMA++; %killer.PlaMA++;
if ( ( %killer.showMA $= "" ) || ( %killer.showMA == 1 ) ) if ( ( %killer.showMA $= "" ) || ( %killer.showMA == 1 ) )
@ -324,9 +323,7 @@ function handleMAStat(%data, %projectile, %targetObject, %modifier, %position, %
$stats::PlaMA_maxdistance = %distance; $stats::PlaMA_maxdistance = %distance;
$stats::PlaMA_maxdistanceclient = getTaggedString(%killer.name); $stats::PlaMA_maxdistanceclient = getTaggedString(%killer.name);
} }
} case EnergyBolt:
else if(%projectileType $= "EnergyBolt")
{
%killer.blaMA++; %killer.blaMA++;
if( ( %killer.showMA $= "" ) || ( %killer.showMA == 1 ) ) if( ( %killer.showMA $= "" ) || ( %killer.showMA == 1 ) )

2
Classic/scripts/autoexec/MidAirDetRep.cs Normal file → Executable file
View file

@ -131,7 +131,7 @@ function maDirect(%client)// tests for direct hit with aoe weapons
function maRayTestDis(%targetObject)// tests for height of target function maRayTestDis(%targetObject)// tests for height of target
{ {
%mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType; %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::VehicleObjectType;
%rayStart = %targetObject.getWorldBoxCenter(); %rayStart = %targetObject.getWorldBoxCenter();
%rayEnd = VectorAdd(%rayStart,"0 0" SPC -5000); %rayEnd = VectorAdd(%rayStart,"0 0" SPC -5000);
%ray = ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject); %ray = ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject);

4
Classic/scripts/autoexec/zDarkTigerStats.cs Normal file → Executable file
View file

@ -5759,7 +5759,7 @@ function GameConnection::dtMessage(%this,%message,%sfx,%bypass){
function rayTest(%targetObject,%dis){ function rayTest(%targetObject,%dis){
if(isObject(%targetObject)){ if(isObject(%targetObject)){
%mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType; %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::VehicleObjectType;
%rayStart = %targetObject.getWorldBoxCenter(); %rayStart = %targetObject.getWorldBoxCenter();
%rayEnd = VectorAdd(%rayStart,"0 0" SPC ((%dis+1.15) * -1)); %rayEnd = VectorAdd(%rayStart,"0 0" SPC ((%dis+1.15) * -1));
%ground = !ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject); %ground = !ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject);
@ -5770,7 +5770,7 @@ function rayTest(%targetObject,%dis){
} }
function rayTestDis(%targetObject){ function rayTestDis(%targetObject){
if(isObject(%targetObject)){ if(isObject(%targetObject)){
%mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType; %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::VehicleObjectType;
%rayStart = %targetObject.getWorldBoxCenter(); %rayStart = %targetObject.getWorldBoxCenter();
%rayEnd = VectorAdd(%rayStart,"0 0" SPC -5000); %rayEnd = VectorAdd(%rayStart,"0 0" SPC -5000);
%ray = ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject); %ray = ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject);