Commit Graph

301 Commits

Author SHA1 Message Date
Imbris
4e60d19762 Remove accidental leftover dbg 2020-11-22 02:58:44 -05:00
Imbris
e72c69ca41 Merge branch 'imbris/fix-apple-bug' into 'master'
Fix issues with not being able to grab highlighted apples by unifying distance checking

Closes #820

See merge request veloren/veloren!1532
2020-11-21 02:55:09 +00:00
Imbris
ea275e320f Rename pos fields of Cube and Cylinder for enhanced clarity and added a few tests to the find_dist module 2020-11-20 20:51:44 -05:00
jiminycrick
b3aa454f8e Initial work to move combat sfx to outcomes 2020-11-18 13:31:12 -08:00
jiminycrick
77d624f640 Made level up sounds use outcomes instead of emitting an event 2020-11-18 13:31:12 -08:00
Imbris
7427367d96 Fix issues with not being able to grab highlighted apples by unifying distance checking 2020-11-17 23:06:02 -05:00
Snowram
950eb1976d Addressed more comments 2020-11-17 23:54:01 +01:00
Snowram
7af561263d Addressed comments 2020-11-17 23:27:13 +01:00
Snowram
93642428f2 Move eye sight and scale in body.rs, mounts tweaks 2020-11-17 23:27:13 +01:00
entropicdrifter
fae3cf2521 create and use get_attacker_name method 2020-11-15 21:49:54 -05:00
Sam
69bb54b4a2 Campfires can no longer be yeeted by arrows. 2020-11-15 11:13:03 -06:00
Ben Wallis
40e9c4a3e2 Fixed character data not being persisted on character switch 2020-11-14 13:36:54 +00:00
Sam
b5f59f9cf3 Fixed tests. Addressed comments. 2020-11-13 10:41:34 -06:00
Imbris
37e4ea4669 Remove ability map from top level functions 2020-11-12 21:24:35 -06:00
Sam
9b4fa4e961 Started moving loading of ability manifest to an ecs variable. 2020-11-12 21:24:34 -06:00
Christof Petig
b56919b123 Make waypoints persistent
Closes #549
2020-11-08 22:15:47 +01:00
AlKabir
4803ee5c81 changed to an or operand 2020-11-07 23:37:15 -06:00
AlKabir
6535deae9c added two meat assets for mobs to drop 2020-11-07 23:34:20 -06:00
AlKabir
289126d9c8 Make different mobs drop different assetts on death (not just lootbags) cargo fmt 2020-11-07 22:50:38 -06:00
AlKabir
134c481408 Make different mobs drop different assetts on death (not just lootbags) 2020-11-07 22:50:38 -06:00
AlKabir
77f3c7e3c5 Minor combat fixes (see issue 785) 2020-11-07 18:00:07 +00:00
Samuel Keiffer
44f676d90c Merge branch 'sam/make-roll-great-again' into 'master'
Roll overhaul

See merge request veloren/veloren!1484
2020-11-06 03:25:18 +00:00
Sam
37ecb165ef Addressed comments. Roll now only provides i-frames to melee attacks. It also reduces height of hitbox. 2020-11-05 20:40:20 -06:00
Snowram
ce96af4363 Allow for an arbitrary array of effects and buffs for consumables 2020-11-06 01:08:30 +01:00
Sam
4a1a3f3ecc Roll now gives i-frames. 2020-11-05 16:48:04 -06:00
Sam
55e75adec0 Created new fields in roll. Centralized generation of abilities. Added builder function for rolls since they are not yet tied to equipment. 2020-11-05 12:28:18 -06:00
Marcel
121364821a Merge branch 'xMAC94x/FeuerzeugBierflasche' into 'master'
xMAC94x/feuerzeugBierflasche

