From cefaeae5f67fa8fcd50c72c786accb7ee652f623 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Tue, 26 Jul 2022 15:28:36 +0200 Subject: [PATCH] Added team flags, better sound, and resupply mechanic. --- .../aos2_client/render/GameRenderer.java | 36 +- .../aos2_client/sound/SoundManager.java | 2 + client/src/main/resources/model/flag.mtl | 13 + client/src/main/resources/model/flag.obj | 126 +++++ client/src/main/resources/model/flag.png | Bin 0 -> 34079 bytes client/src/main/resources/model/smg.mtl | 13 + client/src/main/resources/model/smg.obj | 429 ++++++++++++++++++ client/src/main/resources/model/smg.png | Bin 0 -> 5646 bytes .../main/resources/shader/model/vertex.glsl | 2 +- .../ClientCommunicationHandler.java | 8 +- .../nl/andrewl/aos2_server/PlayerManager.java | 12 +- .../java/nl/andrewl/aos2_server/Server.java | 2 +- .../aos2_server/config/ServerConfig.java | 2 + .../logic/PlayerActionManager.java | 19 +- 14 files changed, 646 insertions(+), 18 deletions(-) create mode 100644 client/src/main/resources/model/flag.mtl create mode 100644 client/src/main/resources/model/flag.obj create mode 100644 client/src/main/resources/model/flag.png create mode 100644 client/src/main/resources/model/smg.mtl create mode 100644 client/src/main/resources/model/smg.obj create mode 100644 client/src/main/resources/model/smg.png diff --git a/client/src/main/java/nl/andrewl/aos2_client/render/GameRenderer.java b/client/src/main/java/nl/andrewl/aos2_client/render/GameRenderer.java index 812860e..46cee6a 100644 --- a/client/src/main/java/nl/andrewl/aos2_client/render/GameRenderer.java +++ b/client/src/main/java/nl/andrewl/aos2_client/render/GameRenderer.java @@ -8,6 +8,7 @@ import nl.andrewl.aos2_client.render.chunk.ChunkRenderer; import nl.andrewl.aos2_client.render.gui.GUIRenderer; import nl.andrewl.aos2_client.render.gui.GUITexture; import nl.andrewl.aos2_client.render.model.Model; +import nl.andrewl.aos_core.model.Team; import nl.andrewl.aos_core.model.item.BlockItemStack; import nl.andrewl.aos_core.model.item.Gun; import nl.andrewl.aos_core.model.item.GunItemStack; @@ -49,6 +50,8 @@ public class GameRenderer { private Model rifleModel; private Model blockModel; private Model bulletModel; + private Model smgModel; + private Model flagModel; // Standard GUI textures. private GUITexture crosshairTexture; @@ -141,8 +144,10 @@ public class GameRenderer { try { playerModel = new Model("model/player_simple.obj", "model/simple_player.png"); rifleModel = new Model("model/rifle.obj", "model/rifle.png"); + smgModel = new Model("model/smg.obj", "model/smg.png"); blockModel = new Model("model/block.obj", "model/block.png"); bulletModel = new Model("model/bullet.obj", "model/bullet.png"); + flagModel = new Model("model/flag.obj", "model/flag.png"); } catch (IOException e) { throw new RuntimeException(e); } @@ -204,6 +209,7 @@ public class GameRenderer { } playerModel.unbind(); + // Render guns! rifleModel.bind(); if (myPlayer.getInventory().getSelectedItemStack().getType().getId() == ItemTypes.RIFLE.getId()) { modelRenderer.render(rifleModel, myPlayer.getHeldItemTransformData(), myPlayer.getHeldItemNormalTransformData()); @@ -214,6 +220,16 @@ public class GameRenderer { } } rifleModel.unbind(); + smgModel.bind(); + if (myPlayer.getInventory().getSelectedItemStack().getType().getId() == ItemTypes.AK_47.getId()) { + modelRenderer.render(smgModel, myPlayer.getHeldItemTransformData(), myPlayer.getHeldItemNormalTransformData()); + } + for (var player : client.getPlayers().values()) { + if (player.getHeldItemId() == ItemTypes.AK_47.getId()) { + modelRenderer.render(smgModel, player.getHeldItemTransformData(), player.getHeldItemNormalTransformData()); + } + } + smgModel.unbind(); blockModel.bind(); if (client.getMyPlayer().getInventory().getSelectedItemStack().getType().getId() == ItemTypes.BLOCK.getId()) { @@ -230,17 +246,27 @@ public class GameRenderer { blockModel.unbind(); bulletModel.bind(); - Matrix4f projectileTransform = new Matrix4f(); - Matrix3f projectileNormalTransform = new Matrix3f(); + Matrix4f modelTransform = new Matrix4f(); + Matrix3f normalTransform = new Matrix3f(); for (var projectile : client.getProjectiles().values()) { - projectileTransform.identity() + modelTransform.identity() .translate(projectile.getPosition()) .rotateTowards(projectile.getVelocity(), Camera.UP) .scale(1, 1, projectile.getVelocity().length() / 5); - projectileTransform.normal(projectileNormalTransform); - modelRenderer.render(bulletModel, projectileTransform, projectileNormalTransform); + modelTransform.normal(normalTransform); + modelRenderer.render(bulletModel, modelTransform, normalTransform); } bulletModel.unbind(); + // Draw team bases. + flagModel.bind(); + for (Team team : client.getTeams().values()) { + modelTransform.identity() + .translate(team.getSpawnPoint()); + modelTransform.normal(normalTransform); + modelRenderer.setAspectColor(team.getColor()); + modelRenderer.render(flagModel, modelTransform, normalTransform); + } + flagModel.unbind(); modelRenderer.end(); diff --git a/client/src/main/java/nl/andrewl/aos2_client/sound/SoundManager.java b/client/src/main/java/nl/andrewl/aos2_client/sound/SoundManager.java index 8711744..d8fb897 100644 --- a/client/src/main/java/nl/andrewl/aos2_client/sound/SoundManager.java +++ b/client/src/main/java/nl/andrewl/aos2_client/sound/SoundManager.java @@ -76,6 +76,8 @@ public class SoundManager { load("hurt_1", "sound/m_hurt_1.wav"); load("hurt_2", "sound/m_hurt_2.wav"); load("hurt_3", "sound/m_hurt_3.wav"); + load("block_break_1", "sound/m_block_break_1.wav"); + load("block_place_1", "sound/m_block_place_1.wav"); } public void load(String name, String resource) { diff --git a/client/src/main/resources/model/flag.mtl b/client/src/main/resources/model/flag.mtl new file mode 100644 index 0000000..c31ea8c --- /dev/null +++ b/client/src/main/resources/model/flag.mtl @@ -0,0 +1,13 @@ +# Blender MTL File: 'flag.blend' +# Material Count: 1 + +newmtl Material +Ns 323.999994 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd flag.png diff --git a/client/src/main/resources/model/flag.obj b/client/src/main/resources/model/flag.obj new file mode 100644 index 0000000..fd39602 --- /dev/null +++ b/client/src/main/resources/model/flag.obj @@ -0,0 +1,126 @@ +# Blender v2.82 (sub 7) OBJ File: 'flag.blend' +# www.blender.org +mtllib flag.mtl +o Cube +v 0.021753 -0.000523 -0.021753 +v 0.021753 -0.000523 0.021753 +v -0.021753 -0.000523 -0.021753 +v -0.021753 -0.000523 0.021753 +v 0.021753 2.024803 -0.021753 +v -0.021753 2.024803 0.021753 +v 0.021753 2.024803 0.021753 +v -0.021753 2.024803 -0.021753 +v -0.021753 2.490187 0.021753 +v 0.021753 2.490187 -0.021753 +v 0.021753 2.490187 0.021753 +v -0.021753 2.490187 -0.021753 +v 0.021753 2.032514 -0.012643 +v 0.021753 2.032514 0.012643 +v 0.021753 2.482476 -0.012643 +v 0.021753 2.482476 0.012643 +v 0.860993 2.268260 -0.012643 +v 0.860993 2.268260 0.012643 +v 0.860993 2.334399 -0.012643 +v 0.860993 2.334399 0.012643 +vt 0.040124 0.353694 +vt 0.075286 0.337669 +vt 0.075286 0.353694 +vt 0.801868 0.212704 +vt 0.837362 0.958716 +vt 0.801868 0.958716 +vt 0.917935 0.212704 +vt 0.953429 0.958716 +vt 0.917935 0.958716 +vt 0.914740 0.787296 +vt 0.879246 0.041284 +vt 0.914740 0.041284 +vt 0.840557 0.212704 +vt 0.876051 0.958716 +vt 0.840557 0.958716 +vt 0.801868 0.041284 +vt 0.837362 0.212704 +vt 0.953429 0.212704 +vt 0.945997 0.044125 +vt 0.953429 0.041284 +vt 0.914740 0.958716 +vt 0.879246 0.787296 +vt 0.840557 0.041284 +vt 0.876051 0.212704 +vt 0.955955 0.332400 +vt 0.976585 0.014314 +vt 0.976585 0.332400 +vt 0.925367 0.044125 +vt 0.917935 0.041284 +vt 0.925367 0.209864 +vt 0.945997 0.209864 +vt 0.098426 0.362406 +vt 0.077796 0.338044 +vt 0.098426 0.338044 +vt 0.416654 0.323037 +vt 0.591421 0.013911 +vt 0.783751 0.323037 +vt 0.999072 0.014072 +vt 0.978442 0.326777 +vt 0.978442 0.014072 +vt 0.383616 0.323037 +vt 0.208850 0.013911 +vt 0.262809 0.013911 +vt 0.036950 0.353694 +vt 0.001591 0.337669 +vt 0.036950 0.337669 +vt 0.040124 0.337669 +vt 0.837362 0.041284 +vt 0.879246 0.958716 +vt 0.876051 0.041284 +vt 0.955955 0.014314 +vt 0.077796 0.362406 +vt 0.537462 0.013911 +vt 0.999072 0.326777 +vt 0.016519 0.323037 +vt 0.001591 0.353694 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.2704 -0.9627 0.0000 +vn 0.1738 0.9848 0.0000 +vn 0.0000 1.0000 0.0000 +usemtl Material +s off +f 1/1/1 4/2/1 3/3/1 +f 8/4/2 1/5/2 3/6/2 +f 5/7/3 2/8/3 1/9/3 +f 6/10/4 3/11/4 4/12/4 +f 7/13/5 4/14/5 2/15/5 +f 12/16/2 5/17/2 8/4/2 +f 7/18/3 16/19/3 11/20/3 +f 9/21/4 8/22/4 6/10/4 +f 11/23/5 6/24/5 7/13/5 +f 13/25/6 18/26/6 14/27/6 +f 11/20/3 15/28/3 10/29/3 +f 10/29/3 13/30/3 5/7/3 +f 5/7/3 14/31/3 7/18/3 +f 19/32/3 18/33/3 17/34/3 +f 15/35/2 17/36/2 13/37/2 +f 16/38/7 19/39/7 15/40/7 +f 16/41/5 18/42/5 20/43/5 +f 9/44/8 10/45/8 12/46/8 +f 1/1/1 2/47/1 4/2/1 +f 8/4/2 5/17/2 1/5/2 +f 5/7/3 7/18/3 2/8/3 +f 6/10/4 8/22/4 3/11/4 +f 7/13/5 6/24/5 4/14/5 +f 12/16/2 10/48/2 5/17/2 +f 7/18/3 14/31/3 16/19/3 +f 9/21/4 12/49/4 8/22/4 +f 11/23/5 9/50/5 6/24/5 +f 13/25/6 17/51/6 18/26/6 +f 11/20/3 16/19/3 15/28/3 +f 10/29/3 15/28/3 13/30/3 +f 5/7/3 13/30/3 14/31/3 +f 19/32/3 20/52/3 18/33/3 +f 15/35/2 19/53/2 17/36/2 +f 16/38/7 20/54/7 19/39/7 +f 16/41/5 14/55/5 18/42/5 +f 9/44/8 11/56/8 10/45/8 diff --git a/client/src/main/resources/model/flag.png b/client/src/main/resources/model/flag.png new file mode 100644 index 0000000000000000000000000000000000000000..581ca3315e95ac2bb36dfc5e9ce754773898a703 GIT binary patch literal 34079 zcmeFa`9GB3|37}sWk!Qy?6OWtl(i%xOdBO@vSgi-JzI#ZGp!0~vu{&EcFGoE%2IZ+ zWfxhp?>qB3)9bnPe1HFe?+9xz2f<$GJc5kNe|sO^>uSRrk zZTY%K>($Rk5|WEu09l1JTE*52wS_j&nQ z{*3#jl$;vZztHeYm$IPWHZUKVQBrf703l!`8iU3C@57=I{`(;-^bPIUPP9;hF7V)Sn+vcq)#p?EtqVuwcTuNrFxe4Ib_A3E3MQG4&wxIG|MddwVB`))?qK8& zM($wbe=%|g7k6-R2N!p6aR(Q7aB-*Dwo`2T-2=SS`uk5n*uljeT-?FM9bDYO#sA;D zSdxb35YBd`nB{HFI=cHV_BYUYZ}1rT+ZtwUUek6c&3;$7$5{Hm@2JQfkSg@CnizTZ z>y^Oj#0}Ubn-c9`VA{JnRbsdDc`i3O&NyRwohhxYChczL@sTV4G;9C= zD^89lD71C^=b28K$#0YVd%W7s_UeyP+)Oc2j9*s%^ZE>l8PNenyf~7yR<_i$v_-Kx zu^LkEq?~J9vi%~h&D;Frkv! zx1ag%3qQ-KIw-;dd(3xMpqM3@r6LGs`0r>omvE3&!iYlS4cYZ-%BS7{47S~A-+%Lc z4LUg#p0>L18-=I8&Jl5J;6wn6Xes+o+Bt9Hh=+w2cv&t35aOPgwX$`YjlPM;^V z){Eu~?{55f@%b+IwmRtq(UNyjpl1WkJ)V8l(k+$z%i18VzIj4-v-30or%c_HcUdlh zr5E}j%@19I0!mz__Oqql1y43V2vDolgx+Zg`>`uM^+y(M+jL?y z!YM}5*x!G&U^%s46nu!(2?k=+}ZA)n3VUpX=YJYzn(sV zqhW|n42Lz7RN7ROH}c<9^wX;HUpiVpqlUm`9RJagPeb@F-hqh7KEba-z-6Jv%?S^c z50z~zB$x-SwvtqR$<9ta1<^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StbI<(*}0_&UB=}UpZ(F*D?wG0b$0_ z&~wk4=l=jAKO#`IK&}@(wI1w8O0)jTxLJ8)I?Ugb{!WY) zN`L@?Wd))m;P&m{(qZ%VbGx^HYml#X01U#eQUVVaxP7ERJXMP=MhhH&ebV0XG=Dsu z_ZeG!9T$g_`2WwochY{oPk;b{E(DH81;kV+odJspkKdl2$N&4Z<96D4d-iLqixpxo j0t5&UNJ1cmsRI8W!O8t6PDG0>00000NkvXXu0mjfCbi$O literal 0 HcmV?d00001 diff --git a/client/src/main/resources/model/smg.mtl b/client/src/main/resources/model/smg.mtl new file mode 100644 index 0000000..974311a --- /dev/null +++ b/client/src/main/resources/model/smg.mtl @@ -0,0 +1,13 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl Material +Ns 323.999994 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd smg.png diff --git a/client/src/main/resources/model/smg.obj b/client/src/main/resources/model/smg.obj new file mode 100644 index 0000000..94f7932 --- /dev/null +++ b/client/src/main/resources/model/smg.obj @@ -0,0 +1,429 @@ +# Blender v2.82 (sub 7) OBJ File: '' +# www.blender.org +mtllib smg.mtl +o Cube +v 0.044780 0.044780 -0.487616 +v 0.044780 -0.044780 -0.487616 +v 0.066336 0.066336 0.299058 +v 0.066336 -0.066336 0.299058 +v -0.044780 0.044780 -0.487616 +v -0.044780 -0.044780 -0.487616 +v -0.066336 0.066336 0.299058 +v -0.066336 -0.066336 0.299058 +v 0.041998 0.041998 0.350292 +v 0.041998 -0.041998 0.350292 +v -0.041998 0.041998 0.350292 +v -0.041998 -0.041998 0.350292 +v 0.041998 0.041998 0.568729 +v 0.041998 -0.041998 0.568729 +v -0.041998 0.041998 0.568729 +v -0.041998 -0.041998 0.568729 +v 0.027950 0.035810 0.590048 +v 0.027950 -0.020089 0.590048 +v -0.027950 0.035810 0.590048 +v -0.027950 -0.020089 0.590048 +v 0.027950 0.035810 0.922111 +v 0.027950 -0.020089 0.922111 +v -0.027950 0.035810 0.922111 +v -0.027950 -0.020089 0.922111 +v -0.066336 -0.066336 -0.183615 +v 0.066336 0.066336 -0.183615 +v -0.066336 0.066336 -0.183615 +v 0.066336 -0.066336 -0.183615 +v -0.066336 -0.066336 0.040061 +v 0.066336 0.066336 0.040061 +v -0.066336 0.066336 0.040061 +v 0.066336 -0.066336 0.040061 +v -0.066336 -0.066336 0.200724 +v 0.066336 0.066336 0.200724 +v -0.066336 0.066336 0.200724 +v 0.066336 -0.066336 0.200724 +v -0.066336 0.066336 -0.290947 +v 0.066336 -0.066336 -0.290947 +v -0.066336 -0.066336 -0.290947 +v 0.066336 0.066336 -0.290947 +v -0.020125 -0.080748 0.040061 +v 0.020125 -0.080748 0.040061 +v -0.020125 -0.080748 0.200724 +v 0.020125 -0.080748 0.200724 +v 0.020125 -0.245565 0.171517 +v 0.020125 -0.262304 0.040061 +v -0.020125 -0.262304 0.040061 +v -0.020125 -0.245565 0.171517 +v -0.031249 -0.080797 -0.183615 +v 0.031249 -0.080797 -0.183615 +v 0.031249 -0.080797 -0.290947 +v -0.031249 -0.080797 -0.290947 +v -0.016961 -0.121090 -0.183615 +v 0.016961 -0.121090 -0.183615 +v 0.016961 -0.121090 -0.233439 +v -0.016961 -0.121090 -0.233439 +v -0.016961 -0.156442 -0.200395 +v 0.016961 -0.156442 -0.200395 +v 0.016961 -0.145722 -0.233439 +v -0.016961 -0.145722 -0.233439 +v -0.022327 -0.173212 -0.211049 +v 0.022327 -0.173212 -0.211049 +v 0.022327 -0.165553 -0.234659 +v -0.022327 -0.165553 -0.234659 +v -0.014615 -0.178125 -0.236704 +v 0.014615 -0.178125 -0.236704 +v 0.014615 -0.173111 -0.239652 +v -0.014615 -0.173111 -0.239652 +vt 0.478133 0.487153 +vt 0.329777 0.550995 +vt 0.329777 0.487153 +vt 0.168220 0.447060 +vt 0.288039 0.413466 +vt 0.316431 0.447008 +vt 0.316431 0.830900 +vt 0.191235 0.958715 +vt 0.168220 0.830952 +vt 0.639842 0.010799 +vt 0.491486 0.074692 +vt 0.491486 0.010799 +vt 0.154881 0.489010 +vt 0.006670 0.552940 +vt 0.006670 0.488958 +vt 0.812724 0.557650 +vt 0.912661 0.499372 +vt 0.912661 0.557650 +vt 0.450919 0.585326 +vt 0.356992 0.727143 +vt 0.356992 0.585326 +vt 0.612627 0.108843 +vt 0.518700 0.108843 +vt 0.154881 0.552992 +vt 0.032654 0.586501 +vt 0.991137 0.151220 +vt 0.963002 0.105703 +vt 0.991137 0.096562 +vt 0.194204 0.413499 +vt 0.288039 0.271338 +vt 0.518700 0.250774 +vt 0.126489 0.586534 +vt 0.032654 0.728629 +vt 0.435209 0.741256 +vt 0.372701 0.956844 +vt 0.372701 0.741256 +vt 0.126489 0.728662 +vt 0.056435 0.742634 +vt 0.450919 0.727143 +vt 0.217985 0.257366 +vt 0.280431 0.257344 +vt 0.710922 0.540368 +vt 0.649292 0.576742 +vt 0.649292 0.540368 +vt 0.280431 0.041284 +vt 0.811040 0.487040 +vt 0.873547 0.271282 +vt 0.873547 0.487040 +vt 0.118881 0.742656 +vt 0.056435 0.958694 +vt 0.154881 0.169100 +vt 0.006670 0.238885 +vt 0.006670 0.169048 +vt 0.973685 0.428221 +vt 0.934450 0.358994 +vt 0.973685 0.358481 +vt 0.316431 0.615526 +vt 0.168220 0.761115 +vt 0.168220 0.615578 +vt 0.478133 0.167942 +vt 0.329777 0.237626 +vt 0.329777 0.167942 +vt 0.316431 0.510990 +vt 0.168220 0.511042 +vt 0.154881 0.238937 +vt 0.006670 0.384421 +vt 0.491486 0.413447 +vt 0.639842 0.268113 +vt 0.639842 0.413447 +vt 0.478133 0.237626 +vt 0.329777 0.382845 +vt 0.154881 0.384474 +vt 0.878685 0.266293 +vt 0.930360 0.371195 +vt 0.878685 0.370684 +vt 0.478133 0.382845 +vt 0.454029 0.041204 +vt 0.353881 0.041204 +vt 0.677299 0.533015 +vt 0.801551 0.405993 +vt 0.777446 0.533015 +vt 0.129733 0.041320 +vt 0.029684 0.041284 +vt 0.316431 0.761063 +vt 0.588168 0.434551 +vt 0.543160 0.543468 +vt 0.543160 0.434551 +vt 0.639842 0.425304 +vt 0.491486 0.425304 +vt 0.878685 0.381147 +vt 0.930360 0.485027 +vt 0.878685 0.485538 +vt 0.801551 0.267299 +vt 0.704868 0.276657 +vt 0.653194 0.267299 +vt 0.934710 0.351450 +vt 0.979718 0.265443 +vt 0.979718 0.351450 +vt 0.749876 0.276657 +vt 0.704868 0.394551 +vt 0.834242 0.134095 +vt 0.687259 0.241187 +vt 0.654602 0.134032 +vt 0.834242 0.123340 +vt 0.687259 0.016248 +vt 0.834242 0.005314 +vt 0.956806 0.167086 +vt 0.911086 0.134779 +vt 0.956806 0.097250 +vt 0.962462 0.157564 +vt 0.978598 0.221065 +vt 0.962462 0.243896 +vt 0.847858 0.003885 +vt 0.863802 0.067385 +vt 0.847858 0.090217 +vt 0.973685 0.505309 +vt 0.934450 0.435056 +vt 0.973685 0.435569 +vt 0.759876 0.540391 +vt 0.721943 0.556386 +vt 0.721943 0.540391 +vt 0.956806 0.173604 +vt 0.911086 0.205911 +vt 0.911086 0.173493 +vt 0.997221 0.550969 +vt 0.935464 0.519597 +vt 0.997221 0.510300 +vt 0.863802 0.026717 +vt 0.908227 0.058088 +vt 0.883569 0.134769 +vt 0.853125 0.149279 +vt 0.861681 0.133920 +vt 0.908227 0.036014 +vt 0.950336 0.058088 +vt 0.871594 0.156265 +vt 0.871594 0.184425 +vt 0.847255 0.132653 +vt 0.852856 0.130737 +vt 0.883569 0.205921 +vt 0.853125 0.191412 +vt 0.759876 0.556386 +vt 0.715943 0.569211 +vt 0.950336 0.036014 +vt 0.970813 0.061580 +vt 0.757253 0.573909 +vt 0.724566 0.577289 +vt 0.724566 0.573909 +vt 0.861682 0.206770 +vt 0.847255 0.208037 +vt 0.765877 0.569211 +vt 0.798370 0.569096 +vt 0.769426 0.545057 +vt 0.798370 0.540039 +vt 0.478133 0.550995 +vt 0.291284 0.958680 +vt 0.639842 0.074692 +vt 0.812724 0.499372 +vt 0.963002 0.142078 +vt 0.194204 0.271371 +vt 0.612627 0.250774 +vt 0.435209 0.956844 +vt 0.710922 0.576742 +vt 0.217985 0.041306 +vt 0.811040 0.271282 +vt 0.118881 0.958716 +vt 0.934451 0.428734 +vt 0.491486 0.268113 +vt 0.930360 0.266804 +vt 0.653194 0.405993 +vt 0.588168 0.543468 +vt 0.930360 0.380636 +vt 0.934710 0.265443 +vt 0.749877 0.394551 +vt 0.834242 0.252121 +vt 0.654602 0.123404 +vt 0.911086 0.167198 +vt 0.978598 0.180396 +vt 0.934450 0.504796 +vt 0.956806 0.243441 +vt 0.935464 0.541672 +vt 0.970813 0.032522 +vt 0.757253 0.577289 +vt 0.852856 0.209954 +vt 0.769426 0.564078 +vn 0.0000 1.0000 0.0000 +vn -0.9033 0.0000 0.4291 +vn -0.9940 0.0000 -0.1090 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -0.9033 0.4291 +vn 0.0000 0.9033 0.4291 +vn 0.9033 0.0000 0.4291 +vn 0.0000 -0.6974 0.7167 +vn -1.0000 0.0000 0.0000 +vn 0.8350 0.0000 0.5502 +vn 0.0000 0.9604 0.2788 +vn -0.8350 0.0000 0.5502 +vn 0.0000 0.0000 1.0000 +vn -0.3810 -0.9246 0.0000 +vn 0.2977 -0.9546 0.0000 +vn 0.0000 0.9940 -0.1090 +vn 0.0000 -0.9940 -0.1090 +vn 0.9940 0.0000 -0.1090 +vn 0.0000 -0.1745 0.9847 +vn -0.2977 -0.9546 0.0000 +vn 0.0000 -0.9920 0.1263 +vn 0.9425 -0.3342 0.0000 +vn 0.3810 -0.9246 0.0000 +vn -0.9425 -0.3342 0.0000 +vn 0.0000 -0.8190 -0.5738 +vn 0.9632 0.2555 0.0829 +vn 0.0000 -0.4288 0.9034 +vn 0.7258 -0.3487 -0.5930 +vn -0.9632 0.2555 0.0829 +vn 0.0000 0.0614 -0.9981 +vn 0.0000 -0.5362 0.8441 +vn 0.0000 -0.5069 -0.8620 +vn -0.8527 -0.4969 -0.1612 +vn 0.0000 0.5512 -0.8344 +vn 0.0000 -0.9822 0.1881 +vn 0.8527 -0.4969 -0.1612 +vn -0.7258 -0.3487 -0.5930 +usemtl Material +s off +f 35/1/1 3/2/1 34/3/1 +f 8/4/2 11/5/2 7/6/2 +f 37/7/3 6/8/3 39/9/3 +f 36/10/4 8/11/4 33/12/4 +f 34/13/5 4/14/5 36/15/5 +f 5/16/6 2/17/6 6/18/6 +f 11/19/1 13/20/1 9/21/1 +f 8/11/7 10/22/7 12/23/7 +f 3/2/8 11/19/8 9/21/8 +f 3/24/9 10/25/9 4/14/9 +f 14/26/10 20/27/10 16/28/10 +f 12/29/11 15/30/11 11/5/11 +f 10/22/4 16/31/4 12/23/4 +f 9/32/5 14/33/5 10/25/5 +f 19/34/1 21/35/1 17/36/1 +f 13/37/12 18/38/12 14/33/12 +f 15/39/13 17/36/13 13/20/13 +f 15/30/14 20/40/14 19/41/14 +f 21/42/15 24/43/15 22/44/15 +f 20/40/11 23/45/11 19/41/11 +f 18/46/4 24/47/4 20/48/4 +f 17/49/5 22/50/5 18/38/5 +f 40/51/5 28/52/5 38/53/5 +f 39/54/16 49/55/16 25/56/16 +f 31/57/11 25/58/11 29/59/11 +f 37/60/1 26/61/1 40/62/1 +f 35/63/11 29/59/11 33/64/11 +f 26/65/5 32/66/5 28/52/5 +f 28/67/4 29/68/4 25/69/4 +f 27/70/1 30/71/1 26/61/1 +f 7/6/11 33/64/11 8/4/11 +f 30/72/5 36/15/5 32/66/5 +f 36/73/17 42/74/17 32/75/17 +f 31/76/1 34/3/1 30/71/1 +f 5/77/18 40/62/18 1/78/18 +f 2/79/19 39/80/19 6/81/19 +f 1/82/20 38/53/20 2/83/20 +f 27/84/11 39/9/11 25/58/11 +f 43/85/21 45/86/21 44/87/21 +f 33/88/15 44/87/15 36/89/15 +f 29/90/22 43/91/22 33/92/22 +f 32/93/6 41/94/6 29/95/6 +f 46/96/23 48/97/23 47/98/23 +f 42/99/6 47/100/6 41/94/6 +f 41/101/11 48/102/11 43/103/11 +f 42/104/5 45/105/5 46/106/5 +f 50/107/24 55/108/24 51/109/24 +f 38/110/6 52/111/6 39/112/6 +f 25/113/15 50/114/15 28/115/15 +f 28/116/25 51/117/25 38/118/25 +f 55/119/6 60/120/6 56/121/6 +f 49/122/26 56/123/26 53/124/26 +f 51/125/27 56/126/27 52/127/27 +f 49/128/15 54/129/15 50/114/15 +f 59/130/28 62/131/28 63/132/28 +f 53/133/29 58/134/29 54/129/29 +f 55/108/5 58/135/5 59/130/5 +f 56/123/11 57/136/11 53/124/11 +f 63/132/30 66/137/30 67/138/30 +f 60/139/31 61/140/31 57/136/31 +f 59/141/32 64/142/32 60/120/32 +f 57/143/33 62/144/33 58/134/33 +f 67/145/34 65/146/34 68/147/34 +f 64/148/35 65/149/35 61/140/35 +f 63/150/36 68/147/36 64/142/36 +f 61/151/37 66/152/37 62/153/37 +f 35/1/1 7/154/1 3/2/1 +f 8/4/2 12/29/2 11/5/2 +f 37/7/3 5/155/3 6/8/3 +f 36/10/4 4/156/4 8/11/4 +f 34/13/5 3/24/5 4/14/5 +f 5/16/6 1/157/6 2/17/6 +f 11/19/1 15/39/1 13/20/1 +f 8/11/7 4/156/7 10/22/7 +f 3/2/8 7/154/8 11/19/8 +f 3/24/9 9/32/9 10/25/9 +f 14/26/10 18/158/10 20/27/10 +f 12/29/11 16/159/11 15/30/11 +f 10/22/4 14/160/4 16/31/4 +f 9/32/5 13/37/5 14/33/5 +f 19/34/1 23/161/1 21/35/1 +f 13/37/12 17/49/12 18/38/12 +f 15/39/13 19/34/13 17/36/13 +f 15/30/14 16/159/14 20/40/14 +f 21/42/15 23/162/15 24/43/15 +f 20/40/11 24/163/11 23/45/11 +f 18/46/4 22/164/4 24/47/4 +f 17/49/5 21/165/5 22/50/5 +f 40/51/5 26/65/5 28/52/5 +f 39/54/16 52/166/16 49/55/16 +f 31/57/11 27/84/11 25/58/11 +f 37/60/1 27/70/1 26/61/1 +f 35/63/11 31/57/11 29/59/11 +f 26/65/5 30/72/5 32/66/5 +f 28/67/4 32/167/4 29/68/4 +f 27/70/1 31/76/1 30/71/1 +f 7/6/11 35/63/11 33/64/11 +f 30/72/5 34/13/5 36/15/5 +f 36/73/17 44/168/17 42/74/17 +f 31/76/1 35/1/1 34/3/1 +f 5/77/18 37/60/18 40/62/18 +f 2/79/19 38/169/19 39/80/19 +f 1/82/20 40/51/20 38/53/20 +f 27/84/11 37/7/11 39/9/11 +f 43/85/21 48/170/21 45/86/21 +f 33/88/15 43/85/15 44/87/15 +f 29/90/22 41/171/22 43/91/22 +f 32/93/6 42/99/6 41/94/6 +f 46/96/23 45/172/23 48/97/23 +f 42/99/6 46/173/6 47/100/6 +f 41/101/11 47/174/11 48/102/11 +f 42/104/5 44/175/5 45/105/5 +f 50/107/24 54/176/24 55/108/24 +f 38/110/6 51/177/6 52/111/6 +f 25/113/15 49/128/15 50/114/15 +f 28/116/25 50/178/25 51/117/25 +f 55/119/6 59/141/6 60/120/6 +f 49/122/26 52/179/26 56/123/26 +f 51/125/27 55/180/27 56/126/27 +f 49/128/15 53/133/15 54/129/15 +f 59/130/28 58/135/28 62/131/28 +f 53/133/29 57/143/29 58/134/29 +f 55/108/5 54/176/5 58/135/5 +f 56/123/11 60/139/11 57/136/11 +f 63/132/38 62/131/38 66/137/38 +f 60/139/31 64/148/31 61/140/31 +f 59/141/32 63/150/32 64/142/32 +f 57/143/33 61/181/33 62/144/33 +f 67/145/34 66/182/34 65/146/34 +f 64/148/39 68/183/39 65/149/39 +f 63/150/36 67/145/36 68/147/36 +f 61/151/37 65/184/37 66/152/37 diff --git a/client/src/main/resources/model/smg.png b/client/src/main/resources/model/smg.png new file mode 100644 index 0000000000000000000000000000000000000000..4d7f32ab990fed196477d18ae04b883bd7083f43 GIT binary patch literal 5646 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7&zE~)R&4Yzkn2Hfk$L90|U1(2s1Lwnj^u$ zAbP;l#WAFU@$EH7K?VgLW=99-ztOFdId`r(n$@P9KNH)>z{teHA>hF|CnPG7Q$WF? zfuT`9fuVv0B&r}FV!+U}wA-fvq>6{Z9w-ZBG%>L`Y$%xsR^7n(fE}pNp}`^G00YM~ zJtMGj1`K~7=5laJFdV$(ss`4`)*ufupOMLtky#;P*9njf4hI-MFoPKi8VL+6-r_UC z8YLL&z*cdvu<|q{yi^hfYh*sa4{_mw21Ws$*c7lE6BvGg?HqONXvmJH+0hI(S{jU& zvkIe?0wdFCG8jz;z$U?HG8jz;qsai&G90ZGMoWXyWH8zlA00Os9g!IwJ{ldE8v>(< bjqEkStk%M}^1c8Eco{rh{an^LB{Ts5C0KX| literal 0 HcmV?d00001 diff --git a/client/src/main/resources/shader/model/vertex.glsl b/client/src/main/resources/shader/model/vertex.glsl index 75e6cbd..382ae61 100644 --- a/client/src/main/resources/shader/model/vertex.glsl +++ b/client/src/main/resources/shader/model/vertex.glsl @@ -21,7 +21,7 @@ void main() { vec3 lightDirection = normalize(vec3(0.5, -1.0, -0.5));// TODO: Add this via a uniform. vec3 lightColor = vec3(1.0, 1.0, 0.9); // TODO: Add this via a uniform. - float ambientComponent = 0.1; + float ambientComponent = 0.25; float diffuseComponent = max(dot(-vertexNormal, lightDirection), 0.0); vertexColor = (ambientComponent + diffuseComponent) * lightColor; } \ No newline at end of file diff --git a/server/src/main/java/nl/andrewl/aos2_server/ClientCommunicationHandler.java b/server/src/main/java/nl/andrewl/aos2_server/ClientCommunicationHandler.java index d5ed537..567c886 100644 --- a/server/src/main/java/nl/andrewl/aos2_server/ClientCommunicationHandler.java +++ b/server/src/main/java/nl/andrewl/aos2_server/ClientCommunicationHandler.java @@ -151,8 +151,12 @@ public class ClientCommunicationHandler { } public void sendDatagramPacket(byte[] data) { - DatagramPacket packet = new DatagramPacket(data, data.length, clientAddress, clientUdpPort); - sendDatagramPacket(packet); + if (clientUdpPort != -1) { + DatagramPacket packet = new DatagramPacket(data, data.length, clientAddress, clientUdpPort); + sendDatagramPacket(packet); + } else { + log.warn("Can't send datagram packet because we don't know the client's UDP port yet."); + } } public void sendDatagramPacket(DatagramPacket packet) { diff --git a/server/src/main/java/nl/andrewl/aos2_server/PlayerManager.java b/server/src/main/java/nl/andrewl/aos2_server/PlayerManager.java index 2180d8e..87301ae 100644 --- a/server/src/main/java/nl/andrewl/aos2_server/PlayerManager.java +++ b/server/src/main/java/nl/andrewl/aos2_server/PlayerManager.java @@ -154,8 +154,15 @@ public class PlayerManager { Vector3f deathPosition = new Vector3f(player.getPosition()); player.setPosition(getBestSpawnPoint(player)); player.setVelocity(new Vector3f(0)); - player.setHealth(1); + resupply(player); + broadcastUdpMessage(player.getUpdateMessage(System.currentTimeMillis())); + broadcastUdpMessage(new SoundMessage("death", 1, deathPosition)); + // TODO: Team points or something. + } + + public void resupply(ServerPlayer player) { var handler = getHandler(player.getId()); + player.setHealth(1); for (int i = 0; i < player.getInventory().getItemStacks().size(); i++) { ItemStack stack = player.getInventory().getItemStacks().get(i); if (stack instanceof GunItemStack g) { @@ -168,9 +175,6 @@ public class PlayerManager { handler.sendTcpMessage(new ItemStackMessage(i, stack)); } handler.sendDatagramPacket(new ClientHealthMessage(player.getHealth())); - broadcastUdpMessage(player.getUpdateMessage(System.currentTimeMillis())); - broadcastUdpMessage(new SoundMessage("death", 1, deathPosition)); - // TODO: Team points or something. } public void handleUdpInit(DatagramInit init, DatagramPacket packet) { diff --git a/server/src/main/java/nl/andrewl/aos2_server/Server.java b/server/src/main/java/nl/andrewl/aos2_server/Server.java index caee45e..69b75b7 100644 --- a/server/src/main/java/nl/andrewl/aos2_server/Server.java +++ b/server/src/main/java/nl/andrewl/aos2_server/Server.java @@ -45,7 +45,7 @@ public class Server implements Runnable { this.teamManager = new TeamManager(this); this.projectileManager = new ProjectileManager(this); this.worldUpdater = new WorldUpdater(this, config.ticksPerSecond); - this.world = Worlds.flatWorld(); + this.world = Worlds.testingWorld(); // TODO: Add some way to configure teams with config files or commands. teamManager.addTeam("Red", new Vector3f(0.8f, 0, 0), "A"); diff --git a/server/src/main/java/nl/andrewl/aos2_server/config/ServerConfig.java b/server/src/main/java/nl/andrewl/aos2_server/config/ServerConfig.java index 3808993..9d873f1 100644 --- a/server/src/main/java/nl/andrewl/aos2_server/config/ServerConfig.java +++ b/server/src/main/java/nl/andrewl/aos2_server/config/ServerConfig.java @@ -20,5 +20,7 @@ public class ServerConfig { public static class ActionsConfig { public float blockRemoveCooldown = 0.25f; public float blockPlaceCooldown = 0.1f; + public float resupplyCooldown = 30; + public float resupplyRadius = 3; } } diff --git a/server/src/main/java/nl/andrewl/aos2_server/logic/PlayerActionManager.java b/server/src/main/java/nl/andrewl/aos2_server/logic/PlayerActionManager.java index 824c456..a166509 100644 --- a/server/src/main/java/nl/andrewl/aos2_server/logic/PlayerActionManager.java +++ b/server/src/main/java/nl/andrewl/aos2_server/logic/PlayerActionManager.java @@ -35,6 +35,8 @@ public class PlayerActionManager { private long lastBlockRemovedAt = 0; private long lastBlockPlacedAt = 0; + private long lastResupplyAt = System.currentTimeMillis(); + private long gunLastShotAt = 0; private boolean gunNeedsReCock = false; private boolean gunReloading = false; @@ -80,11 +82,16 @@ public class PlayerActionManager { if (selectedStack instanceof BlockItemStack b) { tickBlockAction(now, server, world, b); } else if (selectedStack instanceof GunItemStack g) { - try { - tickGunAction(now, server, world, g); - } catch (Exception e) { - System.out.println("bleh"); - } + tickGunAction(now, server, world, g); + } + + if ( + now - lastResupplyAt > server.getConfig().actions.resupplyCooldown * 1000 && + player.getTeam() != null && + player.getPosition().distance(player.getTeam().getSpawnPoint()) < server.getConfig().actions.resupplyRadius + ) { + server.getPlayerManager().resupply(player); + lastResupplyAt = now; } if (player.isCrouching() != lastInputState.crouching()) { @@ -161,6 +168,7 @@ public class PlayerActionManager { stack.incrementAmount(); server.getPlayerManager().getHandler(player.getId()).sendDatagramPacket(new ItemStackMessage(player.getInventory())); server.getPlayerManager().broadcastUdpMessage(ChunkUpdateMessage.fromWorld(hit.pos(), world)); + server.getPlayerManager().broadcastUdpMessage(new SoundMessage("block_break_1", 1, player.getPosition())); } } // Check for placing blocks. @@ -179,6 +187,7 @@ public class PlayerActionManager { stack.decrementAmount(); server.getPlayerManager().getHandler(player.getId()).sendDatagramPacket(new ItemStackMessage(player.getInventory())); server.getPlayerManager().broadcastUdpMessage(ChunkUpdateMessage.fromWorld(placePos, world)); + server.getPlayerManager().broadcastUdpMessage(new SoundMessage("block_place_1", 1, player.getPosition())); } } }