Commit Graph

3275 Commits

Author SHA1 Message Date
Joshua Barretto
a76496c339 Use previous position caches for airship collision detection 2021-09-17 22:34:28 +01:00
Imbris
bc4455afe4 Merge branch 'anomaluridae/cleanup-interactable' into 'master'
Seperation of targets vs interactables. Cleaner cursor interactions.

See merge request veloren/veloren!2754
2021-09-17 19:25:08 +00:00
anomaluridae
82f3c3c3e8 is_solid() detects both solid rock and sprites (e.g. mineable ore). when in build mode, would like to be able to still mine if user cursor is over a mineable ore. so need to properly cast the build ray to use opaque (not fillable) blocks to get the proper position, vs the mineable block which may be nearer 2021-09-17 10:34:20 -07:00
anomaluridae
6362df4ffc keep MAX_TARGET_RANGE within voxygen 2021-09-17 10:34:20 -07:00
anomaluridae
42d5836cfa properly use the target vs pickup range, in choosing the interactable. when finding the target_entity, use the proper limited dist range (cast_dist) with the proper upper bounds. 2021-09-17 10:34:20 -07:00
anomaluridae
5c66f73bb4 make the ContollerInputs.select_pos be explicitly the breakable blacks for mining 2021-09-17 10:34:20 -07:00
juliancoffee
f810af4eec Rename EntityInfo level field to health_scaling 2021-09-17 20:12:42 +03:00
juliancoffee
19f0cf4ee5 Set z_min to 0 for terrain collision checks
This allows us have different z_min for e2e checks
2021-09-17 13:28:34 +03:00
juliancoffee
e5d69d153b Adress review
Make sausage ascii-art have `a` line inside of stadium
2021-09-17 13:28:34 +03:00
juliancoffee
4e3fb87526 Adress review
- Rename Collider::get_radius to bounding_radius
- Check origin difference in CapsulePrism with EPSILON * 10.0 instead of
  magic 0.00001
- Add comments for closest_points, hardnened expression against NaNs
- Add comments to try_e2e_collision function, renamed to
  resolve_e2e_collision, make it return whether collision was triggered.
- Remove Collider::Box (it is Cylinder, which is subset of CapsulePrism
  with p0=p1=Vec2::zero())
2021-09-17 13:28:34 +03:00
juliancoffee
3dd6aa9dea Implement capsule2capsule collisions 2021-09-17 13:28:34 +03:00
juliancoffee
fdb4b7111a Fix bug with zero-pushback for bigger colliders 2021-09-17 13:28:34 +03:00
juliancoffee
c069a3523d Fix beam offsets
- Introduce notion of min and max radius for Body instead of old
  `radius()` function (which is renamed to `max_radius()`).
2021-09-17 13:28:34 +03:00
juliancoffee
7d97fe7ec5 Fix colliding bugs
- Make cylinder-like capsules prisms work without NaN in origin offsets.
Just return p0 as both origins instead of getting NaN by further
normalizing required because of how we rotate offsets.
- Fix pushback direction.
Make sure that pushback is calculated as our_pos - their_pos (and not
other way around).
- Fix colliding boundary detection.
Calculate center as Vec3::new(0, 0, height) and
not as `Vec3::new(0, height, 0)`.
2021-09-17 13:28:34 +03:00
juliancoffee
eeb3bec8ad Refactor implementation of e2e collision
+ Add some hopefully helpful comments
+ Extract colliding tries to separate function
+ Move to Capsule + Cylinder collider combination instead of Capsule +
  Capsule.
2021-09-17 13:28:34 +03:00
juliancoffee
44962958d8 Adress feedback
- Rewrite 2 * PI to TAU
- Some comment formatting
2021-09-17 13:28:34 +03:00
juliancoffee
d86c9f2678 Remove body::Shape enum, make npc use CapsulePrism 2021-09-17 13:28:34 +03:00
juliancoffee
6c3b61dc25 Implement CapsulePrism collisions 2021-09-17 13:28:34 +03:00
juliancoffee
7712976b86 Refactor box_voxel_collision function 2021-09-17 13:28:34 +03:00
juliancoffee
3b308a3f6f Add CapsulePrism collider variant
+ Add placeholder physics collision implementation as copy of cylinder
  Box collider.