See merge request veloren/veloren!1478
2020-11-05 09:22:50 +00:00
Sam
f69f494524 Fixed crash from changes in explosion code. 2020-11-04 22:21:02 -06:00
Sam
a0af315930 Addressed comments. 2020-11-04 19:22:08 -06:00
Sam
bda7fefdc0 Removed Damages struct. Added GroupTarget enum. Changed RadiusEffect to use Effect instead of Daamges. Added Damage variant to Effect Eenum. 2020-11-04 19:22:07 -06:00
Sam
d38f1d319c Energy and health change server events now reference EcsEntity instead of Uid. Added TargetGroup to use to determine targets of effects/damage. Added Entity(TargetGroup, Effect) to RadiusEffect enum. 2020-11-04 19:22:06 -06:00
Sam
87bff41a66 Addressed comments. 2020-11-04 19:22:05 -06:00
Sam
c48c022f7e Separated out health from stats component. 2020-11-04 19:22:04 -06:00
Sam
f1f5c2b21b Added energy change server event. 2020-11-04 19:22:01 -06:00
Sam
e0cbbf52ed Changed explosions to take a vec of RadiusEffects. Changed Damage to a struct of DamageSource and value. Added interpolation function to damage. 2020-11-04 19:22:00 -06:00
Marcel Märtens
bbe6e8be7c Improve Phyiscs speed of entity handling.
Before we had accessed velocities in a nested loop O(n²).
Now we copy it only once out of the ECS system and store it in a tmp Vec.
As we no longer need to hold a mut and imutable reference, we can iter of `&mut velocities` again in the outer loop.
Also improved many calculations called in the loop to make the check if 2 entities are to far apart as easy as possible
2020-11-04 11:53:09 +01:00
Marcel Märtens
094bb7c45a keep Presence when possesing 2020-11-04 11:49:05 +01:00
Marcel Märtens
3d9c3e481e 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
00456c8373 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
37d08e93ca 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
e9be36c993 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
dd966dd00e 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
cf06912b7b 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
95163a5a65 Added range check to mounting 2020-10-30 22:34:44 -04:00
Brad
a1baab1a5c Added range check to block pickup 2020-10-30 19:50:36 -04:00
Imbris
64def3cde4 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
Sam
a7e3e55a12 Transitioned damage and healing from u32/i32s to enums. 2020-10-28 18:15:25 -05:00
Sam
5d0fd3d9bc 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
f759895d63 add maxhealthmodifier
oops variable
2020-10-26 19:30:18 -05:00
Sam
f60985d733 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
337cf6e137 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
5a5d35fade 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
8fa398954d 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
007d3c09ac 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
60a5346a0b Addressed comments. 2020-10-26 19:28:22 -05:00
Sam
0df061a38e Moved duration to inside BuffId enum to future-proof for when buffs are persisted. 2020-10-26 19:28:20 -05:00
Sam
1a1ceb54bc Server event used to deal damage/heal with buffs. Buff kills now award xp. 2020-10-26 19:28:20 -05:00
Sam
de7191b985 Added functionality to remove buffs by category. 2020-10-26 19:28:19 -05:00
Sam
ccad1fa0b8 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
b8690473e4 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
125de0b46e 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
c50063ad0c Move addition/removal of buffs to server event. 2020-10-26 19:28:15 -05:00
Brad
071ce08b69 Removed else branch and ran fmt and clippy 2020-10-25 16:43:07 -04:00
Brad
cfbdbf14aa Updated code to be more consistent with codebase 2020-10-25 15:54:08 -04:00
Brad
11f747cc5f Added is_dead check to item pickup 2020-10-25 03:40:34 -04:00
jshipsey
64d73abdec roshwalr fix 2020-10-19 16:20:59 +02:00
Sam
e6684009c2 Made ability key not hardcoded in tool.rs. 2020-10-15 20:05:58 -05:00
Sam
d869f7e430 Moved explsion struct from within comp to common. 2020-10-14 21:06:55 -05:00
Sam
14e4af7ab6 Addressed playtesting feedback. 2020-10-14 21:06:52 -05:00
Sam
1c21362bc3 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
cbb72363af Reworked explosions. Tweaked staff fireball. 2020-10-14 20:56:21 -05:00
Marcel Märtens
2a7378b4ae 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
Marcel Märtens
00c66b5b9c remove a Mutex and AtomicBool 2020-10-11 23:02:39 +02:00
Marcel Märtens
ff374eab59 create a ServerMsg and ClientMsg enum and verify the state when in debug mode to benefit from the transition 2020-10-11 22:59:53 +02:00
Marcel Märtens
8b40f81ee2 No longer block the main thread for client connections, new clients will be handled by server without waiting.
- Instread we have a dedicated thread that will async wait for new participants to connect and then notify the main thread
- registry no longer sends a view distance with it.
- remove ClientMsg::Command again as it's unused
2020-10-11 22:55:02 +02:00
Marcel Märtens
017e004309 Rename enums to allow a super enum in the future, but i am not yet sure if we want to introduce this yet
```
//This is a helper structure, containing all possible data send over
pub enum ClientMsg {
    Initial(ClientType),
    General(ClientGeneralMsg),
    InGame(ClientInGameMsg),
    NotInGame(ClientNotInGameMsg),
    Register(ClientRegisterMsg),
    Ping(PingMsg)
}
```
2020-10-11 22:49:25 +02:00
Marcel Märtens
b1db5ef488 Redo Network Frontend.
Rather than having a single Stream to handle ALL data, seperate into multiple streams:
 - Ping Stream, for seperate PINGS
 - Register Stream, only used till the client is registered, then no longer used!
 - General Stream, used for msg that can occur always
 - NotInGame Stream, used for everything NOT ingame, e.g. Character Screen
 - InGame Stream, used for all GAME data, players, terrain, entities, etc...

