hedgewars/uScript.pas
changeset 5638 e35ba2a400d8
parent 5612 2638dec1b323
child 5655 44c2d19f79e2
child 5676 a655dfab27d7
equal deleted inserted replaced
5636:c18aed7ad618 5638:e35ba2a400d8
  1104         PlaySound(TSound(lua_tointeger(L, 1)))
  1104         PlaySound(TSound(lua_tointeger(L, 1)))
  1105     else if lua_gettop(L) = 2 then
  1105     else if lua_gettop(L) = 2 then
  1106         begin
  1106         begin
  1107         gear:= GearByUID(lua_tointeger(L, 2));
  1107         gear:= GearByUID(lua_tointeger(L, 2));
  1108         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
  1108         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
  1109             PlaySound(TSound(lua_tointeger(L, 1)),gear^.Hedgehog^.Team^.Voicepack)
  1109             AddVoice(TSound(lua_tointeger(L, 1)),gear^.Hedgehog^.Team^.Voicepack)
  1110         end
  1110         end
  1111     else LuaError('Lua: Wrong number of parameters passed to PlaySound!');
  1111     else LuaError('Lua: Wrong number of parameters passed to PlaySound!');
  1112     lc_playsound:= 0;
  1112     lc_playsound:= 0;
  1113 end;
  1113 end;
  1114 
  1114