983 Commits

Author SHA1 Message Date
Christof Petig
61384aaf0e implement /home to return to home town 2020-11-04 00:55:15 +01:00
Marcel Märtens
e24f908280 Undo one Componenet per Stream and instead use Client.
In order to keep the performance we made it Internal Mutability and use a `Mutex` per Stream, till `Stream.send` is no longer `&mut self`.
The old solution didn't rely on this, but needed multiple Components instead which zest didn't liked
2020-11-03 08:56:08 +01:00
Marcel Märtens
dc26a6e36f extract a Presence Component, which is server only and has state of Player and Client. Presence is only valid for Clients that are in game 2020-11-03 08:56:02 +01:00
Marcel Märtens
3efcca88af Fix an error that a failed initialization of a client lead to a Kill of the gameserver. Instead we just log a msg now. 2020-11-03 08:55:56 +01:00
Marcel Märtens
93451d12ed Fix clients are disconnecting GRACEFULLY by removing the Disconnect Request from a client, a client now sends a TERMINATE message directly 2020-11-03 08:55:54 +01:00
Marcel Märtens
50ac07c752 review:
- fix wording in error msg
 - find better name for structs
 - unify errors and cleanup code with `(|| {foo?; Some(())})()` pattern
 - fix the negative PlayersOnline, it was caused by having a gracefull shutdown AND a timeout error. we now unregister the client when he issues TERMINATE
2020-11-03 08:55:51 +01:00
Marcel Märtens
b11ee10b9c implement lazy_msg which only serialize + compress AT MAX ONCE if the same msg is send to multiple participants 2020-11-03 08:55:46 +01:00
Marcel Märtens
cc6f094e8a remove clippy warnings no longer needed 2020-11-03 08:55:44 +01:00
Marcel Märtens
bfe623fe8d replace the single message system with 5 message systems. one per stream to handle less ECS systems PER msg system.
As the MAIN message system was already on 25 of the max of 26 possible Ressources
2020-11-03 08:55:42 +01:00
Marcel Märtens
378b769999 working on implementing seperated msg system.
Does compile, but only reach connection till character screen.
Full play not yet possible
2020-11-03 08:55:36 +01:00
Marcel Märtens
3cbde52735 remote all streams from Client and put it directly in the ecs system.
This commit does not run compile as the message sys now would requiere 30 imput parameters which is over the max of 26 :/
2020-11-03 08:55:35 +01:00
Imbris
9ec29c5465 Merge branch 'bbenton91/add-mount-range-check' into 'master'
Fixes #814. Added range check to mounting

Closes #814

See merge request veloren/veloren!1466
2020-10-31 03:50:00 +00:00
Brad
647f000b0a Added range check to mounting 2020-10-30 22:34:44 -04:00
Brad
7a698f5fbc Added range check to block pickup 2020-10-30 19:50:36 -04:00
Imbris
5660cd6961 Allow interacting with nearby blocks without pointing at them, unify selection of block/entity interactors so that only one is select at once, rearrange pickup and mount range consts 2020-10-29 18:40:11 -04:00
Imbris
20c6b171d6 Log where the userdata folder is in binary crates, fix bug where the old
path was logged instead of the new path when renaming invalid settings
2020-10-29 18:30:49 -04:00
Sam
824a5e0aa7 Transitioned damage and healing from u32/i32s to enums. 2020-10-28 18:15:25 -05:00
Sam
074e44c0e7 Addressed more comments. Changed how buffs were sorted so that duration was also taken into account. 2020-10-26 19:30:18 -05:00
Adam Whitehurst
e83942fecd add maxhealthmodifier
oops variable
2020-10-26 19:30:18 -05:00
Sam
02f5f0facd Transitioned buff storage from a vec to a hashmap. Addressed other comments. Only continuous buff effects are handled right now. 2020-10-26 19:30:17 -05:00
Sam
f95a0411d8 Cleaned up UI code. Removed stuff added for testing. Added 10% for melee attacks to inflict a bleeding debuff. Renamed BuffId to BuffKind. Fixed memory leak. Set event emission to false when timer is decremented. 2020-10-26 19:30:10 -05:00
Sam
6619ac8c0f Cleaned up logic used to handle buff addition. Old active buffs now get deleted if they had a smaller duration and weaker strength. 2020-10-26 19:28:26 -05:00
Monty Marz
ac17c57975 Initial implementation of buffs UI
player buffs animation

more testing debuffs

sorting and display limit fix

overhead buffs

fix

WIP buff removal function

fmt

Update buffs.rs

Now with compiling: WIP group UI buffs

positioning

Update group.rs

Update group.rs

Small optimizations.

Fixed positioning of buffs in group panel. Broke buff tooltips in group panel.

buff frame visuals