This version does compile, and gets the client registered (with auth too) but doesnt get to the char screen yet.

This fixes also the ignoring messages problem we had, as we are not sending data to the register stream!
This fixes also the problem that the server had to sleep for the Stream Creation, as the Server is now creating the streams and client has to sleep.
2020-10-11 22:49:14 +02:00
Monty Marz
2b800a2b63 make clippy happy
Delete glider.ron
2020-10-07 02:23:20 +00:00
Sam
47abf49751 Addressed comments 2020-09-29 20:48:23 -05:00
Sam
0b80257aa3 Add migration 2020-09-29 19:48:15 -05:00
Sam
a8f31cbe6f Beam tick rate now more responsive when aiming. 2020-09-29 19:48:14 -05:00
Sam
ffe456c703 Fixed what broke after rebasing. 2020-09-29 19:48:13 -05:00
Sam
de45784596 Addressed round of testing feedback. 2020-09-29 19:48:09 -05:00
Sam
18c2b850d3 Added healing healthsource logic to beam system. 2020-09-29 19:48:08 -05:00
Sam
46563e7008 Added beam system. Added collision code for spherical wedge/cylinder detection. 2020-09-29 19:48:04 -05:00
Sam
6b23af6e0b Tweaked particles. Added skill icons. 2020-09-29 19:47:58 -05:00
Sam
8b9202710f New sceptre M2 is functional. 2020-09-29 19:47:57 -05:00
Ben Wallis
1205820e8b Preserve admin component if present on return to character select screen 2020-09-27 20:25:00 +01:00
Joshua Yanovski
938039a56e Remove spurious uses of Vox.
In the process, also try to address a few edge cases related to block
detection, such as adding back previously solid sprites and removing
filters that may be vestiges of earlier logic.
2020-09-26 16:30:40 +02:00
Joshua Barretto
0ca42857fa Addressed review issues 2020-09-21 21:10:32 +01:00
Joshua Barretto
49d1b3df6d Improved docs 2020-09-20 11:46:12 +01:00
Joshua Barretto
ece4a01867 Improved representation of Block for better performance, more features, and better backwards-compatibility 2020-09-20 11:46:12 +01:00
Sam
45fef87f32 Addressed comments 2020-09-19 14:40:21 -05:00
Sam
d0f068ba63 Fixed shockwave and melee crit damage bypassing infinite armor. Made knockback not be applied if infinite armor. 2020-09-19 14:40:18 -05:00
Sam
6327dd18b6 Moved knockback to a server event so that it would actually be applied to the player. 2020-09-19 14:40:17 -05:00
Imbris
829d8a20d1 Add shockwave system to handle shockwaves colliding with other entities 2020-09-19 14:40:10 -05:00
Sam
717142d5ea Started to implement shockwave system. 2020-09-19 14:29:06 -05:00
Sam
68ecfba291 Projectile speed is no longer hard-coded. 2020-09-19 14:29:05 -05:00
scott-c
2686598f1f Improve first-person projectile aiming 2020-09-19 19:14:23 +08:00
jshipsey
5bb45a4861 spawn tweaks, improved odonto 2020-09-17 22:32:11 -04:00