소스 검색

Hotfix for Object::load_player_by_name

It was found during the recent commit that load_player wouldn't look for
Player objects, it would look at any kind of object.
Apollo 8 달 전
부모
커밋
e7ca4e67da
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/object.rs

+ 1 - 1
src/object.rs

@@ -92,7 +92,7 @@ impl Object {
             match obj {
                 Some(obj) => {
                     eprintln!("OK");
-                    if obj.name == *name {
+                    if obj.name == *name && obj.kind == Kind::Player {
                         return Some(obj);
                     }
                 }