{
GET(TechnoClass*, pThis, ECX);
GET(TechnoClass*, pTarget, EDI);
GET(WeaponTypeClass*, pFiringWeaponType, EBX);
int idxWeapon = R->Base<int>(0xC);
auto pData = WeaponTypeExt::ExtMap.Find(pFiringWeaponType);
int Thickness = pData->Laser_Thickness;
LaserDrawClass *pLaser = NULL;
if(BuildingClass* pBld = specific_cast<BuildingClass*>(pThis)) {
WeaponTypeClass* pTWeapon = pBld->GetTurretWeapon()->WeaponType;
if(pLaser = pBld->CreateLaser(pTarget, idxWeapon, pTWeapon, &TechnoClass::DefaultCoords)) {
if (Thickness == -1) {
pLaser->Thickness = 3;
} else {
pLaser->Thickness = Thickness;
}
BuildingTypeClass *pBldType = pBld->Type;
BuildingTypeExt::ExtData *pBldTypeData = BuildingTypeExt::ExtMap.Find(pBldType);
if (pBldTypeData->PrismForwarding.Enabled == BuildingTypeExt::cPrismForwarding::YES
|| pBldTypeData->PrismForwarding.Enabled == BuildingTypeExt::cPrismForwarding::ATTACK) {
if (pBld->SupportingPrisms > 0) {
if (pBldTypeData->PrismForwarding.Intensity < 0) {
pLaser->Thickness -= pBldTypeData->PrismForwarding.Intensity;
} else if (pBldTypeData->PrismForwarding.Intensity > 0) {
pLaser->Thickness += (pBldTypeData->PrismForwarding.Intensity * pBld->SupportingPrisms);
}
}
}
}
} else {
if(pLaser = pThis->CreateLaser(pTarget, idxWeapon, pFiringWeaponType, &TechnoClass::DefaultCoords)) {
if (Thickness == -1) {
pLaser->Thickness = 2;
} else {
pLaser->Thickness = Thickness;
}
}
}
if(pLaser) {
pLaser->field_21 = 1;
}
return 0x6FF656;
}