Function ModifyGateBJ

Line
4307
Location
blizzard.j
Constant?
no
Type
function
Arguments
integer gateOperation, destructable d
Returns
nothing
4307
function ModifyGateBJ takes integer gateOperation, destructable d returns nothing
4308
    if (gateOperation == bj_GATEOPERATION_CLOSE) then
4309
        if (GetDestructableLife(d) <= 0) then
4310
            call DestructableRestoreLife(d, GetDestructableMaxLife(d), true)
4311
        endif
4312
        call SetDestructableAnimation(d, "stand")
4313
    elseif (gateOperation == bj_GATEOPERATION_OPEN) then
4314
        if (GetDestructableLife(d) > 0) then
4315
            call KillDestructable(d)
4316
        endif
4317
        call SetDestructableAnimation(d, "death alternate")
4318
    elseif (gateOperation == bj_GATEOPERATION_DESTROY) then
4319
        if (GetDestructableLife(d) > 0) then
4320
            call KillDestructable(d)
4321
        endif
4322
        call SetDestructableAnimation(d, "death")
4323
    else
4324
        // Unrecognized gate state - ignore the request.
4325
    endif
4326
endfunction