+ Display it with debug hitboxes.
2021-09-17 13:28:34 +03:00
Sam
99981338bb Fixed exp fix mistake and fixed lava, campfire, and bomb damage. 2021-09-15 08:32:44 -04:00
Sam
3d31248ced Fixed health ui in few places and xp scaling from health. 2021-09-14 10:55:14 -04:00
Samuel Keiffer
73d3d3e4bb Merge branch 'sam/health-float' into 'master'
Turned Health into a Float

See merge request veloren/veloren!2824
2021-09-13 15:23:18 +00:00
Sam
fec92c3000 Fixed plugin tests with hack. 2021-09-13 10:34:40 -04:00
Sam
85f4e66337 Addressed MR 2824 comments 2021-09-10 15:20:14 -04:00
Monty Marz
1d94adc2e1 0.11 Background images and more 2021-09-10 08:34:01 +00:00
Sam
42012fddcb Overhauled health component, making it a float to outer interfaces. 2021-09-09 00:10:17 -04:00
Sam
c7291701e1 Sprite interaction fixes 2021-09-07 20:34:04 -04:00
Joshua Barretto
003b9f57ce Merge branch 'juliancoffee/pvp_command' into 'master'
Implement /battlemode command and more

See merge request veloren/veloren!2787
2021-09-04 18:37:01 +00:00
juliancoffee
670e29a286 Better formatting 2021-09-04 20:56:55 +03:00
juliancoffee
3cf9d0cdb0 Adress review:
- explanation of what pvp/pve means in /battlemode help
- check for radius from town instead of town in chunks (because it count
  plant fields, which is kinda meh)
- better error displaying
2021-09-04 20:38:53 +03:00
Sam
f65b3a094d Cultists now properly raid villages. 2021-09-04 12:25:04 -04:00
juliancoffee
43d40c4efc Workaround of bug with global Player component
* Set default value of battle_mode and last_battlemode_change explicitly
if isn't found in battlemode_buffer
2021-09-04 02:29:02 +03:00
juliancoffee
1baa9e9879 Add in-memory persistence for battlemode changes 2021-09-04 01:41:48 +03:00
juliancoffee
fbe745fe1e Cooldowns
- Add last_battlemode_change to Player component
- check on last_battlemode_change in handle_battlemode
- set last_battlemode_change after setting battlemode
- still are not persisted in any way
2021-09-04 01:41:48 +03:00
juliancoffee
338e81de10 Deduplicate pvp-checks 2021-09-03 17:28:34 +03:00
juliancoffee
2e79c61123 Implement /battlemode_force command
+ add placeholder for /battlemode command (currently can only show your
  battle mode)
2021-09-03 17:28:34 +03:00
juliancoffee
6b0d016418 Don't forget about pets in PvP checks 2021-09-03 17:28:34 +03:00
Sam
0a3b541940 Removed ability to 'droideka' through dungeons. 2021-09-02 19:48:30 -04:00
Sam
5f08089bd9 Recover section no longer has 0 movement. 2021-09-02 19:27:07 -04:00
juliancoffee
6c1ecc9766 Add support for override asset folder
- ASSETS_OVERRIDE environment variable with asset path which has higher
  priority.
2021-09-02 20:24:23 +03:00
Marcel
970d57f905 Merge branch 'juliancoffee/skill_boost_rework' into 'master'
ECS & Diary info synchronization

See merge request veloren/veloren!2771
2021-09-02 16:04:23 +00:00
Samuel Keiffer
a733ad00e6 Merge branch 'ubruntu/sometimes-drop-nothing' into 'master'
NPCs can drop nothing

See merge request veloren/veloren!2794
2021-09-01 23:17:36 +00:00
ubruntu
bbc366e1b3 NPCs can drop nothing 2021-09-01 23:17:36 +00:00
Sam
41a385c517 Turn towards center of sprite instead of corner. 2021-09-01 17:24:09 -04:00
Joshua Barretto
82886dcd3f Merge branch 'zesterer/tiny-fixes' into 'master'
Worldgen hotfix

