瀏覽代碼

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);
                     }
                 }