hedgewars/uScript.pas
branchhedgeroid
changeset 5655 44c2d19f79e2
parent 5644 4ad07103cfae
parent 5638 e35ba2a400d8
child 5725 e27100a0e2d0
equal deleted inserted replaced
5647:28ab6763da9d 5655:44c2d19f79e2
  1107         PlaySound(TSound(lua_tointeger(L, 1)))
  1107         PlaySound(TSound(lua_tointeger(L, 1)))
  1108     else if lua_gettop(L) = 2 then
  1108     else if lua_gettop(L) = 2 then
  1109         begin
  1109         begin
  1110         gear:= GearByUID(lua_tointeger(L, 2));
  1110         gear:= GearByUID(lua_tointeger(L, 2));
  1111         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
  1111         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
  1112             PlaySound(TSound(lua_tointeger(L, 1)),gear^.Hedgehog^.Team^.Voicepack)
  1112             AddVoice(TSound(lua_tointeger(L, 1)),gear^.Hedgehog^.Team^.Voicepack)
  1113         end
  1113         end
  1114     else LuaError('Lua: Wrong number of parameters passed to PlaySound!');
  1114     else LuaError('Lua: Wrong number of parameters passed to PlaySound!');
  1115     lc_playsound:= 0;
  1115     lc_playsound:= 0;
  1116 end;
  1116 end;
  1117 
  1117