122 Commits

Author SHA1 Message Date
8392a53bcb test
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-11 18:45:02 +02:00
de30c3bc96 lol
Some checks failed
Linux arm64 / Build (push) Failing after 12s
2024-08-11 18:44:22 +02:00
4324bad41b env
Some checks failed
Linux arm64 / Build (push) Failing after 12s
2024-08-11 18:40:08 +02:00
7271681175 petit l
Some checks failed
Linux arm64 / Build (push) Failing after 15s
2024-08-11 18:28:55 +02:00
9afe4e6250 miam
Some checks failed
Linux arm64 / Build (push) Failing after 13s
2024-08-11 18:27:44 +02:00
ddc658be12 better
Some checks failed
Linux arm64 / Build (push) Failing after 11s
2024-08-11 18:23:19 +02:00
3b99463213 working ci
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:57:13 +02:00
b0114e4ddf Update .gitea/workflows/linux.yaml
Some checks failed
Linux arm64 / Build (push) Has been cancelled
yu
2024-08-08 12:55:32 +02:00
8fc1b70288 ki
Some checks failed
Linux arm64 / Build (push) Failing after 9s
2024-08-08 12:54:43 +02:00
28803c2848 vb
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:53:17 +02:00
179151c90c bn
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:51:41 +02:00
0f1947e43e xc
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:50:09 +02:00
59e449b665 wx 2024-08-08 12:49:26 +02:00
5fff416d42 mpm
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:47:51 +02:00
0b00fd02c2 iljiljlj
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:47:14 +02:00
c4810bd878 Update .gitea/workflows/linux.yaml
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:29:16 +02:00
7c1909584f qzdqzdqzdqzdqzdqzdzqdqzqdqz
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:28:23 +02:00
4b47a44b0d fhfhfhfhhfhfhfhfh
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:27:12 +02:00
6ba6c0b21d sefsfsfsfesfsfsefefsegyjukm
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:23:35 +02:00
b9f14cb830 zedqzdqd
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:22:06 +02:00
80baf2b59f azazazaa
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:20:07 +02:00
8b0b1371e5 mpmpmpm
Some checks failed
Linux arm64 / Build (push) Failing after 2s
2024-08-08 12:19:43 +02:00
fbef0cc660 hukhkhkhk
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:17:52 +02:00
8c181e5353 fhfhfhfhfh
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:16:22 +02:00
c36db6b15f sefsfsfsfsfs
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:12:46 +02:00
3c3a68f1d1 ijljl
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:11:31 +02:00
fb2f1343c8 ygukgkg
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:10:21 +02:00
c4143be864 gtjfjfy
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:09:27 +02:00
6ca5afe81c mhukh
Some checks failed
Linux arm64 / Build (push) Failing after 2s
2024-08-08 12:05:20 +02:00
6a65358e37 fghkl
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:02:42 +02:00
aac3410755 egh
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:01:26 +02:00
eff94cf05c yukhyuk
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 12:00:00 +02:00
5e97a0ac1c yeeeeeeee
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 11:56:42 +02:00
6cfa32a2c2 shold work
Some checks failed
Linux arm64 / Build (push) Failing after 25s
2024-08-08 11:50:55 +02:00
3282af2752 qae
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 11:48:50 +02:00
4511676dc6 yugjgj
Some checks failed
Linux arm64 / Build (push) Failing after 7s
2024-08-08 11:48:11 +02:00
06f5e3038a gk
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-08 11:46:52 +02:00
9496e03cf0 hkyk
Some checks failed
Linux arm64 / Build (push) Failing after 6s
2024-08-08 11:45:14 +02:00
3afdaccff1 yujk
Some checks failed
Linux arm64 / Build (push) Failing after 27s
2024-08-08 11:42:34 +02:00
3fdb5ce45e fghjklm
Some checks failed
Linux arm64 / Build (push) Failing after 27s
2024-08-08 11:41:49 +02:00
8e9a90259d qfgh
Some checks failed
Linux arm64 / Build (push) Failing after 24s
2024-08-08 11:40:47 +02:00
c3eee424b6 peutetre
Some checks failed
Linux arm64 / Build (push) Failing after 25s
2024-08-08 11:39:01 +02:00
a4e1d4a84d lol
Some checks failed
Linux arm64 / Build (push) Failing after 28s
2024-08-08 11:38:00 +02:00
3b62da6489 dfbg
Some checks failed
Linux arm64 / Build (push) Failing after 1s
2024-08-08 11:37:13 +02:00
6c5d5f4921 dgdg
Some checks failed
Linux arm64 / Build (push) Failing after 7s
2024-08-08 11:32:32 +02:00
2cc571c0ce drg
Some checks failed
Linux arm64 / Build (push) Failing after 7s
2024-08-08 11:30:49 +02:00
ae84abc14d idontknowman
Some checks failed
Linux arm64 / Build (push) Failing after 7s
2024-08-08 11:30:09 +02:00
171005b06a fix command
Some checks failed
Linux arm64 / Build (push) Failing after 7s
2024-08-08 11:24:52 +02:00
cdb6753d52 test new cache
Some checks failed
Linux arm64 / Build (push) Failing after 4m3s
2024-08-08 11:19:37 +02:00
746f2cd383 little test
Some checks failed
Linux arm64 / Build (push) Failing after 2m54s
2024-06-03 22:11:20 +02:00
4050ef8322 Update .gitea/workflows/linux.yaml
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-06-03 22:08:48 +02:00
dd91750e28 updated runner
All checks were successful
Linux arm64 / Build (push) Successful in 5m7s
2024-06-03 18:36:27 +02:00
edc6f40799 last version
All checks were successful
Linux arm64 / Build (push) Successful in 11m13s
2024-02-24 19:37:53 +01:00
bfd22b9de0 cette fois c'est parfait
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 19:27:47 +01:00
695ef540f2 change order
Some checks failed
Linux arm64 / Build (push) Failing after 1m40s
2024-02-24 18:57:23 +01:00
331d95573d all good
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 18:56:39 +01:00
26ccf3334d better
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 18:52:17 +01:00
3360f4acdb should be good
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 18:48:46 +01:00
8ead200eb7 hjfbj
All checks were successful
Linux arm64 / Build (push) Successful in 1m59s
2024-02-24 18:41:49 +01:00
d5e24635c7 wooo
All checks were successful
Linux arm64 / Build (push) Successful in 2m1s
2024-02-24 18:28:25 +01:00
3defa497b6 good action
All checks were successful
Linux arm64 / Build (push) Successful in 1m52s
2024-02-24 18:05:00 +01:00
a241589025 useless 2024-02-24 18:04:31 +01:00
911fe7cc10 pyth
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 18:00:53 +01:00
a6a71cb487 no
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 17:56:29 +01:00
3e8cf5e290 yesy esd
All checks were successful
Linux arm64 / Build (push) Successful in 2m6s
2024-02-24 17:53:54 +01:00
c62f114087 aaa
All checks were successful
Linux arm64 / Build (push) Successful in 11m36s
2024-02-24 17:41:50 +01:00
237c6d9981 frgh
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 17:40:04 +01:00
ece20e0e1f qzdfg
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 17:38:11 +01:00
3eecfa7df1 sdfg
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 17:36:05 +01:00
80bdf130dc action: fix package
All checks were successful
Linux arm64 / Build (push) Successful in 2m11s
2024-02-24 17:32:13 +01:00
4338fd3895 action: change defaut apt package
Some checks failed
Linux arm64 / Build (push) Failing after 16s
2024-02-24 17:31:42 +01:00
3a334b3227 action: cache build
All checks were successful
Linux arm64 / Build (push) Successful in 10m9s
2024-02-24 17:21:00 +01:00
186ca76345 action: gl
All checks were successful
Linux arm64 / Build (push) Successful in 2m28s
2024-02-24 16:23:16 +01:00
da3439cc03 action: bbbbbbbbbbb
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 16:20:23 +01:00
5a1f71e5c0 action: gl
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 16:19:38 +01:00
93d587d463 action: aaaaaaaaa
Some checks are pending
Linux arm64 / Build (push) Waiting to run
2024-02-24 16:18:49 +01:00
bad65f89d0 action: fix cache
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 16:04:25 +01:00
3c04810496 action: test
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 15:44:48 +01:00
ec538c1783 action: don't install apt
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-02-24 15:26:04 +01:00
01bd4621b3 action: apt update
Some checks failed
Linux arm64 / Build (push) Failing after 34s
2024-02-24 13:22:27 +01:00
2ef4f091f1 action: fix file
Some checks failed
Linux arm64 / Build (push) Failing after 3m18s
2024-02-24 13:15:07 +01:00
bc4e1f1f35 action: cache apt packages
Some checks failed
Linux arm64 / Build (push) Failing after 0s
2024-02-24 13:13:51 +01:00
7c4ed3910f action: xmake latest
All checks were successful
Linux arm64 / Build (push) Successful in 1m4s
2024-02-24 13:06:56 +01:00
90c834cc49 Squashed commit of the following:
All checks were successful
Linux arm64 / Build (push) Successful in 6m2s
commit a8cbebc8d11d3621924b189a58a4f150d30324e9
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 14:00:26 2024 +0100

    jsp

