Ver código fonte

Some shortcuts; SMG spread;

tie372 12 anos atrás
pai
commit
6c645fab57
3 arquivos alterados com 13 adições e 2 exclusões
  1. 1 1
      data/weapon/smg.lua
  2. 10 1
      lib/hud.lua
  3. 2 0
      ovw/menu.lua

+ 1 - 1
data/weapon/smg.lua

@@ -19,7 +19,7 @@ SMG.firerate = .15
 SMG.reload = 1.6
 SMG.clip = 12
 SMG.ammo = 240
-SMG.spread = .08
+SMG.spread = .03
 SMG.dx = 10
 SMG.dy = 84
 SMG.tipx = 4

+ 10 - 1
lib/hud.lua

@@ -165,7 +165,16 @@ function Hud:keypressed(key)
     end
     return true
   else
-    if key == 'return' then
+    if self:classSelect() then
+      for i = 1, #data.class do
+        if key == tostring(i) then
+          ovw.net:send(msgClass, {
+            class = i,
+            team = myId > 1 and 1 or 0
+          })
+        end
+      end
+    elseif key == 'return' then
       self.chatting = true
       self.chatMessage = ''
       love.keyboard.setKeyRepeat(true)

+ 2 - 0
ovw/menu.lua

@@ -103,6 +103,8 @@ function Menu:keypressed(key)
         end)
       end
     end
+  elseif self.page == 'main' then
+    if key == 'return' then self:host() end
   end
 end