Skip to content

Commit

Permalink
Fixed conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac8668 committed Feb 4, 2024
1 parent a41b5bc commit 891a8d0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/actors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn fill_actors(
let materials = materials.0.get(materials.1 .0.clone()).unwrap();

for (actor, transform) in actors.iter() {
let actor_pos = transform.world_pos(&actor).as_ivec2();
let actor_pos = transform.world_pos(actor).as_ivec2();

for x_off in 0..actor.width as i32 {
for y_off in 0..actor.height as i32 {
Expand All @@ -42,7 +42,7 @@ pub fn unfill_actors(
let materials = materials.0.get(materials.1 .0.clone()).unwrap();

for (actor, transform) in actors.iter() {
let actor_pos = transform.world_pos(&actor).as_ivec2();
let actor_pos = transform.world_pos(actor).as_ivec2();

for x_off in 0..actor.width as i32 {
for y_off in 0..actor.height as i32 {
Expand Down
2 changes: 1 addition & 1 deletion src/chunk_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ pub fn update_has_collider(
down_right.x as i32,
down_right.y as i32,
);

has_collider.0.push(bounds_rect);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub const RIGIDBODY_LAYER: f32 = 1000.;

//Rapier2d collision groups
pub const RIGIDBODY_GROUP: Group = Group::GROUP_1;
pub const WORLD_GROUP: Group = Group::GROUP_2;
//pub const WORLD_GROUP: Group = Group::GROUP_2;
pub const ACTOR_GROUP: Group = Group::GROUP_3;

//Buttons
Expand Down
9 changes: 5 additions & 4 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ pub fn _delete_image(mut commands: Commands, debug_images: Query<Entity, With<De
#[derive(Component)]
pub struct DeleteImage;

fn render_actors(mut gizmos: Gizmos, actors: Query<&Actor>) {
for actor in actors.iter() {
fn render_actors(mut gizmos: Gizmos, actors: Query<(&Transform, &Actor)>) {
for (transform, actor) in actors.iter() {
let pos = transform.translation.xy();

gizmos.rect_2d(
vec2(actor.pos.x as f32, -actor.pos.y as f32)
+ vec2(actor.width as f32, -(actor.height as f32)) / 2.,
pos + vec2(actor.width as f32, -(actor.height as f32)) / 2.,
0.,
Vec2::new(actor.width as f32, actor.height as f32),
Color::rgba(0.75, 0.25, 0.25, 0.2),
Expand Down
1 change: 0 additions & 1 deletion src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ impl Plugin for PlayerPlugin {
FixedUpdate,
(
update_player.before(update_actors),
update_player_sprite.after(update_actors),
tool_system
.before(chunk_manager_update)
.before(update_particles),
Expand Down

0 comments on commit 891a8d0

Please sign in to comment.