added setting for displaying buffs at minimap
2020-10-26 19:28:24 -05:00
Sam
e83e219d4b Buffs now get removed on death by default. Buffs are now required to have either the 'Buff' or 'Debuff' tag. RemoveByCategory function now has support for blacklisting certain categories. Support for UI stuffs. 2020-10-26 19:28:23 -05:00
Samuel Keiffer
bf3e41a3ad Addressed comments. 2020-10-26 19:28:22 -05:00
Sam
a414ddf830 Moved duration to inside BuffId enum to future-proof for when buffs are persisted. 2020-10-26 19:28:20 -05:00
Sam
3bcec0c409 Server event used to deal damage/heal with buffs. Buff kills now award xp. 2020-10-26 19:28:20 -05:00
Sam
1d008dca33 Added functionality to remove buffs by category. 2020-10-26 19:28:19 -05:00
Sam
ddebad6a73 Separated buffs into active and inactive buffs. There can only be 1 active buff at a time of a particular buff id. If a new buff is stronger than an active buff, it moves the active buff to inactive buffs. When active buffs are removed, it checks inactive buffs for any buffs of the same id and moves the strongest one to active buffs. 2020-10-26 19:28:18 -05:00
Sam
d7f1ffc991 When buffs expire from duration, now only they expire rather than ending all buffs of the same type. 2020-10-26 19:28:17 -05:00
Sam
ddce5b78fc Creatures and playrs now have buffs component, buffs that expire now only end their particular buff instead of every buff with the same type. 2020-10-26 19:28:16 -05:00
Sam
7ae25e1e56 Move addition/removal of buffs to server event. 2020-10-26 19:28:15 -05:00
BottledByte
4c10491263 Initial WIP implementation of the Buff system 2020-10-26 19:28:14 -05:00
Marcel Märtens
b02f8428fb fix clippy after toolchain update 2020-10-26 22:30:51 +01:00
Marcel
5b50819436 Merge branch 'xMAC94x/fix-tarpaulin' into 'master'
xMAC94x/fixTarpaulin

See merge request veloren/veloren!1427
2020-10-26 16:54:37 +00:00
Marcel Märtens
27cf6d8439 Fixing Tarpaulin isn't easy.
So first off all we had to update the toolchain, i think everything in september is okay, but we got with this current version.
Then we had to update several dependencies, which broke:
 - need a specific fix of winit, i think we want to get rid of this with iced, hopefully, because its buggy as hell. update wayland client to 0.27
 - use a updated version of glutin which has wayland-client 0.27 and no longer the broke version 0.23
 - update conrod to use modern copypasta 0.7
 - use `packed_simd_2` instead of `packed_simd` as the owner of the create abandoned the project.
 - adjust all the coding to work with the newer glutin and winit version. that also includes fixing a macro in one of the dependencies that did some crazy conversion from 1 event type to another event type.
   It was called `convert_event`
 - make a `simd` feature which is default and introduce conditional compiling.
   AS I HAVE NO IDEA OF SIMD AND THE CODE. AND I DIDN'T INTRODUCE THE ERROR IN THE FIRST PLACE, WE PANIC FOR NON SIMD CASE FOR NOW. BUT IT WORKS FOR TESTS.
 - tarpaulin doesnt support no-default-features. so we have to `sed` them away. semms fair.
2020-10-26 17:04:20 +01:00
Brad
08c74d1322 Removed else branch and ran fmt and clippy 2020-10-25 16:43:07 -04:00
Brad
29daae6cc2 Updated code to be more consistent with codebase 2020-10-25 15:54:08 -04:00
Brad
f7f1445b2a Added is_dead check to item pickup 2020-10-25 03:40:34 -04:00
Imbris
c83cb2707f Fix crash with unicode characters 2020-10-24 16:03:53 -04:00
jshipsey
9503cf9cb9 roshwalr fix 2020-10-19 16:20:59 +02:00
jiminycrick
ad5dd0b043 Added secondary skills to agent code (except bow) 2020-10-19 16:20:58 +02:00
Enrico Marconi
04effe8db1 Fix #793 2020-10-18 11:03:02 +02:00
Sam
fb2e94360d Made ability key not hardcoded in tool.rs. 2020-10-15 20:05:58 -05:00
Sam
90a1185096 Moved explsion struct from within comp to common. 2020-10-14 21:06:55 -05:00
Sam
fbd91918e7 Addressed playtesting feedback. 2020-10-14 21:06:52 -05:00
Sam
6672b5cd91 Fixed shockwaves hitting entities multiple times. Explosions can now regen energy. Staff M1 now has particles instead of using bomb particles. 2020-10-14 20:56:23 -05:00
Sam
42d5e91540 Reworked explosions. Tweaked staff fireball. 2020-10-14 20:56:21 -05:00
Marcel Märtens
69b3d8616c rename a file, fix error msg, dont spam persistence by default 2020-10-13 00:06:24 +02:00
Marcel Märtens
e8e6e7e49a pack together InGame, CharacterScreen and General variant in a single enum, as requested by zesterer.
His reason to reqeust that is, that there might not be a perfect disctinction in the future.
Now we need to send ServerGeneral over streams and do additional checking at various places to verify that not the wrong variant is send.
2020-10-12 11:27:21 +02:00