Quellcode durchsuchen

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 vor 8 Monaten
Ursprung
Commit
e7ca4e67da
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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);
                     }
                 }