コード例 #1
0
void StandardDestroyerAttackPassive(Ship *ship,Ship *target,bool rotate)
{
    if ((rotate) & ((bool)((ShipStaticInfo *)(ship->staticinfo))->rotateToRetaliate))
    {
        attackPassiveRotate(ship,target);
    }
    else
    {
        attackPassive(ship,target);
    }
}
コード例 #2
0
void GenericDefenderAttackPassive(Ship *ship,Ship *target,bool rotate)
{
    if ((rotate) & ((bool)((ShipStaticInfo *)(ship->staticinfo))->rotateToRetaliate))
    {
        attackPassiveRotate(ship,target);
    }
    else
    {
        attackPassive(ship,target);
    }
}
コード例 #3
0
void AdvanceSupportFrigateAttackPassive(Ship *ship,Ship *target,bool rotate)
{
    if ((rotate) & ((bool)((ShipStaticInfo *)(ship->staticinfo))->rotateToRetaliate))
    {
        attackPassiveRotate(ship,target);
    }
    else
    {
        attackPassive(ship,target);
    }
}
コード例 #4
0
ファイル: MultiGunCorvette.c プロジェクト: Almamu/homeworld
void MultiGunCorvetteAttackPassive(Ship *ship,Ship *target,bool rotate)
{
    if ((rotate) & ((bool)((ShipStaticInfo *)(ship->staticinfo))->rotateToRetaliate))
    {
        attackPassiveRotate(ship,target);
    }
    else
    {
        attackPassive(ship,target);
    }
}
コード例 #5
0
ファイル: Drone.c プロジェクト: australopitheque/HomeworldSDL
void DroneAttackPassive(Ship *ship,Ship *target,bool rotate)
{
    DroneSpec *spec = (DroneSpec *)ship->ShipSpecifics;

    if (spec->droneState != DRONE_STATE_LAUNCHED)
    {
        return;     // only allow fully launched drones to shoot
    }

    if ((rotate) & ((bool)((ShipStaticInfo *)(ship->staticinfo))->rotateToRetaliate))
    {
        attackPassiveRotate(ship,target);
    }
    else
    {
        attackPassive(ship,target);
    }
}
コード例 #6
0
ファイル: Carrier.c プロジェクト: rcarmo/homeworld
void CarrierAttackPassive(Ship *ship,Ship *target,bool rotate)
{
    attackPassive(ship,target);
}