commit a00ae1f6d9db33efef5e276bfc7101a1d24cf7d8
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 13:17:03 2024 +0100

    lol

commit d3dcaf3659251bb8fb0d4984ea188601a058757b
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 13:02:12 2024 +0100

    zsdf

commit 8ce343ff361ba0618d09d488404ff15c7d19de66
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 12:55:39 2024 +0100

    caca

commit 9f2a818ee57c751cb1283f12cfcc2c3617a3bd63
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 12:38:20 2024 +0100

    remove run name

commit b618dc176980ef18ae9a04f43a8abef311ca4329
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 12:20:35 2024 +0100

    change action name

commit 3092a403fdb2ded81d6f7558f621d0f8ac5dc1f5
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 12:06:03 2024 +0100

    fix action typo

commit 0cd675ef6c42758bef182307cce55d74aa2959fe
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 11:56:16 2024 +0100

    add action cache name

    Signed-off-by: Simon Pribylski <sim16.prib@gmail.com>

commit 4a6e6754f0a82a35fa4d6793321c7d27cb3e9f37
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sat Feb 10 11:28:48 2024 +0100

    remove ssl ignore

    Signed-off-by: Simon Pribylski <sim16.prib@gmail.com>

commit 1808ca96ec84390915ace0678bc824d92cc3d1b3
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:29:10 2024 +0100

    change action name

commit 5a966bbe77463a93ab210cd4b6a122ab1d440486
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:22:16 2024 +0100

    cpp standard global

commit 673d1457162dda9018712d0a19ac5b3954ad265f
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:21:36 2024 +0100

    add glew dep

commit b64eb6dd3ef535183dd0620beeeaa99deb323c97
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:16:23 2024 +0100

    confirm

commit 1bf8065179b74f3dd194e05739a064097bdc2ebd
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:15:37 2024 +0100

    remove sudo

commit 2dc4ee69ebba3821916963a96621d6f8b59d4808
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:09:55 2024 +0100

    install apt