See merge request veloren/veloren!2797
2021-09-01 12:47:50 +00:00
Joshua Barretto
1b0cb40d94 Made ore streams mineable 2021-09-01 12:05:00 +01:00
Knightress Paladin
f49dc2191d Make parrying refund the block stamina cost and cancel the recover animation 2021-08-31 23:46:33 -07:00
Sam
156820cd5c Chest sprite interact kind changed to only check that sprite is a container rather than matching on every 'chest-like' sprite. 2021-08-31 13:57:17 -04:00
Sam
5dbc05730d Moved pathfinding check to after distance check. Added a clear fallback for cases where sprite is not added to match statement. 2021-08-31 13:37:57 -04:00
Sam
f986176604 Sprites that are colelctible but not explciitly added to SpriteInteractKind match statement have a default value to allow collection. 2021-08-31 13:37:56 -04:00
Sam
2a3cc3d35a No longer send collect inventory event if interactable sprite kind cannot be found. 2021-08-31 13:37:56 -04:00
Sam
6b71133c50 Fixed interaction to work underwater. 2021-08-31 13:37:55 -04:00
Sam
13fa154e55 Changelog and added arm length (body radius) to sprite pickup range. 2021-08-31 13:37:53 -04:00
Sam
6d91bae44b Sprite interaction now uses pathfinding to check that it can be picked up. 2021-08-31 13:37:36 -04:00
Sam
28d23c89ed Added simple distance check for sprite interaction. 2021-08-31 13:37:36 -04:00
Sam
9e5744f3ee Entities will now attempt to orient towards the sprite they are interacting with. 2021-08-31 13:37:36 -04:00
Sam
44c3b0f153 Added attack hook event, attacks now cancel item use and sprite interaction. 2021-08-31 13:37:32 -04:00
Sam
538cb56b87 Sprites now go through a character state to be picked up. 2021-08-31 13:36:04 -04:00
Joshua Barretto
0b1a820762 Make arrows 'bonk' hanging sprites 2021-08-31 13:31:27 +01:00
Joshua Barretto
913c23e1ad Merge branch 'zesterer/spots' into 'master'
Spots

See merge request veloren/veloren!2695
2021-08-31 12:03:47 +00:00
Monty Marz
13c15b3840 fix witch hut smoke 2021-08-30 12:03:13 +02:00
Joshua Barretto
0011e75526 More tree variety 2021-08-29 18:38:34 +01:00
Joshua Barretto
87f4efd65b Added spot loot 2021-08-29 12:50:35 +01:00
Sam
7dcbd6aaf0 Renamed variable to make more explicit what it does. 2021-08-28 18:31:44 -04:00
Monty Marz
771a380e6c witch stuff 2021-08-28 14:53:30 +01:00
Monty Marz
df0ab43bb8 taiga and savannah definitions 2021-08-28 14:53:30 +01:00
Joshua Barretto
06d85b8b10 Added index customisation for world structure models 2021-08-28 14:53:30 +01:00
Joshua Barretto
76ba3496a1 sync 2021-08-28 14:53:30 +01:00
Joshua Barretto
8b8adcc1b8 More block particles, changes ore vein colour 2021-08-28 14:53:30 +01:00
Sam
0a648e2e8f Fixed arrows dealing damage to entities if entity walked near arrow that stuck to terrain several seconds prior. 2021-08-26 19:00:28 -04:00
juliancoffee
9211b4a00a Inline skills::Boost to voxygen code 2021-08-26 14:49:52 +03:00
juliancoffee
54cb990d52 Move to one SKILL_MODIFIERS constant 2021-08-26 14:49:52 +03:00
juliancoffee
b1bac83319 SkillTreeModifiers data structs 2021-08-26 14:49:52 +03:00
juliancoffee
1ff99dcc34 Remove unused SkillBoost functions 2021-08-26 14:49:52 +03:00
juliancoffee
81bbc8c31f Split adjusted_by_skills by toolkind 2021-08-26 14:49:51 +03:00
Sam
790c3669a0 Fix mindflayer summoning minions inside pillars. 2021-08-22 12:21:24 -04:00
Imbris
2c3b484567 Merge branch 'imbris/some-tweaks' into 'master'
Add comment on tuple bool field meaning in pathing

