Цитата:
Сообщение от Димон
Делал в клссе абзац: килл пилот туррет 0 дисэйбл, в аи отключалась турель. Может с летабельной версией другой код нужен? Попросим Васю пошаманить
|
В последних патчах команда по другому называеться.
Код:
public void update(float f)
{
super.update(f);
if(!bGunUp)
{
if(fGunPos > 0.0F)
{
fGunPos -= 0.2F * f;
super.FM.turret[0].bIsOperable = false;
hierMesh().chunkVisible("Turret1A_D0", false);
hierMesh().chunkVisible("Turret1B_D0", false);
hierMesh().chunkVisible("Turdown_D0", true);
}
} else
if(fGunPos < 1.0F)
{
fGunPos += 0.2F * f;
if(fGunPos > 0.8F && fGunPos < 0.9F)
{
super.FM.turret[0].bIsOperable = true;
hierMesh().chunkVisible("Turret1A_D0", true);
hierMesh().chunkVisible("Turret1B_D0", true);
hierMesh().chunkVisible("Turdown_D0", false);
}
}
if(fGunPos < 0.333F)
hierMesh().chunkSetAngles("Blister2_D0", 0.0F, -Aircraft.cvt(fGunPos, 0.0F, 0.333F, 0.0F, 41F), 0.0F);
else
if(fGunPos < 0.666F)
{
resetYPRmodifier();
Aircraft.xyz[1] = Aircraft.cvt(fGunPos, 0.333F, 0.666F, 0.0F, -0.4F);
} else
{
hierMesh().chunkSetAngles("Blister2_D0", 0.0F, -Aircraft.cvt(fGunPos, 0.666F, 1.0F, 41F, 71F), 0.0F);
}
if(super.FM.turret[0].bIsAIControlled)
{
if(super.FM.turret[0].target != null && ((FlightModelMain) (super.FM)).AS.astatePilotStates[2] < 90)
bGunUp = true;
if(Time.current() > btme)
{
btme = Time.current() + World.Rnd().nextLong(5000L, 12000L);
if(super.FM.turret[0].target == null && ((FlightModelMain) (super.FM)).AS.astatePilotStates[2] < 90)
bGunUp = false;
}
}
}