commit 69574b9c5a5074c2fdf87dfc8c068d9c64f7704c
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 10:31:11 2024 +0100

    add xmake cache

commit 4d7d04c6722ca8e94d10569f25ae582265866948
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:21:45 2024 +0100

    aaaaaaaaaaaaaaaaaa

commit aa7dac26cd9900c676e4662fadb7832700a3363a
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:13:08 2024 +0100

    fiiiiiiiiiiiiiix xmake root

commit 3604b44d04f492254911a0508e8555aca61b4d26
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:05:43 2024 +0100

    fix xmake root

commit cfcb8d4df46c6febeca47dff2f0447048b8f68ad
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:03:56 2024 +0100

    run xmake as root

commit dbef2d27138ccce1124cc1979867baf15e897a7f
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 00:54:54 2024 +0100

    xmake action

commit 42196398ced1e7f38c0234d82dc7cd65ef7aeb6d
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 00:53:29 2024 +0100

    xmake

commit 51256d8c15066120c2df3a72063856a0a47f8b59
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 00:47:35 2024 +0100

    Fix Linux.yaml

    add cert

commit 9c024fa8eb92765aff3fb195ce7c8c10a1b49d0b
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sun Dec 31 22:34:54 2023 +0100

    Add Linux actions
2024-02-10 16:02:51 +01:00
d23761dc10 Squashed commit of the following:
Some checks failed
Linux arm / Build (push) Has been cancelled
commit 1808ca96ec84390915ace0678bc824d92cc3d1b3
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:29:10 2024 +0100

    change action name

commit 5a966bbe77463a93ab210cd4b6a122ab1d440486
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:22:16 2024 +0100

    cpp standard global

commit 673d1457162dda9018712d0a19ac5b3954ad265f
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:21:36 2024 +0100

    add glew dep

commit b64eb6dd3ef535183dd0620beeeaa99deb323c97
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:16:23 2024 +0100

    confirm

commit 1bf8065179b74f3dd194e05739a064097bdc2ebd
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:15:37 2024 +0100

    remove sudo

commit 2dc4ee69ebba3821916963a96621d6f8b59d4808
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 13:09:55 2024 +0100

    install apt

commit 69574b9c5a5074c2fdf87dfc8c068d9c64f7704c
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 10:31:11 2024 +0100

    add xmake cache

commit 4d7d04c6722ca8e94d10569f25ae582265866948
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:21:45 2024 +0100

    aaaaaaaaaaaaaaaaaa

commit aa7dac26cd9900c676e4662fadb7832700a3363a
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:13:08 2024 +0100

    fiiiiiiiiiiiiiix xmake root

commit 3604b44d04f492254911a0508e8555aca61b4d26
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:05:43 2024 +0100

    fix xmake root

commit cfcb8d4df46c6febeca47dff2f0447048b8f68ad
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 01:03:56 2024 +0100

    run xmake as root

commit dbef2d27138ccce1124cc1979867baf15e897a7f
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 00:54:54 2024 +0100

    xmake action

commit 42196398ced1e7f38c0234d82dc7cd65ef7aeb6d
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 00:53:29 2024 +0100

    xmake

commit 51256d8c15066120c2df3a72063856a0a47f8b59
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Mon Jan 1 00:47:35 2024 +0100

    Fix Linux.yaml

    add cert

commit 9c024fa8eb92765aff3fb195ce7c8c10a1b49d0b
Author: Simon Pribylski <sim16.prib@gmail.com>
Date:   Sun Dec 31 22:34:54 2023 +0100

    Add Linux actions
2024-02-10 15:49:25 +01:00
3d8fd2e519 refactor xmake.lua 2023-09-03 11:02:22 +02:00
4bd32e8d0b chore: bump version to alpha-0.4.0 2023-09-02 20:29:51 +02:00
09bba12814 prevent player from joining mid game 2023-09-02 20:27:26 +02:00
bb76e9493f sync player when joining mid game 2023-08-26 11:49:52 +02:00
Simon Pribylski
808ef7b3f6 moved player leave packet 2023-08-26 11:27:05 +02:00
Simon Pribylski
23938a0cb5 fix mob id 2023-08-26 11:21:28 +02:00
Simon Pribylski
5631efcf9e remove mobs on player leave 2023-08-26 10:46:20 +02:00
Simon Pribylski
8e7b446003 add RemoveMobPacket 2023-08-26 10:35:26 +02:00
Simon Pribylski
51ec035490 remove towers on player leave 2023-08-26 10:25:52 +02:00
1f94ae2586 use of SAFE_CHECK 2023-08-15 19:33:09 +02:00
7b8c13612c fix login crash 2023-08-15 19:32:44 +02:00
a36716d8e4 fix player login 2023-08-15 19:20:13 +02:00
debf9e974c useless cam functions 2023-08-15 19:19:54 +02:00
380ecf3a27 fixed server world upload 2023-08-15 13:47:56 +02:00
b3157be641 change lib name 2023-08-15 13:06:31 +02:00
1e3b672897 remove player from team when leaving 2023-08-15 13:01:50 +02:00
d1aa5cd8aa balance team on player join 2023-08-14 18:54:36 +02:00
dbe91b52fd send team update after restart 2023-08-14 18:41:51 +02:00
7ab8c79fdf changed player join/leave message 2023-08-14 18:34:07 +02:00
8f2a22762a fixing button crash 2023-08-14 18:33:41 +02:00
f0c3325141 name randomizer 2023-08-14 18:33:24 +02:00
1d00e0098a fix player sync 2023-08-14 18:18:43 +02:00
ee5a27ac54 show integrated server stats 2023-08-14 18:10:05 +02:00
49a5a09537 add restart command 2023-08-14 17:46:49 +02:00
f9f80fc4fb summon debug 2023-08-14 15:00:05 +02:00
4997715672 players stat reset after game end 2023-08-14 14:59:37 +02:00
3fe480d121 connection removal safety 2023-08-14 14:59:15 +02:00
c46226c1ae disconnect queue 2023-08-14 14:58:26 +02:00
8630421734 set summon menu cooldown 2023-08-14 14:29:41 +02:00
60b81003c0 Don't disconnect when game is over 2023-08-14 14:25:10 +02:00
7986e55846 fix persistent players 2023-08-14 13:59:30 +02:00
0c0fd155ed add client disconnect button 2023-08-14 13:46:10 +02:00
7f650f282c back to lobby state when server ends 2023-08-14 13:35:17 +02:00
118a04cd01 xmake.lua : add lib target 2023-08-14 13:31:52 +02:00
d529c79150 server console input 2023-08-13 13:44:05 +02:00
ddbba997e5 Working server 2023-08-13 12:38:32 +02:00
50c17e8ed1 restructure project 2023-08-13 11:59:13 +02:00
215 changed files with 1128 additions and 544 deletions

