Skip to content

Commit

Permalink
Fix hookline color with unhook in vanilla (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupeyy authored Jan 7, 2025
1 parent 6a2b366 commit c021626
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions game/vanilla/src/entities/character/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod character_core {
use std::ops::{AddAssign, ControlFlow};

use crate::reusable::{CloneWithCopyableElements, ReusableCore};
use game_base::mapdef_06::DdraceTileNum;
use game_interface::{
events::{
GameCharacterEffectEvent, GameCharacterEventEffect, GameCharacterEventSound,
Expand All @@ -15,7 +16,6 @@ pub mod character_core {
};
use hiarc::Hiarc;
use num::FromPrimitive;
use game_base::mapdef_06::DdraceTileNum;

use crate::{
collision::collision::{Collision, CollisionTile, CollisionTypes},
Expand Down Expand Up @@ -819,7 +819,11 @@ pub mod character_core {
);

if !do_break && matches!(hit, CollisionTile::Solid(_)) {
color = HookCollisionLineColor::Hookable;
if matches!(hit, CollisionTile::Solid(DdraceTileNum::NoHook)) {
color = HookCollisionLineColor::Unhookable;
} else {
color = HookCollisionLineColor::Hookable;
}
}

let col = GameWorld::intersect_character_id_on_line(
Expand Down

0 comments on commit c021626

Please sign in to comment.