lty518 / compalgit Goto Github PK
View Code? Open in Web Editor NEWthe place to store code in work
the place to store code in work
原本的 COMMAND_CLOSE 沒法正常關閉 redout 遊戲,因為 redout 的 windowtitle 並不等於中控台傳的 game_title 參數 ( 這裡傳的數值為 "Redout",但實際遊戲在跑的程序為 "redout-Win64-Shipping" ),所以會造成雖然 game server 回傳中控台遊戲已關閉,但實際上 game server 並沒有確實關閉遊戲的現象。
COMMAND_CLOSE = 'taskkill /FI "WINDOWTITLE eq "{0}"'
一辦法是,設 wildcard* 在程序名稱後將相關名稱子程序都殺掉,但其漏洞是,假如程序的 WINDOWTITLE 跟程序名稱無關時,程序就不會正確關閉。
COMMAND_CLOSE = 'taskkill /FI "WINDOWTITLE eq {0}*"'
我這邊在測試開啟 Redout 遊戲時,發現 Game server 一直不會更新 connection status 回中控台,後來查到 CheckGameStatus() 中
p = os.popen('tasklist /FI "IMAGENAME eq %s"' % imagename)
return p.read().count(imagename)
這邊的 p 值一直為 0,導致 openGame() 的 while loop 無限輪迴,我發現執行
os.popen('tasklist /FI "IMAGENAME eq %s"' % Redout.exe)
後,p 裡面遊戲名稱會是小寫,以這裡的案例就是 "Redout.exe" 變成 "redout.exe",所以導致 imagename ( "Redout.exe" ) count 不到,最終函數回傳 0 值
這個部分可能要再請你驗證一下了,謝謝!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.