View File

@@ -0,0 +1,25 @@
name: Linux arm64
run-name: Build And Test
on: [push]
jobs:
Build:
runs-on: ubuntu-test
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Packages cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build/.packages
- name: XMake config
run: xmake f -p linux -y
- name: Build
run: xmake
- name: Test
run: xmake test

View File

@@ -1,17 +1,17 @@
#pragma once #pragma once
#include "ClientConnexion.h" #include "client/ClientConnexion.h"
#include "ClientGame.h" #include "client/game/ClientGame.h"
#include "game/Team.h" #include "td/game/Team.h"
#include "game/Player.h" #include "td/game/Player.h"
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "protocol/packets/SendMobsPacket.h" #include "td/protocol/packets/SendMobsPacket.h"
#include "render/Renderer.h" #include "client/render/Renderer.h"
#include "network/Network.h" #include "td/network/Network.h"
namespace td { namespace td {
namespace client { namespace client {

View File

@@ -1,8 +1,8 @@
#pragma once #pragma once
#include "protocol/PacketHandler.h" #include "td/protocol/PacketHandler.h"
#include "network/TCPSocket.h" #include "td/network/TCPSocket.h"
#include "game/Connexion.h" #include "td/network/Connexion.h"
namespace td { namespace td {
namespace client { namespace client {

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
#include "protocol/PacketHandler.h" #include "td/protocol/PacketHandler.h"
#include "WorldClient.h" #include "WorldClient.h"
#include "render/WorldRenderer.h" #include "client/render/WorldRenderer.h"
#include "render/Renderer.h" #include "client/render/Renderer.h"
namespace td { namespace td {
namespace client { namespace client {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "game/World.h" #include "td/game/World.h"
#include "protocol/PacketHandler.h" #include "td/protocol/PacketHandler.h"
namespace td { namespace td {
namespace client { namespace client {
@@ -13,12 +13,14 @@ private:
ClientGame* m_Game; ClientGame* m_Game;
public: public:
WorldClient(ClientGame* game); WorldClient(ClientGame* game);
virtual ~WorldClient();
virtual void HandlePacket(const protocol::WorldBeginDataPacket* packet) override; virtual void HandlePacket(const protocol::WorldBeginDataPacket* packet) override;
virtual void HandlePacket(const protocol::WorldDataPacket* packet) override; virtual void HandlePacket(const protocol::WorldDataPacket* packet) override;
virtual void HandlePacket(const protocol::SpawnMobPacket* packet) override; virtual void HandlePacket(const protocol::SpawnMobPacket* packet) override;
virtual void HandlePacket(const protocol::UpgradeTowerPacket* packet) override; virtual void HandlePacket(const protocol::UpgradeTowerPacket* packet) override;
virtual void HandlePacket(const protocol::WorldAddTowerPacket* packet) override; virtual void HandlePacket(const protocol::WorldAddTowerPacket* packet) override;
virtual void HandlePacket(const protocol::RemoveMobPacket* packet) override;
virtual void HandlePacket(const protocol::RemoveTowerPacket* packet) override; virtual void HandlePacket(const protocol::RemoveTowerPacket* packet) override;
virtual void HandlePacket(const protocol::UpdateMobStatesPacket* packet) override; virtual void HandlePacket(const protocol::UpdateMobStatesPacket* packet) override;
virtual void HandlePacket(const protocol::UpdateCastleLifePacket* packet) override; virtual void HandlePacket(const protocol::UpdateCastleLifePacket* packet) override;

View File

@@ -1,10 +1,10 @@
#pragma once #pragma once
#include "Defines.h" #include "td/Defines.h"
#include <memory> #include <memory>
#include "loader/GLLoader.h" #include "loader/GLLoader.h"
#include "render/shaders/WorldShader.h" #include "client/render/shaders/WorldShader.h"
#include "render/shaders/EntityShader.h" #include "client/render/shaders/EntityShader.h"
namespace td { namespace td {
namespace render { namespace render {
@@ -58,6 +58,7 @@ public:
void SetCamAngularMovement(const Vec2f& mov); void SetCamAngularMovement(const Vec2f& mov);
void SetCamMovement(const Vec2f& lastCursorPos, const Vec2f& currentCursorPos); void SetCamMovement(const Vec2f& lastCursorPos, const Vec2f& currentCursorPos);
void SetCamLook(const Vec2f& worldPos); void SetCamLook(const Vec2f& worldPos);
void ResetCamLook();
void SetBackgroundColor(const Vec3f& color) { m_BackgroundColor = color; } void SetBackgroundColor(const Vec3f& color) { m_BackgroundColor = color; }

View File

@@ -2,7 +2,7 @@
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
#include "render/loader/GLLoader.h" #include "client/render/loader/GLLoader.h"
namespace td { namespace td {

View File

@@ -1,14 +1,14 @@
#pragma once #pragma once
#include "game/World.h" #include "td/game/World.h"
#include "render/Renderer.h" #include "client/render/Renderer.h"
#include "render/VertexCache.h" #include "client/render/VertexCache.h"
#include "render/gui/TowerPlacePopup.h" #include "client/render/gui/TowerPlacePopup.h"
#include "render/gui/TowerUpgradePopup.h" #include "client/render/gui/TowerUpgradePopup.h"
#include "render/gui/MobTooltip.h" #include "client/render/gui/MobTooltip.h"
#include "render/gui/CastleTooltip.h" #include "client/render/gui/CastleTooltip.h"
namespace td { namespace td {
@@ -48,6 +48,7 @@ public:
void Update(); void Update();
void Render(); void Render();
void ResetCam();
void SetCamPos(float camX, float camY); void SetCamPos(float camX, float camY);
void MoveCam(float relativeX, float relativeY); void MoveCam(float relativeX, float relativeY);

View File

@@ -1,16 +1,19 @@
#pragma once #pragma once
#include "SummonMenu.h" #include "SummonMenu.h"
#include "td/game/BaseGame.h"
namespace td { namespace td {
namespace gui { namespace gui {
class GameMenu : public GuiWidget { class GameMenu : public GuiWidget, public game::GameListener {
private: private:
std::unique_ptr<SummonMenu> m_SummonMenu; std::unique_ptr<SummonMenu> m_SummonMenu;
public: public:
GameMenu(client::Client* client); GameMenu(client::Client* client);
virtual void OnGameBegin();
virtual void Render(); virtual void Render();
private: private:
void ShowTPS(); void ShowTPS();
@@ -18,6 +21,8 @@ private:
void ShowPlayers(); void ShowPlayers();
void ShowLobbyProgress(); void ShowLobbyProgress();
void ShowTeamSelection(); void ShowTeamSelection();
void DisconnectButton();
}; };
} // namespace gui } // namespace gui

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "render/gui/imgui/imgui.h" #include "client/render/gui/imgui/imgui.h"
#include "game/Team.h" #include "td/game/Team.h"
namespace td { namespace td {
namespace render { namespace render {

View File

@@ -4,13 +4,15 @@
#include "imgui/imgui_filebrowser.h" #include "imgui/imgui_filebrowser.h"
#include "game/server/Server.h" #include "server/Server.h"
#include <memory> #include <memory>
namespace td { namespace td {
namespace gui { namespace gui {
class ServerGui;
class MainMenu : public GuiWidget { class MainMenu : public GuiWidget {
private: private:
bool m_TriedToConnect = false; bool m_TriedToConnect = false;
@@ -22,6 +24,7 @@ private:
imgui_addons::ImGuiFileBrowser m_FileDialog; imgui_addons::ImGuiFileBrowser m_FileDialog;
std::unique_ptr<server::Server> m_Server; std::unique_ptr<server::Server> m_Server;
std::unique_ptr<ServerGui> m_ServerGui;
public: public:
MainMenu(client::Client* client); MainMenu(client::Client* client);
~MainMenu(); ~MainMenu();

View File

@@ -0,0 +1,19 @@
#pragma once
#include "GuiWidget.h"
#include "server/Server.h"
namespace td {
namespace gui {
class ServerGui : public GuiWidget {
private:
server::Server* m_Server;
public:
ServerGui(client::Client* client, server::Server* server);
virtual void Render();
};
} // namespace gui
} // namespace td

View File

@@ -3,7 +3,7 @@
#include "GuiWidget.h" #include "GuiWidget.h"
#include <array> #include <array>
#include "game/Mobs.h" #include "td/game/Mobs.h"
namespace td { namespace td {
namespace gui { namespace gui {

View File

@@ -9,7 +9,7 @@
#include <memory> #include <memory>
#include "render/gui/GuiManager.h" #include "client/render/gui/GuiManager.h"
struct SDL_Window; struct SDL_Window;
typedef void* SDL_GLContext; typedef void* SDL_GLContext;

View File

@@ -2,7 +2,7 @@
#include "GuiWidget.h" #include "GuiWidget.h"
#include "Defines.h" #include "td/Defines.h"
namespace td { namespace td {
namespace gui { namespace gui {

View File

@@ -2,7 +2,7 @@
#include "GuiWidget.h" #include "GuiWidget.h"
#include "Defines.h" #include "td/Defines.h"
namespace td { namespace td {
namespace gui { namespace gui {

View File

@@ -107,7 +107,7 @@ namespace ImGui
} }
*/ */
#include "render/GL.h" #include "client/render/GL.h"
#if defined(__ANDROID__) #if defined(__ANDROID__)
#define IMGUI_IMPL_OPENGL_LOADER_ES3 #define IMGUI_IMPL_OPENGL_LOADER_ES3

View File

@@ -1,7 +1,7 @@
#ifndef IMGUIFILEBROWSER_H #ifndef IMGUIFILEBROWSER_H
#define IMGUIFILEBROWSER_H #define IMGUIFILEBROWSER_H
#include "render/gui/imgui/imgui.h" #include "client/render/gui/imgui/imgui.h"
#include <string> #include <string>
#include <vector> #include <vector>

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "game/World.h" #include "td/game/World.h"
#include "GLLoader.h" #include "GLLoader.h"
namespace td { namespace td {

View File

@@ -1,8 +1,8 @@
#pragma once #pragma once
#include <string> #include <string>
#include "Defines.h" #include "td/Defines.h"
#include "render/GL.h" #include "client/render/GL.h"
namespace td { namespace td {
namespace shader { namespace shader {

View File

@@ -1,8 +1,8 @@
#pragma once #pragma once
#include "misc/DataBuffer.h" #include "td/misc/DataBuffer.h"
#define TD_VERSION "alpha-0.3.0" #define TD_VERSION "alpha-0.4.0"
namespace td { namespace td {
namespace utils { namespace utils {

View File

@@ -2,7 +2,7 @@
#include <vector> #include <vector>
#include "misc/Time.h" #include "td/misc/Time.h"
namespace td { namespace td {
namespace server { namespace server {
@@ -12,7 +12,7 @@ class Server;
class Lobby { class Lobby {
private: private:
Server* m_Server; Server* m_Server;
bool m_GameStarted = false; bool m_LobbyOpened = false;
std::uint64_t m_StartTimerTime = 0; std::uint64_t m_StartTimerTime = 0;
std::vector<std::uint8_t> m_Players; std::vector<std::uint8_t> m_Players;
utils::AutoTimer m_Timer; utils::AutoTimer m_Timer;
@@ -22,6 +22,8 @@ public:
void OnPlayerJoin(std::uint8_t playerID); void OnPlayerJoin(std::uint8_t playerID);
void OnPlayerLeave(std::uint8_t playerID); void OnPlayerLeave(std::uint8_t playerID);
void OpenLobby();
void SendTimeRemaining(); void SendTimeRemaining();
void Tick(); void Tick();

View File

@@ -3,13 +3,13 @@
#include <map> #include <map>
#include <thread> #include <thread>
#include "network/TCPListener.h" #include "td/network/TCPListener.h"
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "protocol/PacketDispatcher.h" #include "td/protocol/PacketDispatcher.h"
#include "protocol/PacketHandler.h" #include "td/protocol/PacketHandler.h"
#include "ServerGame.h" #include "server/game/ServerGame.h"
#include "ServerConnexion.h" #include "server/ServerConnexion.h"
#include "Lobby.h" #include "server/Lobby.h"
#define SERVER_TPS 20 #define SERVER_TPS 20
#define SERVER_TICK 1000 / SERVER_TPS #define SERVER_TICK 1000 / SERVER_TPS
@@ -63,17 +63,23 @@ private:
std::thread m_Thread; std::thread m_Thread;
bool m_ServerRunning; bool m_ServerRunning;
public: public:
Server(const std::string& worldFilePath); Server();
virtual ~Server(); virtual ~Server();
bool Start(std::uint16_t port); bool Start(std::uint16_t port, bool blocking);
void Stop(); // force the server to stop void Stop(); // force the server to stop
void Close(); // at the end of a game void Close(); // at the end of a game
void Restart(); // go back to lobby state
bool LoadMap(const std::string& worldFilePath);
bool IsMapLoaded();
void RemoveConnexion(std::uint8_t connexionID); void RemoveConnexion(std::uint8_t connexionID);
void BroadcastPacket(const protocol::Packet* packet); void BroadcastPacket(const protocol::Packet* packet);
float GetMSPT() const { return m_TickCounter.GetMSPT(); }
float GetTPS() const { return m_TickCounter.GetTPS(); } float GetTPS() const { return m_TickCounter.GetTPS(); }
bool IsRunning() { return m_ServerRunning; } bool IsRunning() { return m_ServerRunning; }
@@ -95,6 +101,7 @@ private:
void Clean(); void Clean();
void StartThread(); void StartThread();
void StopThread(); void StopThread();
void ServerLoop();
void Tick(std::uint64_t delta); void Tick(std::uint64_t delta);
void OnPlayerJoin(std::uint8_t id); void OnPlayerJoin(std::uint8_t id);

View File

@@ -1,10 +1,10 @@
#pragma once #pragma once
#include "network/TCPSocket.h" #include "td/network/TCPSocket.h"
#include "protocol/PacketHandler.h" #include "td/protocol/PacketHandler.h"
#include "protocol/PacketDispatcher.h" #include "td/protocol/PacketDispatcher.h"
#include "game/Player.h" #include "td/game/Player.h"
#include "game/Connexion.h" #include "td/network/Connexion.h"
namespace td { namespace td {
namespace server { namespace server {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
#include "misc/Time.h" #include "td/misc/Time.h"
#include "ServerWorld.h" #include "ServerWorld.h"
namespace td { namespace td {
@@ -23,6 +23,8 @@ public:
ServerWorld* GetServerWorld() { return &m_ServerWorld; } ServerWorld* GetServerWorld() { return &m_ServerWorld; }
virtual void Tick(std::uint64_t delta); virtual void Tick(std::uint64_t delta);
virtual void Reset() override;
void StartGame(); void StartGame();
// GameListener // GameListener
@@ -31,6 +33,9 @@ public:
virtual void OnGameBegin() override; virtual void OnGameBegin() override;
virtual void OnGameEnd() override; virtual void OnGameEnd() override;
virtual void OnGameClose() override; virtual void OnGameClose() override;
virtual void OnPlayerJoin(game::PlayerID id) override;
virtual void OnPlayerLeave(game::PlayerID id) override;
private: private:
void BalanceTeams(); void BalanceTeams();
void InitPlayerStats(); void InitPlayerStats();

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "game/World.h" #include "td/game/World.h"
namespace td { namespace td {
namespace server { namespace server {

View File

@@ -2,6 +2,9 @@
#include <cstdint> #include <cstdint>
#define SAFE_CHECK(expr) if(!(expr)) return
namespace td { namespace td {
static constexpr float PI = 3.141592653f; static constexpr float PI = 3.141592653f;

View File

@@ -1,8 +1,8 @@
#pragma once #pragma once
#include "game/Team.h" #include "td/game/Team.h"
#include "game/World.h" #include "td/game/World.h"
#include "game/Player.h" #include "td/game/Player.h"
namespace td { namespace td {
namespace game { namespace game {
@@ -42,6 +42,8 @@ public:
virtual void Tick(std::uint64_t delta); virtual void Tick(std::uint64_t delta);
virtual void Reset();
Team& GetRedTeam() { return m_Teams[static_cast<std::uint8_t>(TeamColor::Red)]; } Team& GetRedTeam() { return m_Teams[static_cast<std::uint8_t>(TeamColor::Red)]; }
const Team& GetRedTeam() const { return m_Teams[static_cast<std::uint8_t>(TeamColor::Red)]; } const Team& GetRedTeam() const { return m_Teams[static_cast<std::uint8_t>(TeamColor::Red)]; }
@@ -65,6 +67,8 @@ public:
const TeamList& GetTeams() const { return m_Teams; } const TeamList& GetTeams() const { return m_Teams; }
void RemovePlayer(PlayerID pId);
}; };
} // namespace game } // namespace game

View File

@@ -1,11 +1,11 @@
#pragma once #pragma once
#include "Defines.h" #include "td/Defines.h"
#include "Towers.h" #include "Towers.h"
#include "Types.h" #include "Types.h"
#include "Team.h" #include "Team.h"
#include "misc/ObjectNotifier.h" #include "td/misc/ObjectNotifier.h"
#include <vector> #include <vector>
#include <memory> #include <memory>
@@ -99,7 +99,7 @@ private:
utils::CooldownTimer m_AttackTimer; utils::CooldownTimer m_AttackTimer;
public: public:
Mob(MobID id, MobLevel level, PlayerID sender) : m_Sender(sender), m_Level(level), Mob(MobID id, MobLevel level, PlayerID sender) : m_ID(id), m_Sender(sender), m_Level(level),
m_HitCooldown(0), m_EffectFireTimer(1000), m_EffectPoisonTimer(1000), m_HitCooldown(0), m_EffectFireTimer(1000), m_EffectPoisonTimer(1000),
m_EffectHealTimer(1000), m_CastleTarget(nullptr), m_AttackTimer(1000) { m_EffectHealTimer(1000), m_CastleTarget(nullptr), m_AttackTimer(1000) {

View File

@@ -2,8 +2,8 @@
#include <string> #include <string>
#include "game/Team.h" #include "td/game/Team.h"
#include "game/PlayerUpgrades.h" #include "td/game/PlayerUpgrades.h"
namespace td { namespace td {
namespace game { namespace game {

View File

@@ -2,7 +2,7 @@
#include "Types.h" #include "Types.h"
#include "misc/Shapes.h" #include "td/misc/Shapes.h"
#include <vector> #include <vector>
#include <memory> #include <memory>
@@ -74,6 +74,7 @@ public:
void AddPlayer(Player* newPlayer); void AddPlayer(Player* newPlayer);
void RemovePlayer(const Player* player); void RemovePlayer(const Player* player);
void ClearPlayers();
TeamColor GetColor() const; TeamColor GetColor() const;

View File

@@ -3,10 +3,10 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include "misc/Time.h" #include "td/misc/Time.h"
#include "misc/Shapes.h" #include "td/misc/Shapes.h"
#include "game/Types.h" #include "td/game/Types.h"
namespace td { namespace td {
namespace game { namespace game {

View File

@@ -3,7 +3,7 @@
#include <cstdint> #include <cstdint>
// include Log for every files // include Log for every files
#include "misc/Log.h" #include "td/misc/Log.h"
namespace td { namespace td {
namespace game { namespace game {

View File

@@ -171,7 +171,10 @@ public:
void Tick(std::uint64_t delta); void Tick(std::uint64_t delta);
void Reset(); // clear mobs and towers
void SpawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID sender, float x, float y, Direction dir); void SpawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID sender, float x, float y, Direction dir);
MobPtr RemoveMob(MobID id);
TowerPtr PlaceTowerAt(TowerID id, TowerType type, std::int32_t x, std::int32_t y, PlayerID builder); TowerPtr PlaceTowerAt(TowerID id, TowerType type, std::int32_t x, std::int32_t y, PlayerID builder);
TowerPtr RemoveTower(TowerID id); TowerPtr RemoveTower(TowerID id);
@@ -217,7 +220,9 @@ public:
const TeamList& GetTeams() const; const TeamList& GetTeams() const;
TowerList& GetTowers() { return m_Towers; }
const TowerList& GetTowers() const { return m_Towers; } const TowerList& GetTowers() const { return m_Towers; }
TowerPtr GetTowerById(TowerID tower); TowerPtr GetTowerById(TowerID tower);
const Player* GetPlayerById(PlayerID id) const; const Player* GetPlayerById(PlayerID id) const;

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Defines.h" #include "td/Defines.h"
#include <cmath> #include <cmath>
namespace td { namespace td {

View File

@@ -1,9 +1,9 @@
#pragma once #pragma once
#include "network/TCPSocket.h" #include "td/network/TCPSocket.h"
#include "protocol/PacketHandler.h" #include "td/protocol/PacketHandler.h"
#include "protocol/PacketDispatcher.h" #include "td/protocol/PacketDispatcher.h"
#include "game/Player.h" #include "td/game/Player.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -12,10 +12,10 @@
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#include "network/Socket.h" #include "td/network/Socket.h"
#include "network/IPAddress.h" #include "td/network/IPAddress.h"
#include "network/UDPSocket.h" #include "td/network/UDPSocket.h"
#include "network/TCPSocket.h" #include "td/network/TCPSocket.h"
namespace td { namespace td {
namespace network { namespace network {

View File

@@ -5,7 +5,7 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include "misc/DataBuffer.h" #include "td/misc/DataBuffer.h"
#ifdef _WIN32 #ifdef _WIN32
#include <ws2tcpip.h> #include <ws2tcpip.h>

View File

@@ -1,8 +1,8 @@
#ifndef NETWORK_TCP_SOCKET_H_ #ifndef NETWORK_TCP_SOCKET_H_
#define NETWORK_TCP_SOCKET_H_ #define NETWORK_TCP_SOCKET_H_
#include "network/IPAddress.h" #include "td/network/IPAddress.h"
#include "network/Socket.h" #include "td/network/Socket.h"
#include <cstdint> #include <cstdint>

View File

@@ -1,8 +1,8 @@
#ifndef NETWORK_UDP_SOCKET_H_ #ifndef NETWORK_UDP_SOCKET_H_
#define NETWORK_UDP_SOCKET_H_ #define NETWORK_UDP_SOCKET_H_
#include "network/IPAddress.h" #include "td/network/IPAddress.h"
#include "network/Socket.h" #include "td/network/Socket.h"
#include <cstdint> #include <cstdint>

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include <map> #include <map>
#include <vector> #include <vector>

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "protocol/PacketsForward.h" #include "td/protocol/PacketsForward.h"
namespace td { namespace td {
namespace protocol { namespace protocol {
@@ -27,6 +27,7 @@ public:
virtual void HandlePacket(const PlayerLeavePacket* packet) {} virtual void HandlePacket(const PlayerLeavePacket* packet) {}
virtual void HandlePacket(const PlayerListPacket* packet) {} virtual void HandlePacket(const PlayerListPacket* packet) {}
virtual void HandlePacket(const PlayerLoginPacket* packet) {} virtual void HandlePacket(const PlayerLoginPacket* packet) {}
virtual void HandlePacket(const RemoveMobPacket* packet) {}
virtual void HandlePacket(const RemoveTowerPacket* packet) {} virtual void HandlePacket(const RemoveTowerPacket* packet) {}
virtual void HandlePacket(const SelectTeamPacket* packet) {} virtual void HandlePacket(const SelectTeamPacket* packet) {}
virtual void HandlePacket(const SendMobsPacket* packet) {} virtual void HandlePacket(const SendMobsPacket* packet) {}

View File

@@ -8,6 +8,7 @@
#include "packets/PlayerLeavePacket.h" #include "packets/PlayerLeavePacket.h"
#include "packets/PlayerListPacket.h" #include "packets/PlayerListPacket.h"
#include "packets/PlayerLoginPacket.h" #include "packets/PlayerLoginPacket.h"
#include "packets/RemoveMobPacket.h"
#include "packets/RemoveTowerPacket.h" #include "packets/RemoveTowerPacket.h"
#include "packets/SelectTeamPacket.h" #include "packets/SelectTeamPacket.h"
#include "packets/SendMobsPacket.h" #include "packets/SendMobsPacket.h"

View File

@@ -29,6 +29,7 @@ class UpdateCastleLifePacket;
class UpdateMobStatesPacket; class UpdateMobStatesPacket;
class PlayerBuyItemPacket; class PlayerBuyItemPacket;
class PlayerBuyMobUpgradePacket; class PlayerBuyMobUpgradePacket;
class RemoveMobPacket;
} // namespace protocol } // namespace protocol
} // namespace td } // namespace td

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "misc/DataBuffer.h" #include "td/misc/DataBuffer.h"
#include <memory> #include <memory>
@@ -13,7 +13,6 @@ enum class PacketType : std::uint8_t {
// client --> server // client --> server
PlayerLogin = 0, PlayerLogin = 0,
SelectTeam, SelectTeam,
SpawnMob,
SendMobs, SendMobs,
PlaceTower, PlaceTower,
@@ -33,6 +32,8 @@ enum class PacketType : std::uint8_t {
WorldAddTower, WorldAddTower,
UpdateMobStates, UpdateMobStates,
UpdateCastleLife, UpdateCastleLife,
SpawnMob,
RemoveMob,
// client <--> server // client <--> server
KeepAlive, KeepAlive,

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -0,0 +1,27 @@
#pragma once
#include "td/protocol/Protocol.h"
#include "td/game/BaseGame.h"
namespace td {
namespace protocol {
class RemoveMobPacket : public Packet {
private:
game::MobID m_MobID;
public:
RemoveMobPacket() {}
RemoveMobPacket(game::MobID id) : m_MobID(id) {}
virtual ~RemoveMobPacket() {}
virtual DataBuffer Serialize(bool packetID = true) const;
virtual void Deserialize(DataBuffer& data);
virtual void Dispatch(PacketHandler* handler) const;
game::MobID GetMobID() const { return m_MobID; }
virtual PacketType GetType() const { return PacketType::RemoveMob; }
};
} // namespace protocol
} // namespace td

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "protocol/Protocol.h" #include "td/protocol/Protocol.h"
#include "game/BaseGame.h" #include "td/game/BaseGame.h"
namespace td { namespace td {
namespace protocol { namespace protocol {

Some files were not shown because too many files have changed in this diff Show More