share/hedgewars/Data/Scripts/Multiplayer/Capture_the_Flag.lua
changeset 13110 efcdf31684ca
parent 13109 59ebdb80d693
child 13111 10c914738f22
equal deleted inserted replaced
13109:59ebdb80d693 13110:efcdf31684ca
   507 
   507 
   508 end
   508 end
   509 
   509 
   510 function onGearResurrect(gear)
   510 function onGearResurrect(gear)
   511 
   511 
   512 	-- mark the flag thief as dead if he needed a respawn
   512 	if GetGearType(gear) == gtHedgehog then
   513 	for i = 0,1 do
   513 		-- mark the flag thief as dead if he needed a respawn
   514 		if gear == fThief[i] then
   514 		for i = 0,1 do
   515 			FlagThiefDead(gear)
   515 			if gear == fThief[i] then
   516 		end
   516 				FlagThiefDead(gear)
   517 	end
   517 			end
   518 
   518 		end
   519 	AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
   519 		AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
       
   520 	end
   520 
   521 
   521 end
   522 end
   522 
   523 
   523 function InABetterPlaceNow(gear)
   524 function InABetterPlaceNow(gear)
   524 	for h = 0, (numhhs-1) do
   525 	for h = 0, (numhhs-1) do
   560 		hhs[numhhs] = gear
   561 		hhs[numhhs] = gear
   561 		numhhs = numhhs + 1
   562 		numhhs = numhhs + 1
   562 		SetEffect(gear, heResurrectable, 1)
   563 		SetEffect(gear, heResurrectable, 1)
   563 
   564 
   564 	elseif GetGearType(gear) == gtPiano then
   565 	elseif GetGearType(gear) == gtPiano then
   565 
       
   566 		for i = 0, 1 do
   566 		for i = 0, 1 do
   567 			if CurrentHedgehog == fThief[i] then
   567 			if CurrentHedgehog == fThief[i] then
   568 				FlagThiefDead(gear)
   568 				FlagThiefDead(CurrentHedgehog)
   569 			end
   569 			end
   570 		end
   570 		end
   571 
   571 
   572 	end
   572 	end
   573 
   573