share/hedgewars/Data/Maps/Knockball/map.lua
changeset 7777 e0be9fbc21b4
parent 4517 0618b31023dc
child 8349 a1dbe148f10f
equal deleted inserted replaced
7775:835ad028fb66 7777:e0be9fbc21b4
    32 	SetAmmo(amSkip, 9, 0, 0, 0)
    32 	SetAmmo(amSkip, 9, 0, 0, 0)
    33 end
    33 end
    34 
    34 
    35 function onGearAdd(gear)
    35 function onGearAdd(gear)
    36 	if GetGearType(gear) == gtShover then
    36 	if GetGearType(gear) == gtShover then
    37 		ball = AddGear(GetX(gear), GetY(gear), gtBall, 0, 0, 0, 0)
    37 		ball = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtBall, 0, 0, 0, 0)
    38 		if ball ~= nil then
    38 		if ball ~= nil then
    39 			local dx, dy = GetGearVelocity(gear)
    39 			local dx, dy = GetGearVelocity(gear)
    40 			SetGearVelocity(ball, dx * 2, dy * 2)
    40 			SetGearVelocity(ball, dx * 2, dy * 2)
    41 			SetState(ball, 0x200) -- temporary - might change!
    41 			SetState(ball, 0x200) -- temporary - might change!
    42 			SetTag(ball, 8) -- baseball skin
    42 			SetTag(ball, 8) -- baseball skin