haslersn
1796c09ca1
common: Rework volume API
...
See the doc comments in `common/src/vol.rs` for more information on
the API itself.
The changes include:
* Consistent `Err`/`Error` naming.
* Types are named `...Error`.
* `enum` variants are named `...Err`.
* Rename `VolMap{2d, 3d}` -> `VolGrid{2d, 3d}`. This is in preparation
to an upcoming change where a “map” in the game related sense will
be added.
* Add volume iterators. There are two types of them:
* _Position_ iterators obtained from the trait `IntoPosIterator`
using the method
`fn pos_iter(self, lower_bound: Vec3<i32>, upper_bound: Vec3<i32>) -> ...`
which returns an iterator over `Vec3<i32>`.
* _Volume_ iterators obtained from the trait `IntoVolIterator`
using the method
`fn vol_iter(self, lower_bound: Vec3<i32>, upper_bound: Vec3<i32>) -> ...`
which returns an iterator over `(Vec3<i32>, &Self::Vox)`.
Those traits will usually be implemented by references to volume
types (i.e. `impl IntoVolIterator<'a> for &'a T` where `T` is some
type which usually implements several volume traits, such as `Chunk`).
* _Position_ iterators iterate over the positions valid for that
volume.
* _Volume_ iterators do the same but return not only the position
but also the voxel at that position, in each iteration.
* Introduce trait `RectSizedVol` for the use case which we have with
`Chonk`: A `Chonk` is sized only in x and y direction.
* Introduce traits `RasterableVol`, `RectRasterableVol`
* `RasterableVol` represents a volume that is compile-time sized and has
its lower bound at `(0, 0, 0)`. The name `RasterableVol` was chosen
because such a volume can be used with `VolGrid3d`.
* `RectRasterableVol` represents a volume that is compile-time sized at
least in x and y direction and has its lower bound at `(0, 0, z)`.
There's no requirement on he lower bound or size in z direction.
The name `RectRasterableVol` was chosen because such a volume can be
used with `VolGrid2d`.
2019-09-06 15:43:31 +02:00
haslersn
886d554f52
common: prepend/append multiple SubChunks in a batch
2019-09-06 15:33:36 +02:00
haslersn
963c5a7785
common: Calculate magic number in Chonk
2019-09-06 15:33:36 +02:00
haslersn
8451a06804
common: Set TerrainChunk::SIZE.z = std::i32::MAX
2019-09-06 15:33:36 +02:00
haslersn
57354fb062
common: For trait ReadVol
remove get_unchecked()
2019-09-06 15:33:36 +02:00
Joshua Barretto
66c58840ef
Merge branch 'scott-c/first-person-model' into 'master'
...
Add first person models
See merge request veloren/veloren!443
2019-09-06 13:02:03 +00:00
scott-c
bc1ccfc99b
Fix first person weapon visible while not wielding
2019-09-06 18:22:26 +08:00
Andrew Pritchard
05dff792fc
Deref instead of clone vel
2019-09-06 14:22:58 +08:00
Andrew Pritchard
b4c74279b7
Vec3 is apprently *not* Copy, Set near plane to 0.1 to prevent tirangle flickering
2019-09-06 13:24:42 +08:00
Andrew Pritchard
b4d5663fed
Vec3 is copy
2019-09-06 12:04:20 +08:00
Andrew Pritchard
5b82808df0
Merge branch 'master' into 'fix-jump-height'
...
# Conflicts:
# common/src/sys/phys.rs
2019-09-05 13:07:46 +00:00
Andrew Pritchard
d0b2f7565a
Revert "Revert "Exponential interpolation for linear damping""
...
This reverts commit 8b9a3ae1df
.
2019-09-05 18:24:38 +08:00
Andrew Pritchard
8b9a3ae1df
Revert "Exponential interpolation for linear damping"
...
This reverts commit 94b9f50efa
.
2019-09-05 18:24:22 +08:00
Andrew Pritchard
94b9f50efa
Exponential interpolation for linear damping
...
With an additional approximation to allow for the same size jumps given different framerates.
2019-09-05 17:07:15 +08:00
Imbris
52d84248ec
Remove all warnings
2019-09-04 19:03:49 -04:00
Imbris
fc9c87878e
Fix some warnings, cleanup comment
2019-09-03 23:09:29 -04:00
Imbris
8a994ada8e
Remove derpy eyes :( , fix undead eye indices, fmt
2019-09-03 23:06:15 -04:00
jshipsey
ca4da22c7d
fixing eyes, cleanup on offsets
2019-09-03 23:06:13 -04:00
jshipsey
178657c871
tweaked hair colors, head offsets, skin colors
2019-09-03 23:06:11 -04:00
Imbris
cc331c10b6
Remove use of empty.vox
2019-09-03 23:06:09 -04:00
Imbris
074eee06e6
Add pants coloring, chest and pants sliders
2019-09-03 23:06:06 -04:00
Imbris
0ffc534df2
Add separate eye color lists for each race
2019-09-03 23:06:02 -04:00
Pfauenauge90
bdb95be5cc
hair and skin colours
2019-09-03 23:05:59 -04:00
Imbris
c4999f5e9d
adjust how figure head coloring is done
2019-09-03 23:05:58 -04:00
Imbris
9d086949d1
Add basic index based coloring for figures
2019-09-03 23:05:56 -04:00
Imbris
fd251c4d3a
Fix sliders, remove uneeded method, fix aspect ratio in character creation
2019-09-03 23:05:54 -04:00
Imbris
7bebffb2af
Add ron file for head offsets, segment unionizer
2019-09-03 23:05:52 -04:00
Imbris
ab34377309
Add basic segment combination
2019-09-03 23:05:50 -04:00
Imbris
3ccbb0f38d
Convert tooltips to use ImageFrame, add autosizing
2019-09-01 15:34:20 -04:00
Monty Marz
f53904b534
More sprites, ui fixes, lianas
2019-09-01 19:04:03 +00:00
timokoesters
ecbf7cad5b
Remove old code
2019-08-31 09:00:20 +02:00
jshipsey
b81cd6a8f9
combine character.action movement blocks
2019-08-30 22:51:46 -04:00
timokoesters
9a832dd56b
Move std::mem::discriminant into new method
2019-08-30 22:51:46 -04:00
jshipsey
78bf7a0997
slowed movement for block/attack, cleaned up code, made foot speed velocity dependent, tweaked blocking animation
2019-08-30 22:50:53 -04:00
timokoesters
b99bac87db
Make npcs roll correctly
2019-08-30 22:50:53 -04:00
timokoesters
77a48c61a1
Fix rolling for the player
2019-08-30 22:50:53 -04:00
jshipsey
f8d0b1040a
readded cidle
2019-08-30 22:50:53 -04:00
jshipsey
bec942753e
some stuff fixed, other stuff still broken
2019-08-30 22:50:53 -04:00
jshipsey
e6197d4c10
separate static anims for feet (run/static)
2019-08-30 22:50:53 -04:00
timokoesters
15978d216b
Rename controller main, alt to primary, secondary
2019-08-31 00:13:45 +02:00
timokoesters
a95893e43b
Remove inventory::swap and improve inventory::insert
2019-08-31 00:09:25 +02:00
timokoesters
ba02956f05
Make boost RMB go upward again
2019-08-31 00:08:44 +02:00
timokoesters
bd8e71c5aa
Rename activate_inventory_slot to use_inventory_slot
2019-08-30 22:46:45 +02:00
timokoesters
5d02d32ec6
Make inventory::get return a reference
2019-08-30 22:42:43 +02:00
timokoesters
082ccd7c46
Avoid right-ward shift
2019-08-30 22:32:47 +02:00
timokoesters
7e66fe792d
Return the item again if slot was not wrong
2019-08-30 21:03:49 +02:00
timokoesters
952ec35857
Remove warnings
2019-08-29 19:54:53 +02:00
timokoesters
512d2d9a8e
Rename Teleport to Boost
2019-08-29 19:44:30 +02:00
timokoesters
075827698f
Use RMB to boost away again
2019-08-29 19:44:30 +02:00
timokoesters
6e1c78e5d5
Add debug mode item giving speed boost in look_dir on click
2019-08-29 19:44:28 +02:00
timokoesters
155605841b
Use comp::Stats to store Equipment, make char weapon selection work
2019-08-29 19:44:28 +02:00
haslersn
9844e95e5f
common: Stop abusing wild animals for bit shifts
2019-08-29 18:06:52 +02:00
yashaslokesh
be71aea20b
Changed exp type from f64 to u32 and altered exp calculations and function signatures to adhere to the new types
...
Signed-off-by: Yashas Lokesh <yashas.lokesh@gmail.com>
2019-08-27 22:33:14 +00:00
timokoesters
b725b0e9ea
End rolling when player is in the air
2019-08-27 11:06:55 +02:00
timokoesters
74677784c0
Add attack buildup duration (Delay before hit)
2019-08-27 11:06:54 +02:00
timokoesters
72564cf8b4
Make action durations constants
2019-08-27 11:06:54 +02:00
timokoesters
869535e5a2
Rename tool strength/damage to power
2019-08-26 20:05:13 +02:00
timokoesters
a7747fe965
Simplify code
2019-08-26 13:12:45 +02:00
timokoesters
c4879307af
Update to github vek repo
2019-08-26 13:12:45 +02:00
timokoesters
b89bfcbfc1
Remove unnecessary map
2019-08-26 13:12:44 +02:00
timokoesters
08fa6a3414
Prevent problems with no vel while rolling in the future
2019-08-26 13:12:44 +02:00
timokoesters
c278ac9927
Add todo making glide an ability/item
2019-08-26 13:12:44 +02:00
timokoesters
98f8196a16
Put combat related values into constants
2019-08-26 13:12:43 +02:00
timokoesters
05f2f168fd
Make falldamage local, don't use force update for local, cleanup
2019-08-26 13:12:43 +02:00
timokoesters
eb34e5bb27
fmt
2019-08-26 13:12:43 +02:00
timokoesters
b96557d012
Fix roll from cliff bug
2019-08-26 13:12:42 +02:00
timokoesters
a715a84ea7
Implement unstoppable rolling
2019-08-26 13:12:42 +02:00
timokoesters
01410569a4
Use look_dir when blocking
2019-08-26 13:12:41 +02:00
timokoesters
3258fa3a3c
Add basis for projectiles
...
But we have no controller action to spawn them yet
2019-08-26 13:12:41 +02:00
Songtronix
814e858720
Split Events in ServerEvent and LocalEvent
2019-08-26 13:12:41 +02:00
timokoesters
75368dbac1
Remove dbg
2019-08-26 13:12:40 +02:00
timokoesters
62745c4cad
Only use look_dir for ori when wielded or attacking
2019-08-26 13:12:40 +02:00
timokoesters
295969517c
Improve combat range
2019-08-26 13:12:40 +02:00
timokoesters
b826edf6e8
Make aiming 2D
2019-08-26 13:12:39 +02:00
timokoesters
0912de2a26
Make aiming more precise
2019-08-26 13:12:38 +02:00
timokoesters
e90f95bc75
Look in the direction of the camera
2019-08-26 13:12:38 +02:00
jshipsey
39bd888a7c
idle block animation
2019-08-26 13:12:38 +02:00
timokoesters
e7c61c30cc
Block when pressing right click while looking at the attacker
2019-08-26 13:12:37 +02:00
timokoesters
e42ffb362a
Remove unnecessary components
2019-08-26 13:12:37 +02:00
timokoesters
b748c1a6e5
Make gliding the error animation
2019-08-26 13:12:37 +02:00
timokoesters
0bb70d8182
Fix water
2019-08-26 13:12:36 +02:00
timokoesters
5ab03abbdd
Remove animation warnings
2019-08-26 13:12:36 +02:00
timokoesters
799c73d43a
Fix characterstate in movement.rs, not phys.rs
2019-08-26 13:12:35 +02:00
timokoesters
808467c616
Reset controller after each tick
2019-08-26 13:12:35 +02:00
timokoesters
4d6a32e00f
Allow non player entites to be removed again
2019-08-26 13:12:35 +02:00
timokoesters
90c81b4759
Reset controller after each tick
2019-08-26 13:12:34 +02:00
timokoesters
5d5ccd7b99
Move from state components to single CharaterState struct
...
This makes split animations easy and improves overall code quality
2019-08-26 13:12:34 +02:00
Christian Authmann
840e2cbfbf
Build script: check if git-lfs works
2019-08-22 19:18:47 +02:00
Joshua Barretto
d9854ad682
Merge branch 'zesterer/instancing' into 'master'
...
Instancing (block sprites)
See merge request veloren/veloren!450
2019-08-22 11:10:57 +00:00
Vechro
c6b2303890
Fix wielding jump issue
2019-08-21 20:34:21 +03:00
Monty Marz
fade04d44e
Pfauenauge/plants grass
2019-08-21 17:22:05 +00:00
Vechro
c40e15f070
Fix velocity when stuck
2019-08-21 20:17:19 +03:00
Joshua Barretto
5f09ab3a4f
Added multiple sprite block kind support
2019-08-20 00:31:11 +01:00
Joshua Barretto
b31cca4bb3
Added wheat and sprite rendering
2019-08-19 21:09:35 +01:00
Acrimon
a41cf1a83d
Disabled unsafe using lint level.
2019-08-19 14:39:23 +02:00
Acrimon
d0f10115f4
Eliminated unsafe.
2019-08-19 14:33:31 +02:00
Monty Marz
29f6186139
hotbar changes
...
completely switched to. vox files
easier to see design
gradient and numbers on the health/mana bar
2019-08-18 18:07:21 +00:00
Joshua Barretto
49426565dc
Renamed normal StructureBlock variant
2019-08-18 15:33:16 +01:00
Joshua Barretto
e535537106
Added default block kind to structure loading
2019-08-18 10:33:18 +01:00
Joshua Barretto
825d8bb632
Fixed water in caves, made water reflection vary with lighting
2019-08-18 10:33:18 +01:00