-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update to 0.10 #5
base: main
Are you sure you want to change the base?
Conversation
tested 🙌🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this looks good. Just have another look at Brush.Use()
, which doesn't currently work properly with the world transactions.
brush/brush.go
Outdated
@@ -39,26 +39,28 @@ func (b Brush) UUID() uuid.UUID { | |||
|
|||
var bb = cube.Box(-0.125, -0.125, -0.125, 0.125, 0.125, 0.125) | |||
|
|||
func (b Brush) Use(p *player.Player) { | |||
func (b Brush) Use(p *player.Player, h *world.EntityHandle) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still not right. Brush.Use()
is being called on another goroutine which invalidates *player.Player
s. Don't pass the player to this function, only pass the handle. You can retrieve the player in the transaction by asserting e
: p := e.(*player.Player)
I got no clue if this is right at all 😭