Closes #758

See merge request veloren/veloren!2778
2021-08-21 16:56:01 +00:00
Ben Wallis
7acae057c5 Merge branch 'xvar/book-doc-gen' into 'master'
Added cargo cmd-doc-gen to auto-generate the table of commands in the book

See merge request veloren/veloren!2776
2021-08-21 16:14:42 +00:00
Imbris
a612631aa4 Add comment on tuple bool field meaning in pathing 2021-08-21 15:19:12 +00:00
Ben Wallis
c00bca7e93 Added cargo cmd-doc-gen to auto-generate the table of commands in the new players/commands.md page in the book 2021-08-21 13:36:55 +01:00
Ygor Souza
54c3adf9af Use all armor stats to calculate combat rating
- Added terms to account for poise (stun resistance), max energy bonus,
  energy reward bonus, and crit power.
- The weights were chosen to yield roughly the same CR for each of the 3
  types of armor in the same tier.
- Weapon rating multiplied by a constant to keep in the same order of
  magnitude as the other terms.
2021-08-16 19:59:54 +02:00
juliancoffee
09e8ee2b3f Remove giants 2021-08-16 18:15:01 +03:00
juliancoffee
130ae1f429 Add ori_modifier for DashMelee and nerf it
* 0.6 -> 0.3 ori modifier during charge in DashMelee
2021-08-16 17:27:59 +03:00
juliancoffee
e9dde3ecec Add MakeNPC admin command 2021-08-16 16:45:36 +03:00
Imbris
1fd25c22dd Merge branch 'juliancoffee/explode_vines' into 'master'
Make Fireballs explode EnsnaringVines

See merge request veloren/veloren!2758
2021-08-14 19:09:05 +00:00
juliancoffee
c2247686db Make is_mid_air use on_surface().is_none() 2021-08-13 23:16:38 +03:00
Joshua Barretto
5e7e560c10 Merge branch 'min-persistent-world' into 'master'
min-persistent-world

See merge request veloren/veloren!2662
2021-08-13 12:30:28 +00:00
juliancoffee
a82f5ca057 Add comment about fragility of solution 2021-08-12 15:28:58 +03:00
Dr. Dystopia
94bcf5b59b Move assignment out of if-statement 2021-08-12 12:34:04 +02:00
Joshua Barretto
738e59965f Added experimental terrain persistence 2021-08-12 10:26:20 +01:00
juliancoffee
86b9e2d8e6 Make Fireballs explode EnsnaringVines 2021-08-12 01:25:55 +03:00
juliancoffee
3ac74a8259 Implement /kit all and a bit of refactoring
+ notifying about sucessful kit application
+ notifying about case with insufficient space
+ handle case where you don't have enough free slots
+ handle quantity of non-stackable items
+ add test for items in kit manifest
2021-08-10 13:28:38 +03:00
Samuel Keiffer
d5feca45c5 Merge branch 'pacmanmati/veloren-pacmanmati/1224-consolidate-redundant-stage-sections' into 'master'
Consolidate redundant stage sections

See merge request veloren/veloren!2748
2021-08-10 01:23:26 +00:00
juliancoffee
449902a50e Use asset::load_dir to get list of all items 2021-08-10 02:03:46 +03:00
Sam
52ee598cf1 Consolidated Use into Action as well. 2021-08-09 10:31:17 -04:00
pacmanmati
5f37509a78 #1224 - Replace redundant StageSection: Swing, Shoot, Cast with Action 2021-08-09 10:27:53 -04:00
juliancoffee
4069a381c5 Make Frenzied buff again 2021-08-09 13:05:00 +03:00
Treeco
a48fa0f349 Buff swim thrust for humans reduce gains from skillpoints
This is intended to give a swim speed of 4.7 m/s when unskilled, and 7.2 when skilled
However, this turns out to be horrifically fps-dependant, both after this branch and in master. Needs further research into fixes
This commit tunes it for 60 fps
2021-08-09 10:06:16 +01:00
Treeco
2fc62bfe7f Make each race's hitbox and weight scale linearly with their height
This causes all humanoids to handle identically when falling, gliding, or swimming
2021-08-09 10:06:16 +01:00
Ludvig Böklin
ebf489984c Improve gliding
- make glider dimensions a factor of body height
- increase glider dimensions across the board
- remove delay from transition into glide
- enable glider control while wielding glider
- improve glide wield animation
2021-08-09 10:06:16 +01:00
Ludvig Böklin
b667ba86f9 Fix mistake of pre-multiplying aerodynamic coefficients
Increase glider zero-lift drag
2021-08-09 10:06:15 +01:00
Samuel Keiffer
9bfd396c36 Merge branch 'ubruntu/relative-xp-curve' into 'master'
XP reward curve modified for faster gain at lower levels

