unixoide / 5th-echelon

https://unixoide.github.io/5th-echelon/
76 stars 2 forks source link

Add DX11 support #41

Closed ThirteenAG closed 1 month ago

ThirteenAG commented 1 month ago

Briefly tested, seems on par with dx9. Is this enough for it to work, or there's more addresses in the code I didn't notice?

image

Also something I noticed:

https://github.com/unixoide/5th-echelon/blob/main/hooks/src/addresses.rs#L84 https://github.com/unixoide/5th-echelon/blob/main/hooks/src/addresses.rs#L94

https://github.com/unixoide/5th-echelon/blob/main/hooks/src/addresses.rs#L67 https://github.com/unixoide/5th-echelon/blob/main/hooks/src/addresses.rs#L84

contain the same addresses. Is this intended?

unixoide commented 1 month ago

Thanks a lot!

No the duplicate addresses are not intentional. I blame lack of sleep.

And no, all addresses should be in this file (everything else would be a bug).

ThirteenAG commented 1 month ago

Alright, thank you! I have a little request, made a plugin that can launch dedicated server exe alongside with the game and then quit it on exit, but this function throws an error with steam version: https://github.com/unixoide/5th-echelon/blob/main/hooks/src/lib.rs#L190-L193

I made a following workaround:

    std::thread::Builder::new()
        .name(String::from("login-thread"))
        .spawn(|| 
        {
            thread::sleep(time::Duration::from_millis(5000));
            api::login(&config.user.username, &config.user.password).unwrap()
        })
        .unwrap();

But I think would be better to give it a few seconds to try to login and fail on timeout.