See merge request veloren/veloren!2706
2021-08-08 03:34:57 +00:00
ubruntu
dca795e533 XP reward curve modified for faster gain at lower levels 2021-08-08 03:34:56 +00:00
juliancoffee
a7922336ea Expose beam_offsets to AI 2021-08-08 00:33:43 +03:00
Samuel Keiffer
2b10f818f5 Merge branch 'juliancoffee/pillar_fix' into 'master'
Nerf pillars + Fix Beam ori

See merge request veloren/veloren!2732
2021-08-07 16:35:24 +00:00
Illia Denysenko
0858279810 Gliding Debug Info 2021-08-07 13:19:58 +00:00
Imbris
e99a885bfe Merge branch 'juliancoffee/asset_tweak_v2' into 'master'
asset_tweak v2

See merge request veloren/veloren!2723
2021-08-06 17:41:54 +00:00
juliancoffee
bdce07e7a0 Adress review, add test for structs 2021-08-06 13:04:01 +03:00
juliancoffee
c0f3dfe6bd Normalize masses in range 75-100.
+ Remove match on body_type
2021-08-06 11:57:42 +03:00
juliancoffee
4029d4a720 Change beam offsets
* Make it so that beam starts from inside hitbox of owner.
Without it it's possible to cheese beem attack just making close enough
to its owner.
2021-08-05 21:07:46 +03:00
juliancoffee
3386805765 Give TrainingDummy hitbox 2021-08-05 21:07:46 +03:00
juliancoffee
8a83ecf57f Fix Beam orientation, remove orientation_behavior
* make old OrientationBehavior::FromOri default behaviour
* use rotation formed from look_dir instead of constructing
ori on the fly (which is altered after normalization).
2021-08-05 21:07:46 +03:00
Ludvig Böklin
cbd7c4481c Make character upright itself even while idle 2021-08-05 08:34:21 +02:00
Samuel Keiffer
92b32b4c36 Merge branch 'ygor/fix-axe-energy-reward' into 'master'
Allow axe combo to reward energy without skillpoint

See merge request veloren/veloren!2722
2021-08-05 00:38:41 +00:00
Joshua Barretto
665951946f Fixed block snapping 2021-08-04 14:12:10 +01:00
Joshua Barretto
31a49d26a9 Added action timer system for agent code 2021-08-04 14:04:56 +01:00
juliancoffee
4766450258 Avoid negative bounds in harm checks
* disallow_harm -> allow_harm to avoid negative reasoning since it mostly
requires double negation in code
* allow_harm -> may_harm to specify side-effect free
2021-08-03 18:57:53 +03:00
juliancoffee
5e6007db03 Return self-harm 2021-08-03 16:43:56 +03:00
juliancoffee
1efc3188ef Refactor projectile system 2021-08-03 16:43:55 +03:00
juliancoffee
497a94cd7a Post review refactoring
* inline `target_dodging` into struct declaration as they are named
anyway
* move `avoid_harm` check out of `Attack::apply_attack` so we don't need
to pass whole Player component.
* another cosmetic things
2021-08-03 16:43:55 +03:00
juliancoffee
7413e7fd11 Prettify aura system 2021-08-03 16:43:55 +03:00
juliancoffee
aaf2df19d4 Make Veloren compile again 2021-08-03 16:43:55 +03:00
juliancoffee
229e7b9cec Add CHANGELOG note about battle_mode setting 2021-08-03 16:43:54 +03:00
juliancoffee
61416faec3 Refactor Aura system, add avoid_harm flag
+ fix bug where you cast OutOfGroup on yourself and your group
2021-08-03 16:42:58 +03:00
juliancoffee
c7fdb640ac Cleaning 2021-08-03 16:42:58 +03:00
juliancoffee
7d4a8cbfa4 Add battle_mode server setting and player flag 2021-08-03 16:42:58 +03:00
juliancoffee
328e865ed3 Add asset_tweak macros 2021-08-03 16:31:13 +03:00
juliancoffee
2ce09af2d8 Remove redundant serial_test crate 2021-08-03 16:31:13 +03:00
juliancoffee
30ebf04e96 Add ability to specify directory in asset_tweak 2021-08-03 16:31:13 +03:00
juliancoffee
99d0c2cb95 Remove clone() for creating new tweak file 2021-08-03 16:31:13 +03:00
juliancoffee
846233367f Introduce helper functions and deduplicate docs 2021-08-03 16:31:13 +03:00
Ygor Souza
1b5c3883a4 Allow axe combo to reward energy without skillpoint
When the character does not have the Double Strike Combo skill, the
ability's stage_data only contains one element, and thus the
stage_data.len() - 1 expression would set the max_energy_regen to 0.
This change forces the multiplier to 1 in this specific case, so the axe
can still reward energy without the combo skill point, to match the
other weapons.
2021-08-03 07:10:03 +02:00
Joshua Barretto
45f94b0bce Better Agent API 2021-08-02 13:08:39 +01:00
Ludvig Böklin
400734cc0a Fix gliderwield downhill run jitter 2021-08-01 11:20:46 +00:00
Joshua Barretto
f51c4ed860 Merge branch 'zesterer/menacing' into 'master'
Added menacing, made agent code less hacky

See merge request veloren/veloren!2707
2021-08-01 00:27:02 +00:00
Imbris
97e5ad02ff Merge branch 'imbris/stamina-energy' into 'master'
Replace stamina with energy

Closes #1214

See merge request veloren/veloren!2704
2021-08-01 00:26:59 +00:00
Joshua Barretto
da691cbf60 Merge branch 'imbris/small-fix' into 'master'
Fix typo in log message and remove prefixed '_' from a few used variables

See merge request veloren/veloren!2703
2021-07-31 21:54:25 +00:00
Joshua Barretto
422e1c30f4 Added menacing, made agent code less hacky 2021-07-31 20:33:28 +01:00
Imbris
89eee332c9 Replace stamina -> energy in code, i18n keys, and asset names 2021-07-31 01:34:40 -04:00
Imbris
3ddbb0a5fb Merge branch 'mohs/refactoring_character_behavior' into 'master'
reducing complexity of character_behavior's run method by extracting logical pieces.

See merge request veloren/veloren!2697
2021-07-31 02:47:55 +00:00
Imbris
119c72f5d8 Fix typo in log message and remove prefixed '_' from a few used variables 2021-07-30 22:10:12 -04:00
Thomas Kosel
2bf8a8c55c
improving code quality by removing superfluous & 2021-07-30 10:12:20 +02:00
Monty Marz
14eb0f9aa2 Remove sceptre, add swords 2021-07-29 22:38:35 +00:00
Thomas Kosel
3735688e4c
changing <Sys> to Self to be a little more speaking and less riddles. 2021-07-29 23:14:46 +02:00
Thomas Kosel
005c33bb28
renaming methods to match the names of the methods called within 2021-07-29 22:55:58 +02:00
Thomas Kosel
0b07b14093
moving CharacterState interpreting methods to character_state.rs 2021-07-29 22:38:20 +02:00
Thomas Kosel
93045ba1ee
reducing complexity of character_behavior's run method by extracting logical pieces. 2021-07-29 20:09:31 +02:00
Imbris
6b54bedcd0 Merge branch 'imbris/1002-fix' into 'master'
Add comment to physics and replace magic number in climbing boost with a named...

Closes #1002

See merge request veloren/veloren!2694
2021-07-29 17:46:14 +00:00
Imbris
9fb6b84670 Merge branch 'juliancoffee/hud_refactor' into 'master'
Skillbar hud refactoring (+ shortened key names)

See merge request veloren/veloren!2663
2021-07-29 16:08:56 +00:00